@hydranium/core 1.0.0-next.7 → 1.0.0-next.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/documents/ast-document-manager.d.ts +58 -5
- package/lib/documents/ast-document-manager.d.ts.map +1 -1
- package/lib/documents/ast-document-manager.js +50 -18
- package/lib/documents/ast-document-manager.js.map +1 -1
- package/lib/documents/client-ids.d.ts +5 -19
- package/lib/documents/client-ids.d.ts.map +1 -1
- package/lib/documents/client-ids.js +5 -19
- package/lib/documents/client-ids.js.map +1 -1
- package/lib/documents/hydranium-text-documents.d.ts +51 -17
- package/lib/documents/hydranium-text-documents.d.ts.map +1 -1
- package/lib/documents/hydranium-text-documents.js +136 -40
- package/lib/documents/hydranium-text-documents.js.map +1 -1
- package/lib/documents/language-client-text-shadow.d.ts +41 -9
- package/lib/documents/language-client-text-shadow.d.ts.map +1 -1
- package/lib/documents/language-client-text-shadow.js +56 -11
- package/lib/documents/language-client-text-shadow.js.map +1 -1
- package/lib/documents/self-save-registry.d.ts +37 -6
- package/lib/documents/self-save-registry.d.ts.map +1 -1
- package/lib/documents/self-save-registry.js +28 -15
- package/lib/documents/self-save-registry.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -1
- package/lib/langium/ast-extension/ast-node-builder.d.ts +32 -9
- package/lib/langium/ast-extension/ast-node-builder.d.ts.map +1 -1
- package/lib/langium/ast-extension/ast-node-builder.js +60 -22
- package/lib/langium/ast-extension/ast-node-builder.js.map +1 -1
- package/lib/langium/bootstrap.d.ts.map +1 -1
- package/lib/langium/bootstrap.js +16 -9
- package/lib/langium/bootstrap.js.map +1 -1
- package/lib/langium/config/configuration-provider.d.ts +81 -0
- package/lib/langium/config/configuration-provider.d.ts.map +1 -0
- package/lib/langium/config/configuration-provider.js +112 -0
- package/lib/langium/config/configuration-provider.js.map +1 -0
- package/lib/langium/config/index.d.ts +1 -0
- package/lib/langium/config/index.d.ts.map +1 -1
- package/lib/langium/config/index.js +1 -0
- package/lib/langium/config/index.js.map +1 -1
- package/lib/langium/diagnostics/lsp-logger.d.ts +17 -0
- package/lib/langium/diagnostics/lsp-logger.d.ts.map +1 -1
- package/lib/langium/diagnostics/lsp-logger.js +40 -6
- package/lib/langium/diagnostics/lsp-logger.js.map +1 -1
- package/lib/langium/document-builder/build-pipeline-integration.d.ts +13 -1
- package/lib/langium/document-builder/build-pipeline-integration.d.ts.map +1 -1
- package/lib/langium/document-builder/build-pipeline-integration.js +1 -1
- package/lib/langium/document-builder/build-pipeline-integration.js.map +1 -1
- package/lib/langium/document-builder/build-session.d.ts +93 -0
- package/lib/langium/document-builder/build-session.d.ts.map +1 -0
- package/lib/langium/document-builder/build-session.js +72 -0
- package/lib/langium/document-builder/build-session.js.map +1 -0
- package/lib/langium/document-builder/document-builder.d.ts +150 -7
- package/lib/langium/document-builder/document-builder.d.ts.map +1 -1
- package/lib/langium/document-builder/document-builder.js +298 -11
- package/lib/langium/document-builder/document-builder.js.map +1 -1
- package/lib/langium/document-builder/index.d.ts +1 -0
- package/lib/langium/document-builder/index.d.ts.map +1 -1
- package/lib/langium/document-builder/index.js +1 -0
- package/lib/langium/document-builder/index.js.map +1 -1
- package/lib/langium/integration-services.d.ts +45 -1
- package/lib/langium/integration-services.d.ts.map +1 -1
- package/lib/langium/integration-services.js +10 -5
- package/lib/langium/integration-services.js.map +1 -1
- package/lib/langium/integrity/integrity-service.d.ts +5 -0
- package/lib/langium/integrity/integrity-service.d.ts.map +1 -1
- package/lib/langium/integrity/integrity-service.js +34 -1
- package/lib/langium/integrity/integrity-service.js.map +1 -1
- package/lib/langium/keys/containment.d.ts +64 -0
- package/lib/langium/keys/containment.d.ts.map +1 -0
- package/lib/langium/keys/containment.js +53 -0
- package/lib/langium/keys/containment.js.map +1 -0
- package/lib/langium/keys/index.d.ts +1 -0
- package/lib/langium/keys/index.d.ts.map +1 -1
- package/lib/langium/keys/index.js +1 -0
- package/lib/langium/keys/index.js.map +1 -1
- package/lib/langium/keys/name-based-key-provider.d.ts +4 -0
- package/lib/langium/keys/name-based-key-provider.d.ts.map +1 -1
- package/lib/langium/keys/name-based-key-provider.js +4 -0
- package/lib/langium/keys/name-based-key-provider.js.map +1 -1
- package/lib/langium/model-service/model-service.d.ts +103 -7
- package/lib/langium/model-service/model-service.d.ts.map +1 -1
- package/lib/langium/model-service/model-service.js +70 -89
- package/lib/langium/model-service/model-service.js.map +1 -1
- package/lib/langium/module.d.ts +82 -13
- package/lib/langium/module.d.ts.map +1 -1
- package/lib/langium/module.js +26 -12
- package/lib/langium/module.js.map +1 -1
- package/lib/langium/naming/name-provider.d.ts +10 -0
- package/lib/langium/naming/name-provider.d.ts.map +1 -1
- package/lib/langium/naming/name-provider.js.map +1 -1
- package/lib/langium/naming/name-separator-validation.d.ts +23 -0
- package/lib/langium/naming/name-separator-validation.d.ts.map +1 -1
- package/lib/langium/naming/name-separator-validation.js +30 -1
- package/lib/langium/naming/name-separator-validation.js.map +1 -1
- package/lib/langium/residency/cst-residency-service.d.ts +31 -9
- package/lib/langium/residency/cst-residency-service.d.ts.map +1 -1
- package/lib/langium/residency/cst-residency-service.js +13 -56
- package/lib/langium/residency/cst-residency-service.js.map +1 -1
- package/lib/langium/scope/hydranium-scope-provider.d.ts +32 -13
- package/lib/langium/scope/hydranium-scope-provider.d.ts.map +1 -1
- package/lib/langium/scope/hydranium-scope-provider.js +37 -20
- package/lib/langium/scope/hydranium-scope-provider.js.map +1 -1
- package/lib/langium/shared-services.d.ts +15 -2
- package/lib/langium/shared-services.d.ts.map +1 -1
- package/lib/langium/shared-services.js.map +1 -1
- package/lib/langium/transfer/transfer-encoder.d.ts +33 -2
- package/lib/langium/transfer/transfer-encoder.d.ts.map +1 -1
- package/lib/langium/transfer/transfer-encoder.js +14 -3
- package/lib/langium/transfer/transfer-encoder.js.map +1 -1
- package/lib/langium/validation/document-validator.d.ts +145 -6
- package/lib/langium/validation/document-validator.d.ts.map +1 -1
- package/lib/langium/validation/document-validator.js +211 -4
- package/lib/langium/validation/document-validator.js.map +1 -1
- package/lib/langium/workspace/document-uri-policy.d.ts +3 -4
- package/lib/langium/workspace/document-uri-policy.d.ts.map +1 -1
- package/lib/langium/workspace/document-uri-policy.js +3 -4
- package/lib/langium/workspace/document-uri-policy.js.map +1 -1
- package/lib/langium/workspace/hydranium-langium-document-factory.d.ts +25 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.d.ts.map +1 -1
- package/lib/langium/workspace/hydranium-langium-document-factory.js +25 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.js.map +1 -1
- package/lib/langium/workspace/hydranium-workspace-manager.d.ts +21 -1
- package/lib/langium/workspace/hydranium-workspace-manager.d.ts.map +1 -1
- package/lib/langium/workspace/hydranium-workspace-manager.js +28 -0
- package/lib/langium/workspace/hydranium-workspace-manager.js.map +1 -1
- package/lib/langium/workspace/in-memory-file-system-provider.d.ts +8 -0
- package/lib/langium/workspace/in-memory-file-system-provider.d.ts.map +1 -1
- package/lib/langium/workspace/in-memory-file-system-provider.js +11 -2
- package/lib/langium/workspace/in-memory-file-system-provider.js.map +1 -1
- package/lib/langium/workspace/initialize-workspace.d.ts +22 -2
- package/lib/langium/workspace/initialize-workspace.d.ts.map +1 -1
- package/lib/langium/workspace/initialize-workspace.js +13 -5
- package/lib/langium/workspace/initialize-workspace.js.map +1 -1
- package/lib/langium/workspace/langium-documents.d.ts +79 -17
- package/lib/langium/workspace/langium-documents.d.ts.map +1 -1
- package/lib/langium/workspace/langium-documents.js +83 -28
- package/lib/langium/workspace/langium-documents.js.map +1 -1
- package/lib/locale/index.d.ts +10 -0
- package/lib/locale/index.d.ts.map +1 -0
- package/lib/locale/index.js +10 -0
- package/lib/locale/index.js.map +1 -0
- package/lib/locale/server-locale.d.ts +73 -0
- package/lib/locale/server-locale.d.ts.map +1 -0
- package/lib/locale/server-locale.js +61 -0
- package/lib/locale/server-locale.js.map +1 -0
- package/lib/lsp/hydranium-document-update-handler.js +1 -1
- package/lib/lsp/hydranium-document-update-handler.js.map +1 -1
- package/lib/lsp/index.d.ts +1 -1
- package/lib/lsp/index.d.ts.map +1 -1
- package/lib/lsp/index.js +1 -1
- package/lib/lsp/index.js.map +1 -1
- package/lib/lsp/lsp-latency.d.ts +39 -0
- package/lib/lsp/lsp-latency.d.ts.map +1 -0
- package/lib/lsp/lsp-latency.js +58 -0
- package/lib/lsp/lsp-latency.js.map +1 -0
- package/lib/messages/carriers.d.ts +54 -0
- package/lib/messages/carriers.d.ts.map +1 -0
- package/lib/messages/carriers.js +62 -0
- package/lib/messages/carriers.js.map +1 -0
- package/lib/messages/index.d.ts +25 -0
- package/lib/messages/index.d.ts.map +1 -0
- package/lib/messages/index.js +25 -0
- package/lib/messages/index.js.map +1 -0
- package/lib/messages/renderer.d.ts +136 -0
- package/lib/messages/renderer.d.ts.map +1 -0
- package/lib/messages/renderer.js +159 -0
- package/lib/messages/renderer.js.map +1 -0
- package/lib/node/latency-from-env.d.ts +1 -1
- package/lib/node/latency-from-env.js +1 -1
- package/lib/node/node-file-system-provider.d.ts.map +1 -1
- package/lib/node/node-file-system-provider.js +1 -40
- package/lib/node/node-file-system-provider.js.map +1 -1
- package/lib/node/profiling-run.d.ts +2 -2
- package/lib/node/profiling-run.js +1 -1
- package/lib/node/profiling-run.js.map +1 -1
- package/lib/node/rename-over-open-readers.d.ts +52 -0
- package/lib/node/rename-over-open-readers.d.ts.map +1 -0
- package/lib/node/rename-over-open-readers.js +66 -0
- package/lib/node/rename-over-open-readers.js.map +1 -0
- package/lib/testing/fake-document.d.ts +14 -3
- package/lib/testing/fake-document.d.ts.map +1 -1
- package/lib/testing/fake-document.js +18 -3
- package/lib/testing/fake-document.js.map +1 -1
- package/lib/testing/make-noop-shared-services.d.ts +14 -0
- package/lib/testing/make-noop-shared-services.d.ts.map +1 -1
- package/lib/testing/make-noop-shared-services.js +28 -2
- package/lib/testing/make-noop-shared-services.js.map +1 -1
- package/lib/testing/make-test-services.d.ts +31 -4
- package/lib/testing/make-test-services.d.ts.map +1 -1
- package/lib/testing/make-test-services.js +19 -3
- package/lib/testing/make-test-services.js.map +1 -1
- package/lib/testing/node/spawned-server.d.ts +14 -0
- package/lib/testing/node/spawned-server.d.ts.map +1 -1
- package/lib/testing/node/spawned-server.js +33 -1
- package/lib/testing/node/spawned-server.js.map +1 -1
- package/lib/testing/playwright/flaky-network-proxy.d.ts +76 -0
- package/lib/testing/playwright/flaky-network-proxy.d.ts.map +1 -0
- package/lib/testing/playwright/flaky-network-proxy.js +164 -0
- package/lib/testing/playwright/flaky-network-proxy.js.map +1 -0
- package/lib/testing/playwright/index.d.ts +1 -0
- package/lib/testing/playwright/index.d.ts.map +1 -1
- package/lib/testing/playwright/index.js +1 -0
- package/lib/testing/playwright/index.js.map +1 -1
- package/lib/testing/playwright/server-log-capture.d.ts +14 -4
- package/lib/testing/playwright/server-log-capture.d.ts.map +1 -1
- package/lib/testing/playwright/server-log-capture.js +21 -4
- package/lib/testing/playwright/server-log-capture.js.map +1 -1
- package/lib/testing/playwright/server-log-rename-reporter.d.ts.map +1 -1
- package/lib/testing/playwright/server-log-rename-reporter.js +10 -1
- package/lib/testing/playwright/server-log-rename-reporter.js.map +1 -1
- package/lib/testing/stub-ast-document-manager.d.ts +3 -4
- package/lib/testing/stub-ast-document-manager.d.ts.map +1 -1
- package/lib/testing/stub-ast-document-manager.js +2 -5
- package/lib/testing/stub-ast-document-manager.js.map +1 -1
- package/lib/testing/stub-document-builder.d.ts +8 -0
- package/lib/testing/stub-document-builder.d.ts.map +1 -1
- package/lib/testing/stub-document-builder.js +22 -3
- package/lib/testing/stub-document-builder.js.map +1 -1
- package/lib/testing/stub-model-service.d.ts +1 -1
- package/lib/testing/stub-model-service.d.ts.map +1 -1
- package/lib/testing/stub-model-service.js +2 -2
- package/lib/testing/stub-model-service.js.map +1 -1
- package/package.json +17 -8
- package/src/documents/ast-document-manager.ts +99 -23
- package/src/documents/client-ids.ts +5 -22
- package/src/documents/hydranium-text-documents.ts +161 -55
- package/src/documents/language-client-text-shadow.ts +59 -11
- package/src/documents/self-save-registry.ts +52 -13
- package/src/index.ts +5 -0
- package/src/langium/ast-extension/ast-node-builder.ts +66 -22
- package/src/langium/bootstrap.ts +16 -9
- package/src/langium/config/configuration-provider.ts +119 -0
- package/src/langium/config/index.ts +1 -0
- package/src/langium/diagnostics/lsp-logger.ts +41 -6
- package/src/langium/document-builder/build-pipeline-integration.ts +14 -1
- package/src/langium/document-builder/build-session.ts +87 -0
- package/src/langium/document-builder/document-builder.ts +339 -11
- package/src/langium/document-builder/index.ts +1 -0
- package/src/langium/integration-services.ts +67 -6
- package/src/langium/integrity/integrity-service.ts +35 -1
- package/src/langium/keys/containment.ts +87 -0
- package/src/langium/keys/index.ts +1 -0
- package/src/langium/keys/name-based-key-provider.ts +4 -0
- package/src/langium/model-service/model-service.ts +145 -22
- package/src/langium/module.ts +104 -19
- package/src/langium/naming/name-provider.ts +10 -0
- package/src/langium/naming/name-separator-validation.ts +34 -5
- package/src/langium/residency/cst-residency-service.ts +36 -12
- package/src/langium/scope/hydranium-scope-provider.ts +40 -22
- package/src/langium/shared-services.ts +19 -2
- package/src/langium/transfer/transfer-encoder.ts +45 -3
- package/src/langium/validation/document-validator.ts +255 -8
- package/src/langium/workspace/document-uri-policy.ts +3 -4
- package/src/langium/workspace/hydranium-langium-document-factory.ts +34 -0
- package/src/langium/workspace/hydranium-workspace-manager.ts +30 -1
- package/src/langium/workspace/in-memory-file-system-provider.ts +13 -3
- package/src/langium/workspace/initialize-workspace.ts +34 -5
- package/src/langium/workspace/langium-documents.ts +106 -33
- package/src/locale/index.ts +10 -0
- package/src/locale/server-locale.ts +86 -0
- package/src/lsp/hydranium-document-update-handler.ts +1 -1
- package/src/lsp/index.ts +1 -1
- package/src/lsp/lsp-latency.ts +62 -0
- package/src/messages/carriers.ts +78 -0
- package/src/messages/index.ts +27 -0
- package/src/messages/renderer.ts +204 -0
- package/src/node/latency-from-env.ts +1 -1
- package/src/node/node-file-system-provider.ts +1 -41
- package/src/node/profiling-run.ts +3 -3
- package/src/node/rename-over-open-readers.ts +78 -0
- package/src/testing/fake-document.ts +22 -4
- package/src/testing/make-noop-shared-services.ts +50 -2
- package/src/testing/make-test-services.ts +49 -7
- package/src/testing/node/spawned-server.ts +35 -1
- package/src/testing/playwright/flaky-network-proxy.ts +240 -0
- package/src/testing/playwright/index.ts +1 -0
- package/src/testing/playwright/server-log-capture.ts +24 -5
- package/src/testing/playwright/server-log-rename-reporter.ts +12 -1
- package/src/testing/stub-ast-document-manager.ts +5 -10
- package/src/testing/stub-document-builder.ts +32 -3
- package/src/testing/stub-model-service.ts +2 -2
- package/lib/lsp/instrument-connection.d.ts +0 -36
- package/lib/lsp/instrument-connection.d.ts.map +0 -1
- package/lib/lsp/instrument-connection.js +0 -62
- package/lib/lsp/instrument-connection.js.map +0 -1
- package/src/lsp/instrument-connection.ts +0 -66
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
import { type MessageDefinition, type ParamsArg, type ResolvedMessage, type Tracer } from '@hydranium/protocol';
|
|
10
|
+
import { SimpleCache } from '@hydranium/langium';
|
|
11
|
+
import type { ResponseError } from 'vscode-jsonrpc';
|
|
12
|
+
import { Diagnostic } from 'vscode-languageserver-protocol';
|
|
13
|
+
import { type LogNameOptions } from '../langium/diagnostics/logger.js';
|
|
14
|
+
import type { ServerSharedServicesMinimal } from '../langium/shared-services.js';
|
|
15
|
+
import type { ServerLocale } from '../locale/server-locale.js';
|
|
16
|
+
/** Construction options for {@link DefaultMessageRenderer}. */
|
|
17
|
+
export type MessageRendererOptions = LogNameOptions;
|
|
18
|
+
/**
|
|
19
|
+
* The render contract the `MessageRenderer` slot holds, implemented by
|
|
20
|
+
* {@link DefaultMessageRenderer}.
|
|
21
|
+
*
|
|
22
|
+
* An interface rather than the class, so the slot is compared STRUCTURALLY. A
|
|
23
|
+
* class-typed slot carries its `protected` members into every assignability
|
|
24
|
+
* check and TypeScript compares those nominally — which makes the slot
|
|
25
|
+
* unsatisfiable by a subclass declared against a second physical copy of this
|
|
26
|
+
* package, which any duplicated install produces. It also
|
|
27
|
+
* lets an adopter REPLACE this declaration rather than intersect with it, so
|
|
28
|
+
* slot resolution does not depend on the order a services type is written in.
|
|
29
|
+
*
|
|
30
|
+
* Every method carries a no-throw contract; see the implementation.
|
|
31
|
+
*/
|
|
32
|
+
export interface MessageRenderer {
|
|
33
|
+
renderDiagnostic(diagnostic: Diagnostic): string;
|
|
34
|
+
renderError(error: ResponseError<unknown>): string;
|
|
35
|
+
renderMessage<S extends string>(message: MessageDefinition<S>, ...params: ParamsArg<S>): string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Renders every user-facing message the server sends, in the locale the server
|
|
39
|
+
* was handed at init. The framework ships no catalogue, so its own behaviour is
|
|
40
|
+
* a pass-through.
|
|
41
|
+
*
|
|
42
|
+
* Adopters override {@link translationsFor}: the public render methods carry
|
|
43
|
+
* the no-throw contract, and the catalogue lookup they wrap is what can fail.
|
|
44
|
+
*
|
|
45
|
+
* Two render methods rather than one, because what is useful to an adopter is
|
|
46
|
+
* the carrier's structured fields and the two carriers have different ones. A
|
|
47
|
+
* single `render(text)` would force an adopter to match English prose, which
|
|
48
|
+
* breaks on the first Langium reword.
|
|
49
|
+
*/
|
|
50
|
+
export declare class DefaultMessageRenderer implements MessageRenderer {
|
|
51
|
+
protected readonly tracer: Tracer;
|
|
52
|
+
protected readonly serverLocale: ServerLocale;
|
|
53
|
+
/**
|
|
54
|
+
* {@link translationsFor}'s answer per locale, `undefined` answers included —
|
|
55
|
+
* a `SimpleCache` distinguishes "absent" from "cached as none", which matters
|
|
56
|
+
* because shipping no catalogue is the framework's own hot path.
|
|
57
|
+
*
|
|
58
|
+
* `SimpleCache` rather than Langium's `WorkspaceCache`: the eviction axis
|
|
59
|
+
* there is document change, and a catalogue does not depend on documents, so
|
|
60
|
+
* it would evict on every build AND put a `DocumentBuilder` dependency on a
|
|
61
|
+
* service the shared tier declares free of one. Nothing evicts this: the
|
|
62
|
+
* locale arrives once per process. A subclass whose catalogue can change
|
|
63
|
+
* clears it.
|
|
64
|
+
*/
|
|
65
|
+
protected readonly catalogues: SimpleCache<string | undefined, Record<string, string> | undefined>;
|
|
66
|
+
constructor(services: ServerSharedServicesMinimal, options?: MessageRendererOptions);
|
|
67
|
+
/**
|
|
68
|
+
* The sentence to publish for `diagnostic`, replacing its current `message`.
|
|
69
|
+
* Sees lexer and parser errors too, which Langium pushes onto the document
|
|
70
|
+
* without routing them through `toDiagnostic`.
|
|
71
|
+
*
|
|
72
|
+
* **Must not throw**, which is why the guard is here and not at the call
|
|
73
|
+
* site: this runs inside the `Validated` phase, and Langium's
|
|
74
|
+
* `notifyDocumentPhase` rethrows anything that is not a cancellation — so an
|
|
75
|
+
* escaping error leaves the document AT `Validated` with the phase's
|
|
76
|
+
* listeners never run, and the client receives no diagnostics for that file.
|
|
77
|
+
* A subclass overriding this method takes that contract on itself.
|
|
78
|
+
*/
|
|
79
|
+
renderDiagnostic(diagnostic: Diagnostic): string;
|
|
80
|
+
/**
|
|
81
|
+
* The sentence to send for `error`, replacing its current `message`. Same
|
|
82
|
+
* no-throw contract as {@link renderDiagnostic}: an escaping error replaces a
|
|
83
|
+
* typed rejection the caller can handle with one it cannot.
|
|
84
|
+
*/
|
|
85
|
+
renderError(error: ResponseError<unknown>): string;
|
|
86
|
+
/**
|
|
87
|
+
* The sentence for a declaration the caller holds directly, for a carrier
|
|
88
|
+
* with no slot to put an identity in.
|
|
89
|
+
*
|
|
90
|
+
* GLSP's action protocol is the case: every member of its message, status
|
|
91
|
+
* and reject actions is prose or an enum, so a code cannot travel and the
|
|
92
|
+
* raise site is the last place that still knows which message this is.
|
|
93
|
+
* Prefer {@link renderDiagnostic} / {@link renderError} wherever a carrier
|
|
94
|
+
* does hold the identity — they keep the render off the raise site, so an
|
|
95
|
+
* adopter's own messages ride the same one binding.
|
|
96
|
+
*
|
|
97
|
+
* Same no-throw contract as the carrier methods.
|
|
98
|
+
*/
|
|
99
|
+
renderMessage<S extends string>(message: MessageDefinition<S>, ...params: ParamsArg<S>): string;
|
|
100
|
+
/**
|
|
101
|
+
* The catalogue for the current locale, or `undefined` for none — the
|
|
102
|
+
* framework's answer, shipping none. Overriding this leaves every identity
|
|
103
|
+
* decision, every pass-through and the no-throw guard in place.
|
|
104
|
+
*
|
|
105
|
+
* **Called once per locale, not once per message**, so an override may load
|
|
106
|
+
* a file or build a map without that cost landing per diagnostic. The
|
|
107
|
+
* corollary is that a catalogue mutated in place afterwards is not seen;
|
|
108
|
+
* clear {@link catalogues} to invalidate.
|
|
109
|
+
*
|
|
110
|
+
* An adopter wanting Langium's own uncoded sentences instead matches
|
|
111
|
+
* `Diagnostic.data.code` from an overridden {@link renderDiagnostic}, never
|
|
112
|
+
* the sentence.
|
|
113
|
+
*/
|
|
114
|
+
protected translationsFor(_locale: string | undefined): Record<string, string> | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Resolve one identity against the current locale's catalogue.
|
|
117
|
+
*
|
|
118
|
+
* Reads the locale per call. Copying it into a field at construction pins
|
|
119
|
+
* whatever was there before init ran, which is always `undefined` — services
|
|
120
|
+
* compose first.
|
|
121
|
+
*
|
|
122
|
+
* The catalogue behind it is memoized, because a workspace-wide validation
|
|
123
|
+
* renders once per diagnostic and the naive override — parse a JSON file,
|
|
124
|
+
* build a map — then pays that per diagnostic rather than per locale.
|
|
125
|
+
*/
|
|
126
|
+
protected render(message: ResolvedMessage): string;
|
|
127
|
+
/**
|
|
128
|
+
* Emit a failed render. Logged rather than swallowed: the fallback output is
|
|
129
|
+
* byte-identical to a correctly-configured default, so a throwing catalogue
|
|
130
|
+
* is otherwise invisible.
|
|
131
|
+
*/
|
|
132
|
+
protected reportFailure(err: unknown, carrier: string): void;
|
|
133
|
+
/** Format the failed-render line. Override to name the adopter's catalogue entry. */
|
|
134
|
+
protected formatRenderFailure(err: unknown, carrier: string): string;
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/messages/renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAKJ,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,MAAM,EACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG/D,+DAA+D;AAC/D,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,eAAe;IAC7B,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAAC;IACjD,WAAW,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC;IACnD,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;CAClG;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,sBAAuB,YAAW,eAAe;IAC3D,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAClC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IAC9C;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,QAAQ,CAAC,UAAU,sEAA6E;gBAE9F,QAAQ,EAAE,2BAA2B,EAAE,OAAO,GAAE,sBAA2B;IAKvF;;;;;;;;;;;OAWG;IACH,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM;IAUhD;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,MAAM;IAUlD;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM;IAkB/F;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS;IAI1F;;;;;;;;;;OAUG;IACH,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM;IAQlD;;;;OAIG;IACH,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAI5D,qFAAqF;IACrF,SAAS,CAAC,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;CAGtE"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
import { describeError, renderFrameworkMessage, resolve, resolvedFromResponseError } from '@hydranium/protocol';
|
|
10
|
+
import { SimpleCache } from '@hydranium/langium';
|
|
11
|
+
import { Diagnostic } from 'vscode-languageserver-protocol';
|
|
12
|
+
import { resolvedFromDiagnostic } from './carriers.js';
|
|
13
|
+
/**
|
|
14
|
+
* Renders every user-facing message the server sends, in the locale the server
|
|
15
|
+
* was handed at init. The framework ships no catalogue, so its own behaviour is
|
|
16
|
+
* a pass-through.
|
|
17
|
+
*
|
|
18
|
+
* Adopters override {@link translationsFor}: the public render methods carry
|
|
19
|
+
* the no-throw contract, and the catalogue lookup they wrap is what can fail.
|
|
20
|
+
*
|
|
21
|
+
* Two render methods rather than one, because what is useful to an adopter is
|
|
22
|
+
* the carrier's structured fields and the two carriers have different ones. A
|
|
23
|
+
* single `render(text)` would force an adopter to match English prose, which
|
|
24
|
+
* breaks on the first Langium reword.
|
|
25
|
+
*/
|
|
26
|
+
export class DefaultMessageRenderer {
|
|
27
|
+
tracer;
|
|
28
|
+
serverLocale;
|
|
29
|
+
/**
|
|
30
|
+
* {@link translationsFor}'s answer per locale, `undefined` answers included —
|
|
31
|
+
* a `SimpleCache` distinguishes "absent" from "cached as none", which matters
|
|
32
|
+
* because shipping no catalogue is the framework's own hot path.
|
|
33
|
+
*
|
|
34
|
+
* `SimpleCache` rather than Langium's `WorkspaceCache`: the eviction axis
|
|
35
|
+
* there is document change, and a catalogue does not depend on documents, so
|
|
36
|
+
* it would evict on every build AND put a `DocumentBuilder` dependency on a
|
|
37
|
+
* service the shared tier declares free of one. Nothing evicts this: the
|
|
38
|
+
* locale arrives once per process. A subclass whose catalogue can change
|
|
39
|
+
* clears it.
|
|
40
|
+
*/
|
|
41
|
+
catalogues = new SimpleCache();
|
|
42
|
+
constructor(services, options = {}) {
|
|
43
|
+
this.serverLocale = services.ServerLocale;
|
|
44
|
+
this.tracer = services.Tracer.for(options.logName ?? 'MessageRenderer').trace('instantiated');
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The sentence to publish for `diagnostic`, replacing its current `message`.
|
|
48
|
+
* Sees lexer and parser errors too, which Langium pushes onto the document
|
|
49
|
+
* without routing them through `toDiagnostic`.
|
|
50
|
+
*
|
|
51
|
+
* **Must not throw**, which is why the guard is here and not at the call
|
|
52
|
+
* site: this runs inside the `Validated` phase, and Langium's
|
|
53
|
+
* `notifyDocumentPhase` rethrows anything that is not a cancellation — so an
|
|
54
|
+
* escaping error leaves the document AT `Validated` with the phase's
|
|
55
|
+
* listeners never run, and the client receives no diagnostics for that file.
|
|
56
|
+
* A subclass overriding this method takes that contract on itself.
|
|
57
|
+
*/
|
|
58
|
+
renderDiagnostic(diagnostic) {
|
|
59
|
+
try {
|
|
60
|
+
const resolved = resolvedFromDiagnostic(diagnostic);
|
|
61
|
+
return resolved ? this.render(resolved) : Diagnostic.getMessageString(diagnostic);
|
|
62
|
+
}
|
|
63
|
+
catch (err) {
|
|
64
|
+
this.reportFailure(err, 'a diagnostic');
|
|
65
|
+
return Diagnostic.getMessageString(diagnostic);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The sentence to send for `error`, replacing its current `message`. Same
|
|
70
|
+
* no-throw contract as {@link renderDiagnostic}: an escaping error replaces a
|
|
71
|
+
* typed rejection the caller can handle with one it cannot.
|
|
72
|
+
*/
|
|
73
|
+
renderError(error) {
|
|
74
|
+
try {
|
|
75
|
+
const resolved = resolvedFromResponseError(error);
|
|
76
|
+
return resolved ? this.render(resolved) : error.message;
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
this.reportFailure(err, 'an RPC error');
|
|
80
|
+
return error.message;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The sentence for a declaration the caller holds directly, for a carrier
|
|
85
|
+
* with no slot to put an identity in.
|
|
86
|
+
*
|
|
87
|
+
* GLSP's action protocol is the case: every member of its message, status
|
|
88
|
+
* and reject actions is prose or an enum, so a code cannot travel and the
|
|
89
|
+
* raise site is the last place that still knows which message this is.
|
|
90
|
+
* Prefer {@link renderDiagnostic} / {@link renderError} wherever a carrier
|
|
91
|
+
* does hold the identity — they keep the render off the raise site, so an
|
|
92
|
+
* adopter's own messages ride the same one binding.
|
|
93
|
+
*
|
|
94
|
+
* Same no-throw contract as the carrier methods.
|
|
95
|
+
*/
|
|
96
|
+
renderMessage(message, ...params) {
|
|
97
|
+
// `resolve` is inside the guard with the render, not before it: it calls
|
|
98
|
+
// the declaration's own `format`, which for an adopter declaration is
|
|
99
|
+
// arbitrary code, and a throw there would escape a method whose contract
|
|
100
|
+
// says it cannot.
|
|
101
|
+
let resolved;
|
|
102
|
+
try {
|
|
103
|
+
resolved = resolve(message, ...params);
|
|
104
|
+
return this.render(resolved);
|
|
105
|
+
}
|
|
106
|
+
catch (err) {
|
|
107
|
+
this.reportFailure(err, `the message '${message.code}'`);
|
|
108
|
+
// Unset only when `format` ITSELF threw, which leaves the
|
|
109
|
+
// uninterpolated template as the only text there is. A failed render
|
|
110
|
+
// still has the resolved English.
|
|
111
|
+
return resolved?.text ?? message.text;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The catalogue for the current locale, or `undefined` for none — the
|
|
116
|
+
* framework's answer, shipping none. Overriding this leaves every identity
|
|
117
|
+
* decision, every pass-through and the no-throw guard in place.
|
|
118
|
+
*
|
|
119
|
+
* **Called once per locale, not once per message**, so an override may load
|
|
120
|
+
* a file or build a map without that cost landing per diagnostic. The
|
|
121
|
+
* corollary is that a catalogue mutated in place afterwards is not seen;
|
|
122
|
+
* clear {@link catalogues} to invalidate.
|
|
123
|
+
*
|
|
124
|
+
* An adopter wanting Langium's own uncoded sentences instead matches
|
|
125
|
+
* `Diagnostic.data.code` from an overridden {@link renderDiagnostic}, never
|
|
126
|
+
* the sentence.
|
|
127
|
+
*/
|
|
128
|
+
translationsFor(_locale) {
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Resolve one identity against the current locale's catalogue.
|
|
133
|
+
*
|
|
134
|
+
* Reads the locale per call. Copying it into a field at construction pins
|
|
135
|
+
* whatever was there before init ran, which is always `undefined` — services
|
|
136
|
+
* compose first.
|
|
137
|
+
*
|
|
138
|
+
* The catalogue behind it is memoized, because a workspace-wide validation
|
|
139
|
+
* renders once per diagnostic and the naive override — parse a JSON file,
|
|
140
|
+
* build a map — then pays that per diagnostic rather than per locale.
|
|
141
|
+
*/
|
|
142
|
+
render(message) {
|
|
143
|
+
const locale = this.serverLocale.value;
|
|
144
|
+
return renderFrameworkMessage(message, this.catalogues.get(locale, () => this.translationsFor(locale)));
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Emit a failed render. Logged rather than swallowed: the fallback output is
|
|
148
|
+
* byte-identical to a correctly-configured default, so a throwing catalogue
|
|
149
|
+
* is otherwise invisible.
|
|
150
|
+
*/
|
|
151
|
+
reportFailure(err, carrier) {
|
|
152
|
+
this.tracer.error(this.formatRenderFailure(err, carrier));
|
|
153
|
+
}
|
|
154
|
+
/** Format the failed-render line. Override to name the adopter's catalogue entry. */
|
|
155
|
+
formatRenderFailure(err, carrier) {
|
|
156
|
+
return `rendering ${carrier} failed; falling back to the server's own text. ${describeError(err)}`;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../src/messages/renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,aAAa,EACb,sBAAsB,EACtB,OAAO,EACP,yBAAyB,EAK3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,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,OAAe;QACxD,OAAO,aAAa,OAAO,mDAAmD,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC;IACtG,CAAC;CACH"}
|
|
@@ -23,7 +23,7 @@ export declare const DEFAULT_LATENCY_ENV = "HYDRANIUM_LATENCY";
|
|
|
23
23
|
export declare function isLatencyEnabled(): boolean;
|
|
24
24
|
/**
|
|
25
25
|
* A {@link LatencyCollector} when {@link DEFAULT_LATENCY_ENV} is set, otherwise
|
|
26
|
-
* `undefined`. Heads pass the result straight to `
|
|
26
|
+
* `undefined`. Heads pass the result straight to `lspLatencyOptions`, the
|
|
27
27
|
* `DataServer` `latency` option and the RPC binder; all three treat `undefined`
|
|
28
28
|
* as "seam off", so this single factory is the one place a head decides whether
|
|
29
29
|
* timing runs. `clock` is forwarded to the collector so tests stay deterministic.
|
|
@@ -25,7 +25,7 @@ export function isLatencyEnabled() {
|
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* A {@link LatencyCollector} when {@link DEFAULT_LATENCY_ENV} is set, otherwise
|
|
28
|
-
* `undefined`. Heads pass the result straight to `
|
|
28
|
+
* `undefined`. Heads pass the result straight to `lspLatencyOptions`, the
|
|
29
29
|
* `DataServer` `latency` option and the RPC binder; all three treat `undefined`
|
|
30
30
|
* as "seam off", so this single factory is the one place a head decides whether
|
|
31
31
|
* timing runs. `clock` is forwarded to the collector so tests stay deterministic.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-file-system-provider.d.ts","sourceRoot":"","sources":["../../src/node/node-file-system-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,GAAG,EAAY,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAIjE,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,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AAQ,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,SAAS;CAUrC;AA6BD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc;;CAE1B,CAAC"}
|
|
@@ -11,6 +11,7 @@ import { NodeFileSystemProvider } from '@hydranium/langium/node';
|
|
|
11
11
|
import { randomUUID } from 'node:crypto';
|
|
12
12
|
import { realpathSync } from 'node:fs';
|
|
13
13
|
import * as fsp from 'node:fs/promises';
|
|
14
|
+
import { renameOverOpenReaders } from './rename-over-open-readers.js';
|
|
14
15
|
import { serverSharedFactory } from '../langium/shared-services.js';
|
|
15
16
|
import { serveVirtualDocument } from '../langium/workspace/virtual-document.js';
|
|
16
17
|
/**
|
|
@@ -173,46 +174,6 @@ async function replacedFile(path) {
|
|
|
173
174
|
return undefined;
|
|
174
175
|
}
|
|
175
176
|
}
|
|
176
|
-
/**
|
|
177
|
-
* Errno values a rename reports on Windows when another handle holds the
|
|
178
|
-
* destination open. POSIX renames are unaffected by open handles, so this
|
|
179
|
-
* cannot fire there and the retry below costs nothing.
|
|
180
|
-
*/
|
|
181
|
-
const RENAME_CONTENTION_CODES = new Set(['EPERM', 'EACCES', 'EBUSY']);
|
|
182
|
-
/**
|
|
183
|
-
* `rename` the staged content over `destination`, retrying while Windows
|
|
184
|
-
* reports the destination as held open.
|
|
185
|
-
*
|
|
186
|
-
* The staging file exists so a reader never sees a half-written file, and on
|
|
187
|
-
* Windows the very presence of that reader is what makes the replacing rename
|
|
188
|
-
* fail — so the indivisible write breaks under exactly the contention it was
|
|
189
|
-
* built for, and it breaks intermittently, which is worse than never working.
|
|
190
|
-
* A reader's handle is released in milliseconds, so waiting turns a spurious
|
|
191
|
-
* failure into a slightly later success.
|
|
192
|
-
*
|
|
193
|
-
* BOUNDED, not open-ended: a genuine permission fault raises the same errno and
|
|
194
|
-
* is distinguishable from contention only by never clearing, so an unbounded
|
|
195
|
-
* wait would convert a hard error into a hang. Exhausting the budget rethrows
|
|
196
|
-
* the last failure, leaving the caller's cleanup and error contract unchanged.
|
|
197
|
-
*/
|
|
198
|
-
async function renameOverOpenReaders(staging, destination) {
|
|
199
|
-
const deadline = Date.now() + 2_000;
|
|
200
|
-
for (let attempt = 0;; attempt++) {
|
|
201
|
-
try {
|
|
202
|
-
await fsp.rename(staging, destination);
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
catch (err) {
|
|
206
|
-
const code = err instanceof Error && 'code' in err ? String(err.code) : undefined;
|
|
207
|
-
if (code === undefined || !RENAME_CONTENTION_CODES.has(code) || Date.now() >= deadline) {
|
|
208
|
-
throw err;
|
|
209
|
-
}
|
|
210
|
-
// Backs off to keep a long contention window from spinning, capped so
|
|
211
|
-
// a late attempt still lands promptly once the handle is released.
|
|
212
|
-
await new Promise(resolve => setTimeout(resolve, Math.min(2 ** attempt, 50)));
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
177
|
/**
|
|
217
178
|
* Module fragment that binds the writable Node {@link DefaultFileSystemProvider},
|
|
218
179
|
* spread into the services context on a Node host.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-file-system-provider.js","sourceRoot":"","sources":["../../src/node/node-file-system-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAGlF,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"node-file-system-provider.js","sourceRoot":"","sources":["../../src/node/node-file-system-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAGlF,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OA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AAM,CAAC;QACN,OAAO,SAAS,CAAC;IACpB,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC3B,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,yBAAyB,CAAC,QAAQ,CAAC,CAAC;CAC9F,CAAC"}
|
|
@@ -27,8 +27,8 @@ export interface ProfilingRunOptions {
|
|
|
27
27
|
/**
|
|
28
28
|
* Optional latency collector. When present, {@link ProfilingRun.finish} writes
|
|
29
29
|
* its report to `server-latency.json` and records a `server-latency` manifest artefact. A
|
|
30
|
-
* head feeds it via the RPC binding / `
|
|
31
|
-
*
|
|
30
|
+
* head feeds it via the RPC binding / `lspLatencyOptions`; a pure headless
|
|
31
|
+
* build with no request traffic leaves it empty.
|
|
32
32
|
*/
|
|
33
33
|
latency?: LatencyCollector;
|
|
34
34
|
}
|
|
@@ -57,7 +57,7 @@ export class ProfilingRun {
|
|
|
57
57
|
// `HYDRANIUM_LOG_FILE` env, which every `@hydranium/core` copy reads when
|
|
58
58
|
// its logger is CONSTRUCTED — so `ProfilingRun.start` must run before the
|
|
59
59
|
// head's services are created (as `measureModelMemory` does). This is the
|
|
60
|
-
// only mechanism that crosses
|
|
60
|
+
// only mechanism that crosses an adopter's separate core copy; a
|
|
61
61
|
// process-local `setLogFilePath` would only reach this module's own copy.
|
|
62
62
|
this.previousLogFileEnv = process.env[DEFAULT_LOG_FILE_ENV];
|
|
63
63
|
process.env[DEFAULT_LOG_FILE_ENV] = this.serverLogPath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiling-run.js","sourceRoot":"","sources":["../../src/node/profiling-run.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;GAQG;AAEH,OAAO,EACJ,oBAAoB,EACpB,wBAAwB,EAM1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;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SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;QACrG,OAAO,QAAQ,CAAC;IACnB,CAAC;CACH;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,wBAAwB,CAAC,SAAiB,EAAE,KAAa,EAAE,MAAqB;IAC7F,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;IACzD,IAAI,OAAO,GAAkC,EAAE,CAAC;IAChD,IAAI,CAAC;QACF,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;QAClE,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YACxC,OAAO,GAAG,MAAuC,CAAC;QACrD,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACN,qDAAqD;IACxD,CAAC;IACD,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,GAAG,MAAM,CAAC;IACjC,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
/**
|
|
10
|
+
* Errnos Windows raises when a replacing `rename` meets a handle already on the
|
|
11
|
+
* destination open. POSIX renames are unaffected by open handles, so these
|
|
12
|
+
* cannot fire there and the retry below costs nothing.
|
|
13
|
+
*/
|
|
14
|
+
export declare const RENAME_CONTENTION_CODES: Set<string>;
|
|
15
|
+
/**
|
|
16
|
+
* How long a replacing rename may keep retrying before it gives up.
|
|
17
|
+
*
|
|
18
|
+
* BOUNDED, not open-ended: a genuine permission fault raises the same errno as
|
|
19
|
+
* contention and is distinguishable from it only by never clearing, so an
|
|
20
|
+
* unbounded wait would convert a hard error into a hang.
|
|
21
|
+
*
|
|
22
|
+
* The figure is a judgement, not a measurement, and the honest bound on it is
|
|
23
|
+
* that the previous 2s was observed EXHAUSTED on a loaded Windows CI runner
|
|
24
|
+
* while no upper bound has been established. What would settle it is recording
|
|
25
|
+
* how long a real contended rename takes to clear. graceful-fs tolerates 60s
|
|
26
|
+
* for Windows rename contention, but that is weaker support than it looks: it
|
|
27
|
+
* retries only where the destination has GONE, which is the opposite of
|
|
28
|
+
* replacing one a reader holds open.
|
|
29
|
+
*/
|
|
30
|
+
export declare const RENAME_BUDGET_MS = 10000;
|
|
31
|
+
/** Seams for the test, which cannot make a real rename fail on demand. */
|
|
32
|
+
export interface RenameOverOpenReadersOptions {
|
|
33
|
+
readonly rename?: (from: string, to: string) => Promise<void>;
|
|
34
|
+
readonly budgetMs?: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* `rename` the staged content over `destination`, retrying while Windows
|
|
38
|
+
* reports the destination as held open.
|
|
39
|
+
*
|
|
40
|
+
* The staging file exists so a reader never sees a half-written file, and on
|
|
41
|
+
* Windows the very presence of that reader is what makes the replacing rename
|
|
42
|
+
* fail — so the indivisible write breaks under exactly the contention it was
|
|
43
|
+
* built for, and it breaks intermittently, which is worse than never working.
|
|
44
|
+
* A reader's handle is released in milliseconds, so waiting turns a spurious
|
|
45
|
+
* failure into a slightly later success.
|
|
46
|
+
*
|
|
47
|
+
* Exhausting the budget rethrows the last failure, leaving the caller's cleanup
|
|
48
|
+
* and error contract unchanged. An errno OUTSIDE the contention set is rethrown
|
|
49
|
+
* without waiting at all: retrying a fault that will not clear only delays it.
|
|
50
|
+
*/
|
|
51
|
+
export declare function renameOverOpenReaders(staging: string, destination: string, options?: RenameOverOpenReadersOptions): Promise<void>;
|
|
52
|
+
//# sourceMappingURL=rename-over-open-readers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rename-over-open-readers.d.ts","sourceRoot":"","sources":["../../src/node/rename-over-open-readers.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAIlF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,aAAwC,CAAC;AAE7E;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB,QAAS,CAAC;AAEvC,0EAA0E;AAC1E,MAAM,WAAW,4BAA4B;IAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,qBAAqB,CACxC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,4BAAiC,GAC1C,OAAO,CAAC,IAAI,CAAC,CAiBf"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
import * as fsp from 'node:fs/promises';
|
|
10
|
+
/**
|
|
11
|
+
* Errnos Windows raises when a replacing `rename` meets a handle already on the
|
|
12
|
+
* destination open. POSIX renames are unaffected by open handles, so these
|
|
13
|
+
* cannot fire there and the retry below costs nothing.
|
|
14
|
+
*/
|
|
15
|
+
export const RENAME_CONTENTION_CODES = new Set(['EPERM', 'EACCES', 'EBUSY']);
|
|
16
|
+
/**
|
|
17
|
+
* How long a replacing rename may keep retrying before it gives up.
|
|
18
|
+
*
|
|
19
|
+
* BOUNDED, not open-ended: a genuine permission fault raises the same errno as
|
|
20
|
+
* contention and is distinguishable from it only by never clearing, so an
|
|
21
|
+
* unbounded wait would convert a hard error into a hang.
|
|
22
|
+
*
|
|
23
|
+
* The figure is a judgement, not a measurement, and the honest bound on it is
|
|
24
|
+
* that the previous 2s was observed EXHAUSTED on a loaded Windows CI runner
|
|
25
|
+
* while no upper bound has been established. What would settle it is recording
|
|
26
|
+
* how long a real contended rename takes to clear. graceful-fs tolerates 60s
|
|
27
|
+
* for Windows rename contention, but that is weaker support than it looks: it
|
|
28
|
+
* retries only where the destination has GONE, which is the opposite of
|
|
29
|
+
* replacing one a reader holds open.
|
|
30
|
+
*/
|
|
31
|
+
export const RENAME_BUDGET_MS = 10_000;
|
|
32
|
+
/**
|
|
33
|
+
* `rename` the staged content over `destination`, retrying while Windows
|
|
34
|
+
* reports the destination as held open.
|
|
35
|
+
*
|
|
36
|
+
* The staging file exists so a reader never sees a half-written file, and on
|
|
37
|
+
* Windows the very presence of that reader is what makes the replacing rename
|
|
38
|
+
* fail — so the indivisible write breaks under exactly the contention it was
|
|
39
|
+
* built for, and it breaks intermittently, which is worse than never working.
|
|
40
|
+
* A reader's handle is released in milliseconds, so waiting turns a spurious
|
|
41
|
+
* failure into a slightly later success.
|
|
42
|
+
*
|
|
43
|
+
* Exhausting the budget rethrows the last failure, leaving the caller's cleanup
|
|
44
|
+
* and error contract unchanged. An errno OUTSIDE the contention set is rethrown
|
|
45
|
+
* without waiting at all: retrying a fault that will not clear only delays it.
|
|
46
|
+
*/
|
|
47
|
+
export async function renameOverOpenReaders(staging, destination, options = {}) {
|
|
48
|
+
const rename = options.rename ?? fsp.rename;
|
|
49
|
+
const deadline = Date.now() + (options.budgetMs ?? RENAME_BUDGET_MS);
|
|
50
|
+
for (let attempt = 0;; attempt++) {
|
|
51
|
+
try {
|
|
52
|
+
await rename(staging, destination);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
catch (err) {
|
|
56
|
+
const code = err instanceof Error && 'code' in err ? String(err.code) : undefined;
|
|
57
|
+
if (code === undefined || !RENAME_CONTENTION_CODES.has(code) || Date.now() >= deadline) {
|
|
58
|
+
throw err;
|
|
59
|
+
}
|
|
60
|
+
// Backs off to keep a long contention window from spinning, capped so
|
|
61
|
+
// a late attempt still lands promptly once the handle is released.
|
|
62
|
+
await new Promise(resolve => setTimeout(resolve, Math.min(2 ** attempt, 50)));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=rename-over-open-readers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rename-over-open-readers.js","sourceRoot":"","sources":["../../src/node/rename-over-open-readers.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AAExC;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AAE7E;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAQvC;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACxC,OAAe,EACf,WAAmB,EACnB,UAAwC,EAAE;IAE1C,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC;IAC5C,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC,QAAQ,IAAI,gBAAgB,CAAC,CAAC;IACrE,KAAK,IAAI,OAAO,GAAG,CAAC,GAAI,OAAO,EAAE,EAAE,CAAC;QACjC,IAAI,CAAC;YACF,MAAM,MAAM,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;YACnC,OAAO;QACV,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACrB,MAAM,IAAI,GAAG,GAAG,YAAY,KAAK,IAAI,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,MAAM,CAAE,GAA6B,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YAC7G,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,IAAI,QAAQ,EAAE,CAAC;gBACtF,MAAM,GAAG,CAAC;YACb,CAAC;YACD,sEAAsE;YACtE,mEAAmE;YACnE,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QACjF,CAAC;IACJ,CAAC;AACJ,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* SPDX-License-Identifier: MIT
|
|
8
8
|
********************************************************************************/
|
|
9
|
-
import { DocumentState, type AstNode, type LangiumDocument, type URI } from '@hydranium/langium';
|
|
9
|
+
import { DocumentState, type AstNode, type AstReflection, type LangiumDocument, type URI } from '@hydranium/langium';
|
|
10
10
|
/**
|
|
11
11
|
* Build a typed AST-node fixture for unit tests.
|
|
12
12
|
*
|
|
@@ -21,13 +21,24 @@ import { DocumentState, type AstNode, type LangiumDocument, type URI } from '@hy
|
|
|
21
21
|
* framework synthetic node, and marking it would change scope/index behaviour.
|
|
22
22
|
* A test that wants a genuine synthetic node calls `markSynthetic` explicitly.
|
|
23
23
|
*
|
|
24
|
+
* **Without a `reflection`, the fixture carries only what the test spells out**,
|
|
25
|
+
* which is a shape production never produces: a parsed or built node always has
|
|
26
|
+
* its grammar-declared containment arrays, so a fixture that omits one lets a
|
|
27
|
+
* test pass against an impossible node, and lets code that walks a list crash
|
|
28
|
+
* only under test. Pass the grammar's reflection whenever the type is a real
|
|
29
|
+
* one and the code under test reads a collection off it. Fixtures typed against
|
|
30
|
+
* ad-hoc names have no reflection to pass and keep the plain form.
|
|
31
|
+
*
|
|
24
32
|
* @param node the node shape — `$type` is required; every other property is a
|
|
25
33
|
* value the test cares about (`$container`, cross-reference values, internal
|
|
26
|
-
* `_id` fields, …).
|
|
34
|
+
* `_id` fields, …).
|
|
35
|
+
* @param reflection when given, pre-fills the grammar's declared defaults the
|
|
36
|
+
* same way {@link buildAstNode} does, and the result is a fresh object rather
|
|
37
|
+
* than `node` itself. Omitted, `node` is returned by reference.
|
|
27
38
|
*/
|
|
28
39
|
export declare function makeFakeAstNode<TAst extends AstNode = AstNode>(node: {
|
|
29
40
|
$type: string;
|
|
30
|
-
} & Record<string, unknown
|
|
41
|
+
} & Record<string, unknown>, reflection?: AstReflection): TAst;
|
|
31
42
|
/**
|
|
32
43
|
* Options for {@link makeFakeDocument}.
|
|
33
44
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fake-document.d.ts","sourceRoot":"","sources":["../../src/testing/fake-document.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,aAAa,EAAE,KAAK,OAAO,EAAE,KAAK,eAAe,EAAY,KAAK,GAAG,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"fake-document.d.ts","sourceRoot":"","sources":["../../src/testing/fake-document.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,aAAa,EAAE,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAY,KAAK,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAG/H;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,eAAe,CAAC,IAAI,SAAS,O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