@hydranium/core 1.0.0-next.10
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/LICENSE +21 -0
- package/README.md +100 -0
- package/lib/documents/ast-document-manager.d.ts +243 -0
- package/lib/documents/ast-document-manager.d.ts.map +1 -0
- package/lib/documents/ast-document-manager.js +302 -0
- package/lib/documents/ast-document-manager.js.map +1 -0
- package/lib/documents/client-ids.d.ts +30 -0
- package/lib/documents/client-ids.d.ts.map +1 -0
- package/lib/documents/client-ids.js +30 -0
- package/lib/documents/client-ids.js.map +1 -0
- package/lib/documents/hydranium-text-documents.d.ts +490 -0
- package/lib/documents/hydranium-text-documents.d.ts.map +1 -0
- package/lib/documents/hydranium-text-documents.js +893 -0
- package/lib/documents/hydranium-text-documents.js.map +1 -0
- package/lib/documents/index.d.ts +14 -0
- package/lib/documents/index.d.ts.map +1 -0
- package/lib/documents/index.js +14 -0
- package/lib/documents/index.js.map +1 -0
- package/lib/documents/language-client-text-shadow.d.ts +101 -0
- package/lib/documents/language-client-text-shadow.d.ts.map +1 -0
- package/lib/documents/language-client-text-shadow.js +156 -0
- package/lib/documents/language-client-text-shadow.js.map +1 -0
- package/lib/documents/self-save-registry.d.ts +55 -0
- package/lib/documents/self-save-registry.d.ts.map +1 -0
- package/lib/documents/self-save-registry.js +68 -0
- package/lib/documents/self-save-registry.js.map +1 -0
- package/lib/index.d.ts +38 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +39 -0
- package/lib/index.js.map +1 -0
- package/lib/langium/ast-extension/ast-extension-contribution.d.ts +33 -0
- package/lib/langium/ast-extension/ast-extension-contribution.d.ts.map +1 -0
- package/lib/langium/ast-extension/ast-extension-contribution.js +10 -0
- package/lib/langium/ast-extension/ast-extension-contribution.js.map +1 -0
- package/lib/langium/ast-extension/ast-extension-service.d.ts +212 -0
- package/lib/langium/ast-extension/ast-extension-service.d.ts.map +1 -0
- package/lib/langium/ast-extension/ast-extension-service.js +181 -0
- package/lib/langium/ast-extension/ast-extension-service.js.map +1 -0
- package/lib/langium/ast-extension/ast-node-builder.d.ts +90 -0
- package/lib/langium/ast-extension/ast-node-builder.d.ts.map +1 -0
- package/lib/langium/ast-extension/ast-node-builder.js +61 -0
- package/lib/langium/ast-extension/ast-node-builder.js.map +1 -0
- package/lib/langium/ast-extension/index.d.ts +12 -0
- package/lib/langium/ast-extension/index.d.ts.map +1 -0
- package/lib/langium/ast-extension/index.js +12 -0
- package/lib/langium/ast-extension/index.js.map +1 -0
- package/lib/langium/bootstrap.d.ts +224 -0
- package/lib/langium/bootstrap.d.ts.map +1 -0
- package/lib/langium/bootstrap.js +512 -0
- package/lib/langium/bootstrap.js.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.d.ts +77 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.d.ts.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.js +102 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.js.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass.d.ts +106 -0
- package/lib/langium/build-phase-pass/build-phase-pass.d.ts.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass.js +43 -0
- package/lib/langium/build-phase-pass/build-phase-pass.js.map +1 -0
- package/lib/langium/build-phase-pass/index.d.ts +11 -0
- package/lib/langium/build-phase-pass/index.d.ts.map +1 -0
- package/lib/langium/build-phase-pass/index.js +11 -0
- package/lib/langium/build-phase-pass/index.js.map +1 -0
- package/lib/langium/config/index.d.ts +10 -0
- package/lib/langium/config/index.d.ts.map +1 -0
- package/lib/langium/config/index.js +10 -0
- package/lib/langium/config/index.js.map +1 -0
- package/lib/langium/config/settings.d.ts +173 -0
- package/lib/langium/config/settings.d.ts.map +1 -0
- package/lib/langium/config/settings.js +196 -0
- package/lib/langium/config/settings.js.map +1 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.d.ts +109 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.d.ts.map +1 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.js +153 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.js.map +1 -0
- package/lib/langium/diagnostics/index.d.ts +14 -0
- package/lib/langium/diagnostics/index.d.ts.map +1 -0
- package/lib/langium/diagnostics/index.js +19 -0
- package/lib/langium/diagnostics/index.js.map +1 -0
- package/lib/langium/diagnostics/log-file-token.d.ts +16 -0
- package/lib/langium/diagnostics/log-file-token.d.ts.map +1 -0
- package/lib/langium/diagnostics/log-file-token.js +25 -0
- package/lib/langium/diagnostics/log-file-token.js.map +1 -0
- package/lib/langium/diagnostics/log-preamble.d.ts +42 -0
- package/lib/langium/diagnostics/log-preamble.d.ts.map +1 -0
- package/lib/langium/diagnostics/log-preamble.js +57 -0
- package/lib/langium/diagnostics/log-preamble.js.map +1 -0
- package/lib/langium/diagnostics/logger.d.ts +104 -0
- package/lib/langium/diagnostics/logger.d.ts.map +1 -0
- package/lib/langium/diagnostics/logger.js +178 -0
- package/lib/langium/diagnostics/logger.js.map +1 -0
- package/lib/langium/diagnostics/lsp-logger.d.ts +76 -0
- package/lib/langium/diagnostics/lsp-logger.d.ts.map +1 -0
- package/lib/langium/diagnostics/lsp-logger.js +223 -0
- package/lib/langium/diagnostics/lsp-logger.js.map +1 -0
- package/lib/langium/diagnostics/server-tracer.d.ts +27 -0
- package/lib/langium/diagnostics/server-tracer.d.ts.map +1 -0
- package/lib/langium/diagnostics/server-tracer.js +66 -0
- package/lib/langium/diagnostics/server-tracer.js.map +1 -0
- package/lib/langium/document-builder/build-pipeline-integration.d.ts +88 -0
- package/lib/langium/document-builder/build-pipeline-integration.d.ts.map +1 -0
- package/lib/langium/document-builder/build-pipeline-integration.js +151 -0
- package/lib/langium/document-builder/build-pipeline-integration.js.map +1 -0
- package/lib/langium/document-builder/document-builder.d.ts +405 -0
- package/lib/langium/document-builder/document-builder.d.ts.map +1 -0
- package/lib/langium/document-builder/document-builder.js +729 -0
- package/lib/langium/document-builder/document-builder.js.map +1 -0
- package/lib/langium/document-builder/index.d.ts +12 -0
- package/lib/langium/document-builder/index.d.ts.map +1 -0
- package/lib/langium/document-builder/index.js +12 -0
- package/lib/langium/document-builder/index.js.map +1 -0
- package/lib/langium/document-builder/labeled-phase-listener.d.ts +21 -0
- package/lib/langium/document-builder/labeled-phase-listener.d.ts.map +1 -0
- package/lib/langium/document-builder/labeled-phase-listener.js +15 -0
- package/lib/langium/document-builder/labeled-phase-listener.js.map +1 -0
- package/lib/langium/documentation/comment-provider.d.ts +31 -0
- package/lib/langium/documentation/comment-provider.d.ts.map +1 -0
- package/lib/langium/documentation/comment-provider.js +36 -0
- package/lib/langium/documentation/comment-provider.js.map +1 -0
- package/lib/langium/documentation/index.d.ts +10 -0
- package/lib/langium/documentation/index.d.ts.map +1 -0
- package/lib/langium/documentation/index.js +10 -0
- package/lib/langium/documentation/index.js.map +1 -0
- package/lib/langium/integration-services.d.ts +200 -0
- package/lib/langium/integration-services.d.ts.map +1 -0
- package/lib/langium/integration-services.js +65 -0
- package/lib/langium/integration-services.js.map +1 -0
- package/lib/langium/integrity/index.d.ts +12 -0
- package/lib/langium/integrity/index.d.ts.map +1 -0
- package/lib/langium/integrity/index.js +12 -0
- package/lib/langium/integrity/index.js.map +1 -0
- package/lib/langium/integrity/integrity-contribution.d.ts +42 -0
- package/lib/langium/integrity/integrity-contribution.d.ts.map +1 -0
- package/lib/langium/integrity/integrity-contribution.js +10 -0
- package/lib/langium/integrity/integrity-contribution.js.map +1 -0
- package/lib/langium/integrity/integrity-rule.d.ts +82 -0
- package/lib/langium/integrity/integrity-rule.d.ts.map +1 -0
- package/lib/langium/integrity/integrity-rule.js +52 -0
- package/lib/langium/integrity/integrity-rule.js.map +1 -0
- package/lib/langium/integrity/integrity-service.d.ts +221 -0
- package/lib/langium/integrity/integrity-service.d.ts.map +1 -0
- package/lib/langium/integrity/integrity-service.js +328 -0
- package/lib/langium/integrity/integrity-service.js.map +1 -0
- package/lib/langium/keys/default-element-key-provider.d.ts +19 -0
- package/lib/langium/keys/default-element-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/default-element-key-provider.js +18 -0
- package/lib/langium/keys/default-element-key-provider.js.map +1 -0
- package/lib/langium/keys/element-key-provider.d.ts +106 -0
- package/lib/langium/keys/element-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/element-key-provider.js +25 -0
- package/lib/langium/keys/element-key-provider.js.map +1 -0
- package/lib/langium/keys/index.d.ts +13 -0
- package/lib/langium/keys/index.d.ts.map +1 -0
- package/lib/langium/keys/index.js +13 -0
- package/lib/langium/keys/index.js.map +1 -0
- package/lib/langium/keys/name-based-key-provider.d.ts +99 -0
- package/lib/langium/keys/name-based-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/name-based-key-provider.js +134 -0
- package/lib/langium/keys/name-based-key-provider.js.map +1 -0
- package/lib/langium/keys/positional-key-provider.d.ts +41 -0
- package/lib/langium/keys/positional-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/positional-key-provider.js +48 -0
- package/lib/langium/keys/positional-key-provider.js.map +1 -0
- package/lib/langium/labeling/index.d.ts +10 -0
- package/lib/langium/labeling/index.d.ts.map +1 -0
- package/lib/langium/labeling/index.js +10 -0
- package/lib/langium/labeling/index.js.map +1 -0
- package/lib/langium/labeling/label-provider.d.ts +79 -0
- package/lib/langium/labeling/label-provider.d.ts.map +1 -0
- package/lib/langium/labeling/label-provider.js +44 -0
- package/lib/langium/labeling/label-provider.js.map +1 -0
- package/lib/langium/language-module.d.ts +281 -0
- package/lib/langium/language-module.d.ts.map +1 -0
- package/lib/langium/language-module.js +103 -0
- package/lib/langium/language-module.js.map +1 -0
- package/lib/langium/language-types.d.ts +85 -0
- package/lib/langium/language-types.d.ts.map +1 -0
- package/lib/langium/language-types.js +173 -0
- package/lib/langium/language-types.js.map +1 -0
- package/lib/langium/model-service/index.d.ts +10 -0
- package/lib/langium/model-service/index.d.ts.map +1 -0
- package/lib/langium/model-service/index.js +10 -0
- package/lib/langium/model-service/index.js.map +1 -0
- package/lib/langium/model-service/model-service.d.ts +598 -0
- package/lib/langium/model-service/model-service.d.ts.map +1 -0
- package/lib/langium/model-service/model-service.js +889 -0
- package/lib/langium/model-service/model-service.js.map +1 -0
- package/lib/langium/module.d.ts +308 -0
- package/lib/langium/module.d.ts.map +1 -0
- package/lib/langium/module.js +165 -0
- package/lib/langium/module.js.map +1 -0
- package/lib/langium/naming/index.d.ts +11 -0
- package/lib/langium/naming/index.d.ts.map +1 -0
- package/lib/langium/naming/index.js +11 -0
- package/lib/langium/naming/index.js.map +1 -0
- package/lib/langium/naming/name-provider.d.ts +360 -0
- package/lib/langium/naming/name-provider.d.ts.map +1 -0
- package/lib/langium/naming/name-provider.js +240 -0
- package/lib/langium/naming/name-provider.js.map +1 -0
- package/lib/langium/naming/name-separator-validation.d.ts +47 -0
- package/lib/langium/naming/name-separator-validation.d.ts.map +1 -0
- package/lib/langium/naming/name-separator-validation.js +61 -0
- package/lib/langium/naming/name-separator-validation.js.map +1 -0
- package/lib/langium/project/abstract-project-manager.d.ts +242 -0
- package/lib/langium/project/abstract-project-manager.d.ts.map +1 -0
- package/lib/langium/project/abstract-project-manager.js +545 -0
- package/lib/langium/project/abstract-project-manager.js.map +1 -0
- package/lib/langium/project/index.d.ts +13 -0
- package/lib/langium/project/index.d.ts.map +1 -0
- package/lib/langium/project/index.js +13 -0
- package/lib/langium/project/index.js.map +1 -0
- package/lib/langium/project/project-change-event.d.ts +64 -0
- package/lib/langium/project/project-change-event.d.ts.map +1 -0
- package/lib/langium/project/project-change-event.js +10 -0
- package/lib/langium/project/project-change-event.js.map +1 -0
- package/lib/langium/project/project-manager.d.ts +196 -0
- package/lib/langium/project/project-manager.d.ts.map +1 -0
- package/lib/langium/project/project-manager.js +10 -0
- package/lib/langium/project/project-manager.js.map +1 -0
- package/lib/langium/project/single-project-manager.d.ts +69 -0
- package/lib/langium/project/single-project-manager.d.ts.map +1 -0
- package/lib/langium/project/single-project-manager.js +104 -0
- package/lib/langium/project/single-project-manager.js.map +1 -0
- package/lib/langium/residency/cst-residency-service.d.ts +214 -0
- package/lib/langium/residency/cst-residency-service.d.ts.map +1 -0
- package/lib/langium/residency/cst-residency-service.js +349 -0
- package/lib/langium/residency/cst-residency-service.js.map +1 -0
- package/lib/langium/residency/index.d.ts +10 -0
- package/lib/langium/residency/index.d.ts.map +1 -0
- package/lib/langium/residency/index.js +10 -0
- package/lib/langium/residency/index.js.map +1 -0
- package/lib/langium/scope/ast-node-description-provider.d.ts +122 -0
- package/lib/langium/scope/ast-node-description-provider.d.ts.map +1 -0
- package/lib/langium/scope/ast-node-description-provider.js +115 -0
- package/lib/langium/scope/ast-node-description-provider.js.map +1 -0
- package/lib/langium/scope/hydranium-scope-computation.d.ts +163 -0
- package/lib/langium/scope/hydranium-scope-computation.d.ts.map +1 -0
- package/lib/langium/scope/hydranium-scope-computation.js +220 -0
- package/lib/langium/scope/hydranium-scope-computation.js.map +1 -0
- package/lib/langium/scope/hydranium-scope-provider.d.ts +411 -0
- package/lib/langium/scope/hydranium-scope-provider.d.ts.map +1 -0
- package/lib/langium/scope/hydranium-scope-provider.js +543 -0
- package/lib/langium/scope/hydranium-scope-provider.js.map +1 -0
- package/lib/langium/scope/index.d.ts +18 -0
- package/lib/langium/scope/index.d.ts.map +1 -0
- package/lib/langium/scope/index.js +18 -0
- package/lib/langium/scope/index.js.map +1 -0
- package/lib/langium/scope/reference-builder.d.ts +125 -0
- package/lib/langium/scope/reference-builder.d.ts.map +1 -0
- package/lib/langium/scope/reference-builder.js +115 -0
- package/lib/langium/scope/reference-builder.js.map +1 -0
- package/lib/langium/scope/reference-candidate-provider.d.ts +228 -0
- package/lib/langium/scope/reference-candidate-provider.d.ts.map +1 -0
- package/lib/langium/scope/reference-candidate-provider.js +185 -0
- package/lib/langium/scope/reference-candidate-provider.js.map +1 -0
- package/lib/langium/scope/scope-extension-contribution.d.ts +32 -0
- package/lib/langium/scope/scope-extension-contribution.d.ts.map +1 -0
- package/lib/langium/scope/scope-extension-contribution.js +10 -0
- package/lib/langium/scope/scope-extension-contribution.js.map +1 -0
- package/lib/langium/scope/scope-extension-service.d.ts +149 -0
- package/lib/langium/scope/scope-extension-service.d.ts.map +1 -0
- package/lib/langium/scope/scope-extension-service.js +94 -0
- package/lib/langium/scope/scope-extension-service.js.map +1 -0
- package/lib/langium/scope/scoped-ast-node-description.d.ts +160 -0
- package/lib/langium/scope/scoped-ast-node-description.d.ts.map +1 -0
- package/lib/langium/scope/scoped-ast-node-description.js +98 -0
- package/lib/langium/scope/scoped-ast-node-description.js.map +1 -0
- package/lib/langium/scope/tier-specificity.d.ts +47 -0
- package/lib/langium/scope/tier-specificity.d.ts.map +1 -0
- package/lib/langium/scope/tier-specificity.js +83 -0
- package/lib/langium/scope/tier-specificity.js.map +1 -0
- package/lib/langium/serialization/abstract-serializer.d.ts +316 -0
- package/lib/langium/serialization/abstract-serializer.d.ts.map +1 -0
- package/lib/langium/serialization/abstract-serializer.js +351 -0
- package/lib/langium/serialization/abstract-serializer.js.map +1 -0
- package/lib/langium/serialization/index.d.ts +14 -0
- package/lib/langium/serialization/index.d.ts.map +1 -0
- package/lib/langium/serialization/index.js +14 -0
- package/lib/langium/serialization/index.js.map +1 -0
- package/lib/langium/serialization/json-serializer.d.ts +106 -0
- package/lib/langium/serialization/json-serializer.d.ts.map +1 -0
- package/lib/langium/serialization/json-serializer.js +198 -0
- package/lib/langium/serialization/json-serializer.js.map +1 -0
- package/lib/langium/serialization/serialization-util.d.ts +29 -0
- package/lib/langium/serialization/serialization-util.d.ts.map +1 -0
- package/lib/langium/serialization/serialization-util.js +37 -0
- package/lib/langium/serialization/serialization-util.js.map +1 -0
- package/lib/langium/serialization/serializer.d.ts +66 -0
- package/lib/langium/serialization/serializer.d.ts.map +1 -0
- package/lib/langium/serialization/serializer.js +10 -0
- package/lib/langium/serialization/serializer.js.map +1 -0
- package/lib/langium/serialization/yaml-serializer.d.ts +166 -0
- package/lib/langium/serialization/yaml-serializer.d.ts.map +1 -0
- package/lib/langium/serialization/yaml-serializer.js +228 -0
- package/lib/langium/serialization/yaml-serializer.js.map +1 -0
- package/lib/langium/service-registry.d.ts +220 -0
- package/lib/langium/service-registry.d.ts.map +1 -0
- package/lib/langium/service-registry.js +258 -0
- package/lib/langium/service-registry.js.map +1 -0
- package/lib/langium/shared-services.d.ts +98 -0
- package/lib/langium/shared-services.d.ts.map +1 -0
- package/lib/langium/shared-services.js +30 -0
- package/lib/langium/shared-services.js.map +1 -0
- package/lib/langium/transfer/index.d.ts +10 -0
- package/lib/langium/transfer/index.d.ts.map +1 -0
- package/lib/langium/transfer/index.js +10 -0
- package/lib/langium/transfer/index.js.map +1 -0
- package/lib/langium/transfer/transfer-encoder.d.ts +294 -0
- package/lib/langium/transfer/transfer-encoder.d.ts.map +1 -0
- package/lib/langium/transfer/transfer-encoder.js +328 -0
- package/lib/langium/transfer/transfer-encoder.js.map +1 -0
- package/lib/langium/update-rewrite/index.d.ts +14 -0
- package/lib/langium/update-rewrite/index.d.ts.map +1 -0
- package/lib/langium/update-rewrite/index.js +14 -0
- package/lib/langium/update-rewrite/index.js.map +1 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.d.ts +52 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.d.ts.map +1 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.js +83 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.js.map +1 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.d.ts +37 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.d.ts.map +1 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.js +51 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.js.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.d.ts +42 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.d.ts.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.js +10 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.js.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-service.d.ts +89 -0
- package/lib/langium/update-rewrite/update-rewrite-service.d.ts.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-service.js +75 -0
- package/lib/langium/update-rewrite/update-rewrite-service.js.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite.d.ts +59 -0
- package/lib/langium/update-rewrite/update-rewrite.d.ts.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite.js +10 -0
- package/lib/langium/update-rewrite/update-rewrite.js.map +1 -0
- package/lib/langium/validation/document-validator.d.ts +106 -0
- package/lib/langium/validation/document-validator.d.ts.map +1 -0
- package/lib/langium/validation/document-validator.js +118 -0
- package/lib/langium/validation/document-validator.js.map +1 -0
- package/lib/langium/validation/index.d.ts +12 -0
- package/lib/langium/validation/index.d.ts.map +1 -0
- package/lib/langium/validation/index.js +12 -0
- package/lib/langium/validation/index.js.map +1 -0
- package/lib/langium/validation/validation-contribution-collector.d.ts +34 -0
- package/lib/langium/validation/validation-contribution-collector.d.ts.map +1 -0
- package/lib/langium/validation/validation-contribution-collector.js +51 -0
- package/lib/langium/validation/validation-contribution-collector.js.map +1 -0
- package/lib/langium/validation/validation-contribution.d.ts +36 -0
- package/lib/langium/validation/validation-contribution.d.ts.map +1 -0
- package/lib/langium/validation/validation-contribution.js +10 -0
- package/lib/langium/validation/validation-contribution.js.map +1 -0
- package/lib/langium/workspace/additional-document-contribution.d.ts +68 -0
- package/lib/langium/workspace/additional-document-contribution.d.ts.map +1 -0
- package/lib/langium/workspace/additional-document-contribution.js +23 -0
- package/lib/langium/workspace/additional-document-contribution.js.map +1 -0
- package/lib/langium/workspace/document-uri-policy.d.ts +151 -0
- package/lib/langium/workspace/document-uri-policy.d.ts.map +1 -0
- package/lib/langium/workspace/document-uri-policy.js +121 -0
- package/lib/langium/workspace/document-uri-policy.js.map +1 -0
- package/lib/langium/workspace/file-system-provider.d.ts +30 -0
- package/lib/langium/workspace/file-system-provider.d.ts.map +1 -0
- package/lib/langium/workspace/file-system-provider.js +41 -0
- package/lib/langium/workspace/file-system-provider.js.map +1 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.d.ts +45 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.d.ts.map +1 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.js +64 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.js.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-lock.d.ts +31 -0
- package/lib/langium/workspace/hydranium-workspace-lock.d.ts.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-lock.js +33 -0
- package/lib/langium/workspace/hydranium-workspace-lock.js.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-manager.d.ts +232 -0
- package/lib/langium/workspace/hydranium-workspace-manager.d.ts.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-manager.js +368 -0
- package/lib/langium/workspace/hydranium-workspace-manager.js.map +1 -0
- package/lib/langium/workspace/in-memory-file-system-provider.d.ts +127 -0
- package/lib/langium/workspace/in-memory-file-system-provider.d.ts.map +1 -0
- package/lib/langium/workspace/in-memory-file-system-provider.js +195 -0
- package/lib/langium/workspace/in-memory-file-system-provider.js.map +1 -0
- package/lib/langium/workspace/index-manager.d.ts +142 -0
- package/lib/langium/workspace/index-manager.d.ts.map +1 -0
- package/lib/langium/workspace/index-manager.js +245 -0
- package/lib/langium/workspace/index-manager.js.map +1 -0
- package/lib/langium/workspace/index.d.ts +23 -0
- package/lib/langium/workspace/index.d.ts.map +1 -0
- package/lib/langium/workspace/index.js +23 -0
- package/lib/langium/workspace/index.js.map +1 -0
- package/lib/langium/workspace/initialize-workspace.d.ts +63 -0
- package/lib/langium/workspace/initialize-workspace.d.ts.map +1 -0
- package/lib/langium/workspace/initialize-workspace.js +88 -0
- package/lib/langium/workspace/initialize-workspace.js.map +1 -0
- package/lib/langium/workspace/langium-documents.d.ts +47 -0
- package/lib/langium/workspace/langium-documents.d.ts.map +1 -0
- package/lib/langium/workspace/langium-documents.js +85 -0
- package/lib/langium/workspace/langium-documents.js.map +1 -0
- package/lib/langium/workspace/persistent-file-system-provider.d.ts +207 -0
- package/lib/langium/workspace/persistent-file-system-provider.d.ts.map +1 -0
- package/lib/langium/workspace/persistent-file-system-provider.js +208 -0
- package/lib/langium/workspace/persistent-file-system-provider.js.map +1 -0
- package/lib/langium/workspace/synthetic.d.ts +38 -0
- package/lib/langium/workspace/synthetic.d.ts.map +1 -0
- package/lib/langium/workspace/synthetic.js +58 -0
- package/lib/langium/workspace/synthetic.js.map +1 -0
- package/lib/langium/workspace/virtual-document.d.ts +78 -0
- package/lib/langium/workspace/virtual-document.d.ts.map +1 -0
- package/lib/langium/workspace/virtual-document.js +89 -0
- package/lib/langium/workspace/virtual-document.js.map +1 -0
- package/lib/langium/workspace/write-lock-scope.d.ts +69 -0
- package/lib/langium/workspace/write-lock-scope.d.ts.map +1 -0
- package/lib/langium/workspace/write-lock-scope.js +54 -0
- package/lib/langium/workspace/write-lock-scope.js.map +1 -0
- package/lib/launcher/index.d.ts +10 -0
- package/lib/launcher/index.d.ts.map +1 -0
- package/lib/launcher/index.js +12 -0
- package/lib/launcher/index.js.map +1 -0
- package/lib/launcher/integrated-server.d.ts +28 -0
- package/lib/launcher/integrated-server.d.ts.map +1 -0
- package/lib/launcher/integrated-server.js +10 -0
- package/lib/launcher/integrated-server.js.map +1 -0
- package/lib/lsp/completion/hydranium-completion-provider.d.ts +89 -0
- package/lib/lsp/completion/hydranium-completion-provider.d.ts.map +1 -0
- package/lib/lsp/completion/hydranium-completion-provider.js +123 -0
- package/lib/lsp/completion/hydranium-completion-provider.js.map +1 -0
- package/lib/lsp/hydranium-document-update-handler.d.ts +204 -0
- package/lib/lsp/hydranium-document-update-handler.d.ts.map +1 -0
- package/lib/lsp/hydranium-document-update-handler.js +288 -0
- package/lib/lsp/hydranium-document-update-handler.js.map +1 -0
- package/lib/lsp/index.d.ts +23 -0
- package/lib/lsp/index.d.ts.map +1 -0
- package/lib/lsp/index.js +23 -0
- package/lib/lsp/index.js.map +1 -0
- package/lib/lsp/instrument-connection.d.ts +36 -0
- package/lib/lsp/instrument-connection.d.ts.map +1 -0
- package/lib/lsp/instrument-connection.js +62 -0
- package/lib/lsp/instrument-connection.js.map +1 -0
- package/lib/lsp/language-module.d.ts +53 -0
- package/lib/lsp/language-module.d.ts.map +1 -0
- package/lib/lsp/language-module.js +28 -0
- package/lib/lsp/language-module.js.map +1 -0
- package/lib/lsp/semantic-token-provider.d.ts +131 -0
- package/lib/lsp/semantic-token-provider.d.ts.map +1 -0
- package/lib/lsp/semantic-token-provider.js +148 -0
- package/lib/lsp/semantic-token-provider.js.map +1 -0
- package/lib/lsp/shared-module.d.ts +76 -0
- package/lib/lsp/shared-module.d.ts.map +1 -0
- package/lib/lsp/shared-module.js +33 -0
- package/lib/lsp/shared-module.js.map +1 -0
- package/lib/lsp/start-language-server.d.ts +43 -0
- package/lib/lsp/start-language-server.d.ts.map +1 -0
- package/lib/lsp/start-language-server.js +60 -0
- package/lib/lsp/start-language-server.js.map +1 -0
- package/lib/node/ast-ground-truth.d.ts +57 -0
- package/lib/node/ast-ground-truth.d.ts.map +1 -0
- package/lib/node/ast-ground-truth.js +46 -0
- package/lib/node/ast-ground-truth.js.map +1 -0
- package/lib/node/event-loop-monitor.d.ts +40 -0
- package/lib/node/event-loop-monitor.d.ts.map +1 -0
- package/lib/node/event-loop-monitor.js +62 -0
- package/lib/node/event-loop-monitor.js.map +1 -0
- package/lib/node/index.d.ts +29 -0
- package/lib/node/index.d.ts.map +1 -0
- package/lib/node/index.js +50 -0
- package/lib/node/index.js.map +1 -0
- package/lib/node/latency-from-env.d.ts +32 -0
- package/lib/node/latency-from-env.d.ts.map +1 -0
- package/lib/node/latency-from-env.js +36 -0
- package/lib/node/latency-from-env.js.map +1 -0
- package/lib/node/lint-grammar.d.ts +87 -0
- package/lib/node/lint-grammar.d.ts.map +1 -0
- package/lib/node/lint-grammar.js +124 -0
- package/lib/node/lint-grammar.js.map +1 -0
- package/lib/node/log-file-sink.d.ts +22 -0
- package/lib/node/log-file-sink.d.ts.map +1 -0
- package/lib/node/log-file-sink.js +43 -0
- package/lib/node/log-file-sink.js.map +1 -0
- package/lib/node/log-preamble-node.d.ts +28 -0
- package/lib/node/log-preamble-node.d.ts.map +1 -0
- package/lib/node/log-preamble-node.js +55 -0
- package/lib/node/log-preamble-node.js.map +1 -0
- package/lib/node/measure-memory.d.ts +86 -0
- package/lib/node/measure-memory.d.ts.map +1 -0
- package/lib/node/measure-memory.js +128 -0
- package/lib/node/measure-memory.js.map +1 -0
- package/lib/node/memory-monitor.d.ts +42 -0
- package/lib/node/memory-monitor.d.ts.map +1 -0
- package/lib/node/memory-monitor.js +83 -0
- package/lib/node/memory-monitor.js.map +1 -0
- package/lib/node/node-file-system-provider.d.ts +112 -0
- package/lib/node/node-file-system-provider.d.ts.map +1 -0
- package/lib/node/node-file-system-provider.js +230 -0
- package/lib/node/node-file-system-provider.js.map +1 -0
- package/lib/node/process-memory.d.ts +66 -0
- package/lib/node/process-memory.d.ts.map +1 -0
- package/lib/node/process-memory.js +252 -0
- package/lib/node/process-memory.js.map +1 -0
- package/lib/node/profile-capture.d.ts +118 -0
- package/lib/node/profile-capture.d.ts.map +1 -0
- package/lib/node/profile-capture.js +315 -0
- package/lib/node/profile-capture.js.map +1 -0
- package/lib/node/profile-digest.d.ts +49 -0
- package/lib/node/profile-digest.d.ts.map +1 -0
- package/lib/node/profile-digest.js +74 -0
- package/lib/node/profile-digest.js.map +1 -0
- package/lib/node/profiling-run.d.ts +80 -0
- package/lib/node/profiling-run.d.ts.map +1 -0
- package/lib/node/profiling-run.js +183 -0
- package/lib/node/profiling-run.js.map +1 -0
- package/lib/node/reflect-grammar.d.ts +109 -0
- package/lib/node/reflect-grammar.d.ts.map +1 -0
- package/lib/node/reflect-grammar.js +96 -0
- package/lib/node/reflect-grammar.js.map +1 -0
- package/lib/node/server-diagnostics.d.ts +43 -0
- package/lib/node/server-diagnostics.d.ts.map +1 -0
- package/lib/node/server-diagnostics.js +46 -0
- package/lib/node/server-diagnostics.js.map +1 -0
- package/lib/node/server-state-snapshot.d.ts +48 -0
- package/lib/node/server-state-snapshot.d.ts.map +1 -0
- package/lib/node/server-state-snapshot.js +139 -0
- package/lib/node/server-state-snapshot.js.map +1 -0
- package/lib/node/socket-launcher.d.ts +106 -0
- package/lib/node/socket-launcher.d.ts.map +1 -0
- package/lib/node/socket-launcher.js +138 -0
- package/lib/node/socket-launcher.js.map +1 -0
- package/lib/node/stdio-launcher.d.ts +88 -0
- package/lib/node/stdio-launcher.d.ts.map +1 -0
- package/lib/node/stdio-launcher.js +83 -0
- package/lib/node/stdio-launcher.js.map +1 -0
- package/lib/node/validate-workspace.d.ts +80 -0
- package/lib/node/validate-workspace.d.ts.map +1 -0
- package/lib/node/validate-workspace.js +72 -0
- package/lib/node/validate-workspace.js.map +1 -0
- package/lib/node/write-lock-scope-node.d.ts +27 -0
- package/lib/node/write-lock-scope-node.d.ts.map +1 -0
- package/lib/node/write-lock-scope-node.js +38 -0
- package/lib/node/write-lock-scope-node.js.map +1 -0
- package/lib/testing/ast-snapshot.d.ts +38 -0
- package/lib/testing/ast-snapshot.d.ts.map +1 -0
- package/lib/testing/ast-snapshot.js +78 -0
- package/lib/testing/ast-snapshot.js.map +1 -0
- package/lib/testing/document-uri-policy-conformance.d.ts +65 -0
- package/lib/testing/document-uri-policy-conformance.d.ts.map +1 -0
- package/lib/testing/document-uri-policy-conformance.js +69 -0
- package/lib/testing/document-uri-policy-conformance.js.map +1 -0
- package/lib/testing/fake-description.d.ts +35 -0
- package/lib/testing/fake-description.d.ts.map +1 -0
- package/lib/testing/fake-description.js +38 -0
- package/lib/testing/fake-description.js.map +1 -0
- package/lib/testing/fake-document.d.ts +71 -0
- package/lib/testing/fake-document.d.ts.map +1 -0
- package/lib/testing/fake-document.js +85 -0
- package/lib/testing/fake-document.js.map +1 -0
- package/lib/testing/fake-reflection.d.ts +29 -0
- package/lib/testing/fake-reflection.d.ts.map +1 -0
- package/lib/testing/fake-reflection.js +30 -0
- package/lib/testing/fake-reflection.js.map +1 -0
- package/lib/testing/index.d.ts +44 -0
- package/lib/testing/index.d.ts.map +1 -0
- package/lib/testing/index.js +44 -0
- package/lib/testing/index.js.map +1 -0
- package/lib/testing/langium-test-helpers.d.ts +26 -0
- package/lib/testing/langium-test-helpers.d.ts.map +1 -0
- package/lib/testing/langium-test-helpers.js +26 -0
- package/lib/testing/langium-test-helpers.js.map +1 -0
- package/lib/testing/make-noop-language-services.d.ts +39 -0
- package/lib/testing/make-noop-language-services.d.ts.map +1 -0
- package/lib/testing/make-noop-language-services.js +30 -0
- package/lib/testing/make-noop-language-services.js.map +1 -0
- package/lib/testing/make-noop-shared-services.d.ts +61 -0
- package/lib/testing/make-noop-shared-services.d.ts.map +1 -0
- package/lib/testing/make-noop-shared-services.js +49 -0
- package/lib/testing/make-noop-shared-services.js.map +1 -0
- package/lib/testing/make-test-services.d.ts +217 -0
- package/lib/testing/make-test-services.d.ts.map +1 -0
- package/lib/testing/make-test-services.js +128 -0
- package/lib/testing/make-test-services.js.map +1 -0
- package/lib/testing/make-test-tracer.d.ts +67 -0
- package/lib/testing/make-test-tracer.d.ts.map +1 -0
- package/lib/testing/make-test-tracer.js +68 -0
- package/lib/testing/make-test-tracer.js.map +1 -0
- package/lib/testing/node/generated-workspace.d.ts +95 -0
- package/lib/testing/node/generated-workspace.d.ts.map +1 -0
- package/lib/testing/node/generated-workspace.js +134 -0
- package/lib/testing/node/generated-workspace.js.map +1 -0
- package/lib/testing/node/golden-corpus.d.ts +50 -0
- package/lib/testing/node/golden-corpus.d.ts.map +1 -0
- package/lib/testing/node/golden-corpus.js +80 -0
- package/lib/testing/node/golden-corpus.js.map +1 -0
- package/lib/testing/node/index.d.ts +28 -0
- package/lib/testing/node/index.d.ts.map +1 -0
- package/lib/testing/node/index.js +28 -0
- package/lib/testing/node/index.js.map +1 -0
- package/lib/testing/node/lsp-harness.d.ts +139 -0
- package/lib/testing/node/lsp-harness.d.ts.map +1 -0
- package/lib/testing/node/lsp-harness.js +119 -0
- package/lib/testing/node/lsp-harness.js.map +1 -0
- package/lib/testing/node/lsp-server-connection.d.ts +232 -0
- package/lib/testing/node/lsp-server-connection.d.ts.map +1 -0
- package/lib/testing/node/lsp-server-connection.js +304 -0
- package/lib/testing/node/lsp-server-connection.js.map +1 -0
- package/lib/testing/node/scratch-workspace.d.ts +60 -0
- package/lib/testing/node/scratch-workspace.d.ts.map +1 -0
- package/lib/testing/node/scratch-workspace.js +87 -0
- package/lib/testing/node/scratch-workspace.js.map +1 -0
- package/lib/testing/node/spawned-server.d.ts +170 -0
- package/lib/testing/node/spawned-server.d.ts.map +1 -0
- package/lib/testing/node/spawned-server.js +265 -0
- package/lib/testing/node/spawned-server.js.map +1 -0
- package/lib/testing/parse-semantic-root.d.ts +83 -0
- package/lib/testing/parse-semantic-root.d.ts.map +1 -0
- package/lib/testing/parse-semantic-root.js +119 -0
- package/lib/testing/parse-semantic-root.js.map +1 -0
- package/lib/testing/playwright/browser-capture-bridge.d.ts +80 -0
- package/lib/testing/playwright/browser-capture-bridge.d.ts.map +1 -0
- package/lib/testing/playwright/browser-capture-bridge.js +161 -0
- package/lib/testing/playwright/browser-capture-bridge.js.map +1 -0
- package/lib/testing/playwright/e2e-profiling.d.ts +132 -0
- package/lib/testing/playwright/e2e-profiling.d.ts.map +1 -0
- package/lib/testing/playwright/e2e-profiling.js +270 -0
- package/lib/testing/playwright/e2e-profiling.js.map +1 -0
- package/lib/testing/playwright/index.d.ts +13 -0
- package/lib/testing/playwright/index.d.ts.map +1 -0
- package/lib/testing/playwright/index.js +16 -0
- package/lib/testing/playwright/index.js.map +1 -0
- package/lib/testing/playwright/server-log-capture.d.ts +230 -0
- package/lib/testing/playwright/server-log-capture.d.ts.map +1 -0
- package/lib/testing/playwright/server-log-capture.js +336 -0
- package/lib/testing/playwright/server-log-capture.js.map +1 -0
- package/lib/testing/playwright/server-log-fixture.d.ts +36 -0
- package/lib/testing/playwright/server-log-fixture.d.ts.map +1 -0
- package/lib/testing/playwright/server-log-fixture.js +38 -0
- package/lib/testing/playwright/server-log-fixture.js.map +1 -0
- package/lib/testing/playwright/server-log-rename-reporter.d.ts +22 -0
- package/lib/testing/playwright/server-log-rename-reporter.d.ts.map +1 -0
- package/lib/testing/playwright/server-log-rename-reporter.js +26 -0
- package/lib/testing/playwright/server-log-rename-reporter.js.map +1 -0
- package/lib/testing/run-update-pipeline.d.ts +99 -0
- package/lib/testing/run-update-pipeline.d.ts.map +1 -0
- package/lib/testing/run-update-pipeline.js +24 -0
- package/lib/testing/run-update-pipeline.js.map +1 -0
- package/lib/testing/stub-ast-document-manager.d.ts +82 -0
- package/lib/testing/stub-ast-document-manager.d.ts.map +1 -0
- package/lib/testing/stub-ast-document-manager.js +125 -0
- package/lib/testing/stub-ast-document-manager.js.map +1 -0
- package/lib/testing/stub-document-builder.d.ts +99 -0
- package/lib/testing/stub-document-builder.d.ts.map +1 -0
- package/lib/testing/stub-document-builder.js +142 -0
- package/lib/testing/stub-document-builder.js.map +1 -0
- package/lib/testing/stub-hydranium-text-documents.d.ts +125 -0
- package/lib/testing/stub-hydranium-text-documents.d.ts.map +1 -0
- package/lib/testing/stub-hydranium-text-documents.js +164 -0
- package/lib/testing/stub-hydranium-text-documents.js.map +1 -0
- package/lib/testing/stub-index-manager.d.ts +40 -0
- package/lib/testing/stub-index-manager.d.ts.map +1 -0
- package/lib/testing/stub-index-manager.js +38 -0
- package/lib/testing/stub-index-manager.js.map +1 -0
- package/lib/testing/stub-langium-documents.d.ts +53 -0
- package/lib/testing/stub-langium-documents.d.ts.map +1 -0
- package/lib/testing/stub-langium-documents.js +62 -0
- package/lib/testing/stub-langium-documents.js.map +1 -0
- package/lib/testing/stub-model-service.d.ts +31 -0
- package/lib/testing/stub-model-service.d.ts.map +1 -0
- package/lib/testing/stub-model-service.js +45 -0
- package/lib/testing/stub-model-service.js.map +1 -0
- package/lib/testing/stub-project-manager.d.ts +43 -0
- package/lib/testing/stub-project-manager.d.ts.map +1 -0
- package/lib/testing/stub-project-manager.js +125 -0
- package/lib/testing/stub-project-manager.js.map +1 -0
- package/lib/testing/stub-self-save-registry.d.ts +31 -0
- package/lib/testing/stub-self-save-registry.d.ts.map +1 -0
- package/lib/testing/stub-self-save-registry.js +23 -0
- package/lib/testing/stub-self-save-registry.js.map +1 -0
- package/lib/testing/stub-service-registry.d.ts +95 -0
- package/lib/testing/stub-service-registry.d.ts.map +1 -0
- package/lib/testing/stub-service-registry.js +108 -0
- package/lib/testing/stub-service-registry.js.map +1 -0
- package/lib/testing/stub-writable-file-system.d.ts +42 -0
- package/lib/testing/stub-writable-file-system.d.ts.map +1 -0
- package/lib/testing/stub-writable-file-system.js +26 -0
- package/lib/testing/stub-writable-file-system.js.map +1 -0
- package/lib/util/connection-liveness.d.ts +25 -0
- package/lib/util/connection-liveness.d.ts.map +1 -0
- package/lib/util/connection-liveness.js +46 -0
- package/lib/util/connection-liveness.js.map +1 -0
- package/lib/util/environment.d.ts +53 -0
- package/lib/util/environment.d.ts.map +1 -0
- package/lib/util/environment.js +78 -0
- package/lib/util/environment.js.map +1 -0
- package/lib/util/index.d.ts +13 -0
- package/lib/util/index.d.ts.map +1 -0
- package/lib/util/index.js +18 -0
- package/lib/util/index.js.map +1 -0
- package/lib/util/registry.d.ts +88 -0
- package/lib/util/registry.d.ts.map +1 -0
- package/lib/util/registry.js +105 -0
- package/lib/util/registry.js.map +1 -0
- package/package.json +134 -0
- package/src/documents/ast-document-manager.ts +455 -0
- package/src/documents/client-ids.ts +33 -0
- package/src/documents/hydranium-text-documents.ts +1142 -0
- package/src/documents/index.ts +14 -0
- package/src/documents/language-client-text-shadow.ts +175 -0
- package/src/documents/self-save-registry.ts +81 -0
- package/src/index.ts +39 -0
- package/src/langium/ast-extension/ast-extension-contribution.ts +35 -0
- package/src/langium/ast-extension/ast-extension-service.ts +311 -0
- package/src/langium/ast-extension/ast-node-builder.ts +125 -0
- package/src/langium/ast-extension/index.ts +12 -0
- package/src/langium/bootstrap.ts +600 -0
- package/src/langium/build-phase-pass/build-phase-pass-service.ts +141 -0
- package/src/langium/build-phase-pass/build-phase-pass.ts +123 -0
- package/src/langium/build-phase-pass/index.ts +11 -0
- package/src/langium/config/index.ts +10 -0
- package/src/langium/config/settings.ts +353 -0
- package/src/langium/diagnostics/hydranium-langium-profiler.ts +187 -0
- package/src/langium/diagnostics/index.ts +19 -0
- package/src/langium/diagnostics/log-file-token.ts +26 -0
- package/src/langium/diagnostics/log-preamble.ts +87 -0
- package/src/langium/diagnostics/logger.ts +246 -0
- package/src/langium/diagnostics/lsp-logger.ts +277 -0
- package/src/langium/diagnostics/server-tracer.ts +73 -0
- package/src/langium/document-builder/build-pipeline-integration.ts +193 -0
- package/src/langium/document-builder/document-builder.ts +839 -0
- package/src/langium/document-builder/index.ts +12 -0
- package/src/langium/document-builder/labeled-phase-listener.ts +26 -0
- package/src/langium/documentation/comment-provider.ts +37 -0
- package/src/langium/documentation/index.ts +10 -0
- package/src/langium/integration-services.ts +281 -0
- package/src/langium/integrity/index.ts +12 -0
- package/src/langium/integrity/integrity-contribution.ts +44 -0
- package/src/langium/integrity/integrity-rule.ts +100 -0
- package/src/langium/integrity/integrity-service.ts +423 -0
- package/src/langium/keys/default-element-key-provider.ts +20 -0
- package/src/langium/keys/element-key-provider.ts +114 -0
- package/src/langium/keys/index.ts +13 -0
- package/src/langium/keys/name-based-key-provider.ts +146 -0
- package/src/langium/keys/positional-key-provider.ts +57 -0
- package/src/langium/labeling/index.ts +10 -0
- package/src/langium/labeling/label-provider.ts +110 -0
- package/src/langium/language-module.ts +367 -0
- package/src/langium/language-types.ts +214 -0
- package/src/langium/model-service/index.ts +10 -0
- package/src/langium/model-service/model-service.ts +1051 -0
- package/src/langium/module.ts +446 -0
- package/src/langium/naming/index.ts +11 -0
- package/src/langium/naming/name-provider.ts +533 -0
- package/src/langium/naming/name-separator-validation.ts +73 -0
- package/src/langium/project/abstract-project-manager.ts +630 -0
- package/src/langium/project/index.ts +13 -0
- package/src/langium/project/project-change-event.ts +66 -0
- package/src/langium/project/project-manager.ts +221 -0
- package/src/langium/project/single-project-manager.ts +126 -0
- package/src/langium/residency/cst-residency-service.ts +412 -0
- package/src/langium/residency/index.ts +10 -0
- package/src/langium/scope/ast-node-description-provider.ts +141 -0
- package/src/langium/scope/hydranium-scope-computation.ts +246 -0
- package/src/langium/scope/hydranium-scope-provider.ts +659 -0
- package/src/langium/scope/index.ts +18 -0
- package/src/langium/scope/reference-builder.ts +194 -0
- package/src/langium/scope/reference-candidate-provider.ts +314 -0
- package/src/langium/scope/scope-extension-contribution.ts +34 -0
- package/src/langium/scope/scope-extension-service.ts +207 -0
- package/src/langium/scope/scoped-ast-node-description.ts +174 -0
- package/src/langium/scope/tier-specificity.ts +89 -0
- package/src/langium/serialization/abstract-serializer.ts +474 -0
- package/src/langium/serialization/index.ts +14 -0
- package/src/langium/serialization/json-serializer.ts +264 -0
- package/src/langium/serialization/serialization-util.ts +40 -0
- package/src/langium/serialization/serializer.ts +68 -0
- package/src/langium/serialization/yaml-serializer.ts +348 -0
- package/src/langium/service-registry.ts +323 -0
- package/src/langium/shared-services.ts +107 -0
- package/src/langium/transfer/index.ts +10 -0
- package/src/langium/transfer/transfer-encoder.ts +434 -0
- package/src/langium/update-rewrite/index.ts +14 -0
- package/src/langium/update-rewrite/normalize-empty-strings.ts +86 -0
- package/src/langium/update-rewrite/semantic-root-rewrite.ts +57 -0
- package/src/langium/update-rewrite/update-rewrite-contribution.ts +44 -0
- package/src/langium/update-rewrite/update-rewrite-service.ts +129 -0
- package/src/langium/update-rewrite/update-rewrite.ts +60 -0
- package/src/langium/validation/document-validator.ts +188 -0
- package/src/langium/validation/index.ts +12 -0
- package/src/langium/validation/validation-contribution-collector.ts +61 -0
- package/src/langium/validation/validation-contribution.ts +38 -0
- package/src/langium/workspace/additional-document-contribution.ts +80 -0
- package/src/langium/workspace/document-uri-policy.ts +187 -0
- package/src/langium/workspace/file-system-provider.ts +52 -0
- package/src/langium/workspace/hydranium-langium-document-factory.ts +78 -0
- package/src/langium/workspace/hydranium-workspace-lock.ts +35 -0
- package/src/langium/workspace/hydranium-workspace-manager.ts +412 -0
- package/src/langium/workspace/in-memory-file-system-provider.ts +241 -0
- package/src/langium/workspace/index-manager.ts +266 -0
- package/src/langium/workspace/index.ts +23 -0
- package/src/langium/workspace/initialize-workspace.ts +102 -0
- package/src/langium/workspace/langium-documents.ts +94 -0
- package/src/langium/workspace/persistent-file-system-provider.ts +287 -0
- package/src/langium/workspace/synthetic.ts +63 -0
- package/src/langium/workspace/virtual-document.ts +94 -0
- package/src/langium/workspace/write-lock-scope.ts +88 -0
- package/src/launcher/index.ts +12 -0
- package/src/launcher/integrated-server.ts +28 -0
- package/src/lsp/completion/hydranium-completion-provider.ts +132 -0
- package/src/lsp/hydranium-document-update-handler.ts +345 -0
- package/src/lsp/index.ts +24 -0
- package/src/lsp/instrument-connection.ts +66 -0
- package/src/lsp/language-module.ts +64 -0
- package/src/lsp/semantic-token-provider.ts +215 -0
- package/src/lsp/shared-module.ts +88 -0
- package/src/lsp/start-language-server.ts +68 -0
- package/src/node/ast-ground-truth.ts +76 -0
- package/src/node/event-loop-monitor.ts +89 -0
- package/src/node/index.ts +53 -0
- package/src/node/latency-from-env.ts +39 -0
- package/src/node/lint-grammar.ts +189 -0
- package/src/node/log-file-sink.ts +43 -0
- package/src/node/log-preamble-node.ts +63 -0
- package/src/node/measure-memory.ts +196 -0
- package/src/node/memory-monitor.ts +103 -0
- package/src/node/node-file-system-provider.ts +252 -0
- package/src/node/process-memory.ts +299 -0
- package/src/node/profile-capture.ts +377 -0
- package/src/node/profile-digest.ts +112 -0
- package/src/node/profiling-run.ts +236 -0
- package/src/node/reflect-grammar.ts +182 -0
- package/src/node/server-diagnostics.ts +63 -0
- package/src/node/server-state-snapshot.ts +192 -0
- package/src/node/socket-launcher.ts +210 -0
- package/src/node/stdio-launcher.ts +150 -0
- package/src/node/validate-workspace.ts +133 -0
- package/src/node/write-lock-scope-node.ts +41 -0
- package/src/testing/ast-snapshot.ts +88 -0
- package/src/testing/document-uri-policy-conformance.ts +104 -0
- package/src/testing/fake-description.ts +52 -0
- package/src/testing/fake-document.ts +120 -0
- package/src/testing/fake-reflection.ts +39 -0
- package/src/testing/index.ts +45 -0
- package/src/testing/langium-test-helpers.ts +26 -0
- package/src/testing/make-noop-language-services.ts +47 -0
- package/src/testing/make-noop-shared-services.ts +78 -0
- package/src/testing/make-test-services.ts +356 -0
- package/src/testing/make-test-tracer.ts +92 -0
- package/src/testing/node/generated-workspace.ts +222 -0
- package/src/testing/node/golden-corpus.ts +114 -0
- package/src/testing/node/index.ts +29 -0
- package/src/testing/node/lsp-harness.ts +230 -0
- package/src/testing/node/lsp-server-connection.ts +575 -0
- package/src/testing/node/scratch-workspace.ts +137 -0
- package/src/testing/node/spawned-server.ts +447 -0
- package/src/testing/parse-semantic-root.ts +150 -0
- package/src/testing/playwright/browser-capture-bridge.ts +258 -0
- package/src/testing/playwright/e2e-profiling.ts +362 -0
- package/src/testing/playwright/index.ts +16 -0
- package/src/testing/playwright/server-log-capture.ts +433 -0
- package/src/testing/playwright/server-log-fixture.ts +57 -0
- package/src/testing/playwright/server-log-rename-reporter.ts +29 -0
- package/src/testing/run-update-pipeline.ts +113 -0
- package/src/testing/stub-ast-document-manager.ts +224 -0
- package/src/testing/stub-document-builder.ts +242 -0
- package/src/testing/stub-hydranium-text-documents.ts +270 -0
- package/src/testing/stub-index-manager.ts +79 -0
- package/src/testing/stub-langium-documents.ts +104 -0
- package/src/testing/stub-model-service.ts +72 -0
- package/src/testing/stub-project-manager.ts +161 -0
- package/src/testing/stub-self-save-registry.ts +43 -0
- package/src/testing/stub-service-registry.ts +192 -0
- package/src/testing/stub-writable-file-system.ts +58 -0
- package/src/util/connection-liveness.ts +47 -0
- package/src/util/environment.ts +88 -0
- package/src/util/index.ts +18 -0
- package/src/util/registry.ts +129 -0
|
@@ -0,0 +1,412 @@
|
|
|
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
|
+
import { asMutable, type Clock, Debouncer, Format, type Tracer } from '@hydranium/protocol';
|
|
11
|
+
import {
|
|
12
|
+
type AstNode,
|
|
13
|
+
AstUtils,
|
|
14
|
+
DocumentState,
|
|
15
|
+
type LangiumDocument,
|
|
16
|
+
type LangiumDocumentFactory,
|
|
17
|
+
type LangiumDocuments,
|
|
18
|
+
URI
|
|
19
|
+
} from '@hydranium/langium';
|
|
20
|
+
import { type HydraniumTextDocuments } from '../../documents/hydranium-text-documents.js';
|
|
21
|
+
import { type LogNameOptions } from '../diagnostics/logger.js';
|
|
22
|
+
import { type ServerSharedServicesMinimal } from '../shared-services.js';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Default priority of the CST-residency pass. Deliberately very high so it runs
|
|
26
|
+
* *last* among `Validated` build-phase passes (the registry iterates priority
|
|
27
|
+
* ascending): every other reaction to the build — an adopter's own derived-state
|
|
28
|
+
* pass included — settles while the CST is still guaranteed resident, before the
|
|
29
|
+
* residency policy arms the shed.
|
|
30
|
+
*/
|
|
31
|
+
export const CST_RESIDENCY_PASS_PRIORITY = 1_000_000;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* CST residency strategy — a discriminated union so each policy carries its own
|
|
35
|
+
* parameters and illegal states are unrepresentable (`idleMs` exists only on the
|
|
36
|
+
* shedding arm), and a further policy slots in as a new arm without reshaping
|
|
37
|
+
* the options.
|
|
38
|
+
*
|
|
39
|
+
* - `{ kind: 'always-keep' }` (default): never shed — the service is a no-op.
|
|
40
|
+
* The v0 default so wiring the service in is behaviour-neutral, and the runtime
|
|
41
|
+
* "off" toggle.
|
|
42
|
+
* - `{ kind: 'shed-closed-when-idle', idleMs }`: shed a closed document's CST
|
|
43
|
+
* once it has been idle (not in any build) for `idleMs`, keeping the AST
|
|
44
|
+
* resident. Open documents are always kept. `idleMs: 0` sheds as soon as a
|
|
45
|
+
* document is closed (a pure close-triggered threshold of this strategy).
|
|
46
|
+
*/
|
|
47
|
+
export type CstResidencyStrategy = { readonly kind: 'always-keep' } | { readonly kind: 'shed-closed-when-idle'; readonly idleMs: number };
|
|
48
|
+
|
|
49
|
+
/** Construction options for {@link CstResidencyService}. */
|
|
50
|
+
export interface CstResidencyOptions extends LogNameOptions {
|
|
51
|
+
/** Residency strategy. Default `{ kind: 'always-keep' }` (no-op). */
|
|
52
|
+
readonly strategy?: CstResidencyStrategy;
|
|
53
|
+
/** Pass priority. Default {@link CST_RESIDENCY_PASS_PRIORITY} (run last at `Validated`). */
|
|
54
|
+
readonly priority?: number;
|
|
55
|
+
/**
|
|
56
|
+
* Optional bytes-per-node figure used to annotate shed traces with an
|
|
57
|
+
* approximate reclaim. **Default `0`** — the framework traces only the exact,
|
|
58
|
+
* grammar-agnostic node count, because per-node CST size depends entirely on
|
|
59
|
+
* the grammar (token sizes, node fan-out, retained string slices) and cannot
|
|
60
|
+
* be estimated framework-side. An adopter that has measured its own workspace
|
|
61
|
+
* may pass a representative value to enrich the trace; it is used for logging
|
|
62
|
+
* only, never for any decision.
|
|
63
|
+
*/
|
|
64
|
+
readonly estimatedBytesPerShedNode?: number;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The build state a shed document must be reset to so the next build re-parses it
|
|
69
|
+
* and rebuilds its CST — and every `reference.$refNode` — before it is relinked or
|
|
70
|
+
* re-indexed (rehydration). It is `DocumentState.Changed` by necessity: the only
|
|
71
|
+
* state below `Parsed`, hence the only one that forces a re-parse rather than an
|
|
72
|
+
* in-place relink. Exposed as a named landmark of the residency feature (cf.
|
|
73
|
+
* `IntegrityService.SettledState`) so the document builder references the feature's
|
|
74
|
+
* declared recovery contract instead of a bare enum value.
|
|
75
|
+
*/
|
|
76
|
+
export const CST_REHYDRATION_RESET_STATE: DocumentState = DocumentState.Changed;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Whether `document`'s CST has been shed by a residency policy: the AST root is
|
|
80
|
+
* resident but its `$cstNode` was nulled. The built-state and present-root guards
|
|
81
|
+
* exclude the `fromModel` INVALID placeholder and not-yet-parsed documents, which
|
|
82
|
+
* legitimately have no CST. The single definition of "shed", shared by
|
|
83
|
+
* {@link CstResidencyService} and the document builder's rehydrate-on-re-entry
|
|
84
|
+
* seam so the two cannot drift.
|
|
85
|
+
*/
|
|
86
|
+
export function isCstShed(document: LangiumDocument): boolean {
|
|
87
|
+
return (
|
|
88
|
+
document.state >= DocumentState.Parsed &&
|
|
89
|
+
document.parseResult?.value !== undefined &&
|
|
90
|
+
document.parseResult.value.$cstNode === undefined
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Reattach a CST to a shed document **on demand**, without a rebuild — the
|
|
96
|
+
* read-side counterpart of the build-side rehydrate-on-re-entry seam. Re-parses
|
|
97
|
+
* the document's retained text into a throwaway document, then **grafts** the
|
|
98
|
+
* fresh CST onto the already-built, resident AST nodes — preserving AST node
|
|
99
|
+
* identity, so every cross-reference *into* this document (resolved to a resident
|
|
100
|
+
* node) keeps pointing at the same object. The duplicate AST is discarded.
|
|
101
|
+
*
|
|
102
|
+
* Why this is needed: a read-only LSP request (go-to-definition / declaration /
|
|
103
|
+
* implementation / type-definition, call/type hierarchy) reads the *target's*
|
|
104
|
+
* live CST for its range and does **not** run a build, so the build-side
|
|
105
|
+
* rehydrate never fires. Into a currently-closed (shed) file those features would
|
|
106
|
+
* otherwise return "no definition". This restores the real CST so every CST
|
|
107
|
+
* reader works unchanged — it is not a per-feature patch.
|
|
108
|
+
*
|
|
109
|
+
* **Synchronous.** Closed-document text is in memory (Langium's
|
|
110
|
+
* `createTextDocumentGetter` closes over the original string), and
|
|
111
|
+
* {@link LangiumDocumentFactory.fromString} without a `CancellationToken` takes
|
|
112
|
+
* the synchronous `create()` path. That lets the sync `getNameNode` chokepoint
|
|
113
|
+
* drive it.
|
|
114
|
+
*
|
|
115
|
+
* **Identity-preserving graft.** For each AST node (paired by pre-order index
|
|
116
|
+
* with the fresh parse) the fresh `$cstNode` is moved onto the resident node and
|
|
117
|
+
* its CST→AST back-pointer (`cstNode.astNode`) is repointed to the resident node,
|
|
118
|
+
* so CST→AST readers (`findDeclarationNodeAtOffset(root.$cstNode, …).astNode`)
|
|
119
|
+
* reach the real, linked node rather than the throwaway parse. Each
|
|
120
|
+
* `reference.$refNode` is restored the same way (paired over
|
|
121
|
+
* {@link AstUtils.streamReferences}).
|
|
122
|
+
*
|
|
123
|
+
* **Safe degrade.** If the re-parse diverges structurally from the resident AST
|
|
124
|
+
* (different node count — should not happen for unchanged text, but a guard
|
|
125
|
+
* against drift) the graft is abandoned and the document stays shed; the caller
|
|
126
|
+
* degrades exactly as it did before (no wrong attachment).
|
|
127
|
+
*
|
|
128
|
+
* **Module-private mechanism.** The public entry points are
|
|
129
|
+
* {@link CstResidencyService.rehydrateNode} / {@link CstResidencyService.rehydrate},
|
|
130
|
+
* which resolve the factory themselves and are where a future read-side residency
|
|
131
|
+
* hook lands (see their note). The graft invariants live here, unopinionated
|
|
132
|
+
* about policy — and deliberately not exported, so they cannot be invoked (or
|
|
133
|
+
* partially overridden) outside the service.
|
|
134
|
+
*
|
|
135
|
+
* @returns `true` if the document now has a resident CST (already-resident is a
|
|
136
|
+
* no-op `true`); `false` if the text is unrecoverable or the re-parse diverged.
|
|
137
|
+
*/
|
|
138
|
+
function rehydrateCst(document: LangiumDocument, factory: LangiumDocumentFactory): boolean {
|
|
139
|
+
const root = document.parseResult?.value;
|
|
140
|
+
if (root === undefined) {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
if (root.$cstNode !== undefined) {
|
|
144
|
+
return true; // already resident — idempotent
|
|
145
|
+
}
|
|
146
|
+
const text = document.textDocument?.getText();
|
|
147
|
+
if (text === undefined) {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
// No CancellationToken (3rd arg) → synchronous create() path.
|
|
151
|
+
const fresh = factory.fromString(text, document.uri);
|
|
152
|
+
const existingNodes = [...AstUtils.streamAst(root)];
|
|
153
|
+
const freshNodes = [...AstUtils.streamAst(fresh.parseResult.value)];
|
|
154
|
+
if (existingNodes.length !== freshNodes.length) {
|
|
155
|
+
return false; // structural divergence — stay shed rather than mis-attach
|
|
156
|
+
}
|
|
157
|
+
for (let index = 0; index < existingNodes.length; index++) {
|
|
158
|
+
const residentNode = existingNodes[index];
|
|
159
|
+
const freshNode = freshNodes[index];
|
|
160
|
+
const freshCst = freshNode.$cstNode;
|
|
161
|
+
asMutable(residentNode).$cstNode = freshCst;
|
|
162
|
+
if (freshCst) {
|
|
163
|
+
// The fresh composite CST node's `astNode` points at the throwaway parse;
|
|
164
|
+
// repoint it (and thus the leaf nodes that inherit via `container.astNode`)
|
|
165
|
+
// at the resident node so CST→AST navigation reaches the linked AST.
|
|
166
|
+
asMutable(freshCst).astNode = residentNode;
|
|
167
|
+
}
|
|
168
|
+
// Restore each reference's `$refNode` from the fresh parse. `streamReferences`
|
|
169
|
+
// yields a node's *own* cross-references only (not its descendants'), so this
|
|
170
|
+
// must run per node — paired by the stable key/array order a re-parse of the
|
|
171
|
+
// same text reproduces. The resolved `.ref` link is untouched (still resident).
|
|
172
|
+
const residentRefs = [...AstUtils.streamReferences(residentNode)];
|
|
173
|
+
const freshRefs = [...AstUtils.streamReferences(freshNode)];
|
|
174
|
+
if (residentRefs.length === freshRefs.length) {
|
|
175
|
+
for (let refIndex = 0; refIndex < residentRefs.length; refIndex++) {
|
|
176
|
+
asMutable(residentRefs[refIndex].reference).$refNode = freshRefs[refIndex].reference.$refNode;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return true;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Residency policy that reclaims memory by shedding the concrete syntax tree
|
|
185
|
+
* (CST) of closed documents while keeping their AST resident. Each build refreshes
|
|
186
|
+
* the idle window of the documents in its batch; when a closed, sheddable
|
|
187
|
+
* document's window elapses, every AST node's `$cstNode` and every reference's
|
|
188
|
+
* `$refNode` are nulled, and the CST root, `Range`s and `Position`s become
|
|
189
|
+
* unreachable and are collected.
|
|
190
|
+
*
|
|
191
|
+
* **Terminology.** *Residency* is the state axis (is the CST in memory? —
|
|
192
|
+
* `resident` vs `shed`); *shed* is both the act and the policy vocabulary (drop
|
|
193
|
+
* the CST and every `$refNode`, the document itself survives with its AST,
|
|
194
|
+
* links, and identity intact — deliberately NOT "evict", which would suggest the
|
|
195
|
+
* whole document leaves); *rehydrate* is the restore (re-derive the CST from the
|
|
196
|
+
* retained source text and graft it back, identity-preserving — deliberately not
|
|
197
|
+
* "reload", which would suggest bytes coming back unchanged).
|
|
198
|
+
*
|
|
199
|
+
* **Re-entry is safe.** A shed document that later re-enters a build (because it
|
|
200
|
+
* is relinked as an affected dependent, re-validated, or edited) is re-parsed
|
|
201
|
+
* first by `HydraniumDocumentBuilder.resetToState`
|
|
202
|
+
* ("rehydrate-on-re-entry"), which rebuilds the CST and every `$refNode`. That
|
|
203
|
+
* matters because Langium derives the reference index — and thus
|
|
204
|
+
* `IndexManager.isAffected` and the `segment` used by rename / find-references —
|
|
205
|
+
* from `$refNode`; without rehydration a re-index would silently drop the
|
|
206
|
+
* document's cross-references and its dependents would stop being relinked.
|
|
207
|
+
*
|
|
208
|
+
* Constructed with `(services, options)` and self-registers a `Validated`
|
|
209
|
+
* `BuildPhasePass`, which
|
|
210
|
+
* is why the framework constructs it eagerly — the pass must be registered before
|
|
211
|
+
* the first build. Shedding itself is opt-in: the bound default strategy is
|
|
212
|
+
* `always-keep`, so the pass runs and sheds nothing until an adopter rebinds the
|
|
213
|
+
* slot with a shedding strategy.
|
|
214
|
+
*
|
|
215
|
+
* **Read-side navigation under a shedding strategy.** Read-only LSP requests do
|
|
216
|
+
* not run a build, so they do not trigger the build-side rehydrate. Features that
|
|
217
|
+
* only read the document under the cursor (completion, symbols, formatting, …)
|
|
218
|
+
* see an open document, never a shed one, and index-based cross-file features
|
|
219
|
+
* (find-references, rename, workspace symbols) read the reference index — both
|
|
220
|
+
* unaffected. What does reach a shed document is anything reading a cross-file
|
|
221
|
+
* *target*: target-range navigation (go-to-definition / declaration /
|
|
222
|
+
* implementation / type & call hierarchy) reads the target's live CST for its
|
|
223
|
+
* range, and hover/completion documentation reads the target's preceding comment
|
|
224
|
+
* out of the same CST. Into a currently-closed (shed) file the CST is restored on
|
|
225
|
+
* demand by the identity-preserving graft of {@link rehydrateNode} /
|
|
226
|
+
* {@link rehydrate}, driven transparently from the framework
|
|
227
|
+
* `NameProvider.getNameNode` chokepoint, the comment provider, and
|
|
228
|
+
* `AbstractHydraniumLangiumDocuments.getOrCreateDocument`.
|
|
229
|
+
*/
|
|
230
|
+
export class CstResidencyService {
|
|
231
|
+
protected readonly strategy: CstResidencyStrategy;
|
|
232
|
+
/** Bytes-per-node for the optional reclaim estimate in traces; `0` disables it. */
|
|
233
|
+
protected readonly estimatedBytesPerShedNode: number;
|
|
234
|
+
protected readonly clock: Clock;
|
|
235
|
+
protected readonly tracer: Tracer;
|
|
236
|
+
protected readonly textDocuments: HydraniumTextDocuments;
|
|
237
|
+
protected readonly langiumDocs: LangiumDocuments;
|
|
238
|
+
/**
|
|
239
|
+
* Per-document idle timers (`shed-closed-when-idle` only). Each is a
|
|
240
|
+
* {@link Debouncer}: re-`schedule()`d every time the document is used (rides
|
|
241
|
+
* in a build batch), it fires once the document has been idle for `idleMs` and
|
|
242
|
+
* sheds it. Lazily created, keyed by URI string, reused across shed/rehydrate
|
|
243
|
+
* cycles, and all cancelled by {@link dispose}.
|
|
244
|
+
*/
|
|
245
|
+
protected readonly idleTimers = new Map<string, Debouncer>();
|
|
246
|
+
protected shedTotal = 0;
|
|
247
|
+
|
|
248
|
+
constructor(
|
|
249
|
+
protected readonly services: ServerSharedServicesMinimal,
|
|
250
|
+
options: CstResidencyOptions = {}
|
|
251
|
+
) {
|
|
252
|
+
this.strategy = options.strategy ?? { kind: 'always-keep' };
|
|
253
|
+
this.estimatedBytesPerShedNode = options.estimatedBytesPerShedNode ?? 0;
|
|
254
|
+
this.clock = services.Clock;
|
|
255
|
+
this.tracer = services.Tracer.for(options.logName ?? 'CstResidency').trace('instantiated');
|
|
256
|
+
this.textDocuments = services.workspace.TextDocuments as HydraniumTextDocuments;
|
|
257
|
+
this.langiumDocs = services.workspace.LangiumDocuments;
|
|
258
|
+
services.workspace.BuildPhasePassService.register({
|
|
259
|
+
id: 'framework:cst-residency:shed',
|
|
260
|
+
state: DocumentState.Validated,
|
|
261
|
+
priority: options.priority ?? CST_RESIDENCY_PASS_PRIORITY,
|
|
262
|
+
run: documents => this.onBuild(documents)
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Restore `document`'s shed CST on demand — the ergonomic entry point over
|
|
268
|
+
* {@link rehydrateCst} (resolves the document factory itself). No-op `true`
|
|
269
|
+
* when the CST is resident, so read-side seams call it unconditionally.
|
|
270
|
+
*
|
|
271
|
+
* **Residency note (deliberate).** Rehydration does NOT count as a "use" for
|
|
272
|
+
* the `shed-closed-when-idle` idle timer (which is refreshed only by build
|
|
273
|
+
* inclusion). Consequence: a browse-heavy but never-rebuilt closed document
|
|
274
|
+
* keeps re-grafting on each navigation rather than staying resident. This is
|
|
275
|
+
* a chosen trade-off — build-recency covers the churn motivation, and a
|
|
276
|
+
* read-side residency hook (refresh the timer / count re-grafts) is deferred
|
|
277
|
+
* until navigation latency on shed files is actually observed to hurt. This
|
|
278
|
+
* method is where that hook goes.
|
|
279
|
+
*/
|
|
280
|
+
rehydrate(document: LangiumDocument): boolean {
|
|
281
|
+
return rehydrateCst(document, this.services.workspace.LangiumDocumentFactory);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Node-level convenience over {@link rehydrate}: a resident node (its
|
|
286
|
+
* `$cstNode` is set — true for every node of a non-shed document) returns
|
|
287
|
+
* `true` without even resolving the document, so hot read paths
|
|
288
|
+
* (`getNameNode`, comment lookup) call this unconditionally.
|
|
289
|
+
*/
|
|
290
|
+
rehydrateNode(node: AstNode): boolean {
|
|
291
|
+
if (node.$cstNode !== undefined) {
|
|
292
|
+
return true;
|
|
293
|
+
}
|
|
294
|
+
return this.rehydrate(AstUtils.getDocument(node));
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* After each build, refresh the idle timer of every document in the batch: an
|
|
299
|
+
* open document keeps its CST (its timer is cancelled — formatting, hover and
|
|
300
|
+
* incremental edits need the CST), while a closed, sheddable document (re)arms
|
|
301
|
+
* its idle timer. Being relinked as a hot dependent therefore keeps a document
|
|
302
|
+
* resident, and a genuinely idle one sheds once `idleMs` elapses. No-op under
|
|
303
|
+
* `always-keep`. "Use" is build inclusion only; read-side navigation
|
|
304
|
+
* ({@link rehydrate}) deliberately does not count — see its note.
|
|
305
|
+
*/
|
|
306
|
+
protected onBuild(documents: readonly LangiumDocument[]): void {
|
|
307
|
+
if (this.strategy.kind === 'always-keep') {
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
for (const document of documents) {
|
|
311
|
+
const uri = document.uri.toString();
|
|
312
|
+
if (this.textDocuments.isOpenInAnyClient(uri)) {
|
|
313
|
+
this.idleTimers.get(uri)?.cancel();
|
|
314
|
+
continue;
|
|
315
|
+
}
|
|
316
|
+
if (!this.isSheddable(document)) {
|
|
317
|
+
continue;
|
|
318
|
+
}
|
|
319
|
+
this.idleTimerFor(uri).schedule();
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* The lazily-created idle {@link Debouncer} for `uri`. `idleMs` is read once at
|
|
325
|
+
* creation from the (necessarily `shed-closed-when-idle`) strategy; the fire
|
|
326
|
+
* handler re-resolves the live document so a shed/rehydrate cycle that replaced
|
|
327
|
+
* the document object still sheds the current one.
|
|
328
|
+
*/
|
|
329
|
+
protected idleTimerFor(uri: string): Debouncer {
|
|
330
|
+
let timer = this.idleTimers.get(uri);
|
|
331
|
+
if (timer === undefined) {
|
|
332
|
+
const idleMs = this.strategy.kind === 'shed-closed-when-idle' ? this.strategy.idleMs : 0;
|
|
333
|
+
timer = new Debouncer(this.clock, () => this.onIdle(uri), { delayMs: idleMs });
|
|
334
|
+
this.idleTimers.set(uri, timer);
|
|
335
|
+
}
|
|
336
|
+
return timer;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Idle-timer fire: shed the document's CST if it is still closed and resident.
|
|
341
|
+
* Re-checks open-state (a reopen within the window cancels the timer, but guard
|
|
342
|
+
* anyway) and resolves the current document by URI (it may have been deleted,
|
|
343
|
+
* or its object replaced by a rebuild).
|
|
344
|
+
*/
|
|
345
|
+
protected onIdle(uri: string): void {
|
|
346
|
+
if (this.textDocuments.isOpenInAnyClient(uri)) {
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
const document = this.langiumDocs.getDocument(URI.parse(uri));
|
|
350
|
+
if (document === undefined) {
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
this.shedTotal += this.shed(document);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/** Cancel and drop every idle timer — for clean shutdown and deterministic tests. */
|
|
357
|
+
dispose(): void {
|
|
358
|
+
for (const timer of this.idleTimers.values()) {
|
|
359
|
+
timer.dispose();
|
|
360
|
+
}
|
|
361
|
+
this.idleTimers.clear();
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Whether a closed document may have its CST shed. Only documents whose text
|
|
366
|
+
* a re-parse on re-entry can recover are sheddable; the default admits
|
|
367
|
+
* `file`-scheme documents (re-read from disk) and excludes synthetic / in-memory
|
|
368
|
+
* documents — e.g. built-in definitions registered under a custom URI scheme —
|
|
369
|
+
* whose text lives only in the CST and would be lost irrecoverably (a later
|
|
370
|
+
* relink would `readFile` a non-existent path). Adopters override to refine.
|
|
371
|
+
*/
|
|
372
|
+
protected isSheddable(document: LangiumDocument): boolean {
|
|
373
|
+
return document.uri.scheme === 'file';
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Shed one document's CST: null every AST node's `$cstNode` and every
|
|
378
|
+
* reference's `$refNode`. Returns the number of `$cstNode`s cleared (0 if the
|
|
379
|
+
* document is unparsed or already shed).
|
|
380
|
+
*/
|
|
381
|
+
protected shed(document: LangiumDocument): number {
|
|
382
|
+
const root = document.parseResult?.value;
|
|
383
|
+
if (root === undefined || root.$cstNode === undefined) {
|
|
384
|
+
return 0;
|
|
385
|
+
}
|
|
386
|
+
let cleared = 0;
|
|
387
|
+
for (const node of AstUtils.streamAst(root)) {
|
|
388
|
+
if (node.$cstNode) {
|
|
389
|
+
(node as { $cstNode?: unknown }).$cstNode = undefined;
|
|
390
|
+
cleared++;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
for (const reference of document.references ?? []) {
|
|
394
|
+
if (reference.$refNode) {
|
|
395
|
+
(reference as { $refNode?: unknown }).$refNode = undefined;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
if (cleared > 0) {
|
|
399
|
+
this.tracer.debug(`shed CST of ${document.uri.toString()}: ${cleared} nodes${this.estimateSuffix(cleared)}`);
|
|
400
|
+
}
|
|
401
|
+
return cleared;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* ` (~<bytes> reclaimed est.)` when {@link estimatedBytesPerShedNode} is set,
|
|
406
|
+
* else the empty string — so the exact node count is always logged and the
|
|
407
|
+
* (grammar-specific, opt-in) byte estimate is appended only when configured.
|
|
408
|
+
*/
|
|
409
|
+
protected estimateSuffix(nodeCount: number): string {
|
|
410
|
+
return this.estimatedBytesPerShedNode > 0 ? ` (~${Format.bytes(nodeCount * this.estimatedBytesPerShedNode)} reclaimed est.)` : '';
|
|
411
|
+
}
|
|
412
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
export * from './cst-residency-service.js';
|
|
@@ -0,0 +1,141 @@
|
|
|
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
|
+
import { type Tracer } from '@hydranium/protocol';
|
|
11
|
+
import { type AstNode, type AstNodeDescription, DefaultAstNodeDescriptionProvider, type LangiumDocument } from '@hydranium/langium';
|
|
12
|
+
import type { LogNameOptions } from '../diagnostics/logger.js';
|
|
13
|
+
import type { HydraniumLanguageServices } from '../language-module.js';
|
|
14
|
+
import { type DescriptionTier, type TieredAstNodeDescription } from './scoped-ast-node-description.js';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Framework `AstNodeDescriptionProvider` extension. Adds four typed
|
|
18
|
+
* factory methods aligned with the {@link TieredAstNodeDescription} four-
|
|
19
|
+
* tier visibility model:
|
|
20
|
+
*
|
|
21
|
+
* - {@link createLocal} — `tier: 'local'`; document-only (not in global index).
|
|
22
|
+
* - {@link createProject} — `tier: 'project'`; owning project only (equality filter).
|
|
23
|
+
* - {@link createPublic} — `tier: 'public'`; dependent projects only (own-project filter + closure).
|
|
24
|
+
* - {@link createUniversal} — `tier: 'universal'`; visible everywhere unconditionally.
|
|
25
|
+
*
|
|
26
|
+
* # Synthetic AST contributions
|
|
27
|
+
*
|
|
28
|
+
* Every factory requires a `LangiumDocument`. In-memory AST content with no
|
|
29
|
+
* file behind it reaches them by wrapping its root node in a virtual
|
|
30
|
+
* document through Langium's `LangiumDocumentFactory.fromModel`; see
|
|
31
|
+
* `virtualUri` for the URI-construction helper.
|
|
32
|
+
*/
|
|
33
|
+
export class HydraniumAstNodeDescriptionProvider extends DefaultAstNodeDescriptionProvider {
|
|
34
|
+
protected readonly tracer: Tracer;
|
|
35
|
+
|
|
36
|
+
constructor(services: HydraniumLanguageServices, options: LogNameOptions = {}) {
|
|
37
|
+
super(services);
|
|
38
|
+
this.tracer = services.shared.Tracer.for(options.logName ?? 'AstNodeDescriptionProvider').trace('instantiated');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Overrides the Langium base to stamp `tier: 'local'` on every plain
|
|
43
|
+
* description so no un-tiered descriptions escape into the framework
|
|
44
|
+
* filter pipeline. Callers that need a different tier must use
|
|
45
|
+
* {@link createProject}, {@link createPublic}, or {@link createUniversal}.
|
|
46
|
+
*
|
|
47
|
+
* The named factory methods bypass this override by calling
|
|
48
|
+
* `super.createDescription` to get a plain base before stamping the
|
|
49
|
+
* correct tier — so there is no create-then-overwrite cost.
|
|
50
|
+
*/
|
|
51
|
+
override createDescription(node: AstNode, name: string, document: LangiumDocument): TieredAstNodeDescription {
|
|
52
|
+
return this.toTiered(super.createDescription(node, name, document), 'local');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Build a {@link TieredAstNodeDescription} for a symbol visible only
|
|
57
|
+
* inside its document. Goes into the per-document local-symbols map
|
|
58
|
+
* via `ScopeComputation.collectLocalSymbols`; not exported into
|
|
59
|
+
* the workspace index.
|
|
60
|
+
*
|
|
61
|
+
* Local descriptions never carry `projectId` — the project filter
|
|
62
|
+
* never sees them, so a project tag would be unused.
|
|
63
|
+
*/
|
|
64
|
+
createLocal(options: { readonly node: AstNode; readonly name: string; readonly document: LangiumDocument }): TieredAstNodeDescription {
|
|
65
|
+
return this.toTiered(super.createDescription(options.node, options.name, options.document), 'local');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Build a {@link TieredAstNodeDescription} for a symbol visible inside
|
|
70
|
+
* its owning project only — the filter compares `projectId` against the
|
|
71
|
+
* source's project for equality, not for membership of the dependency
|
|
72
|
+
* closure. Cross-project access goes through the `'public'`-tier sibling
|
|
73
|
+
* that {@link createPublic} builds.
|
|
74
|
+
*
|
|
75
|
+
* `projectId` is required — the framework filter reads it directly to
|
|
76
|
+
* decide visibility instead of doing a URI → project lookup per
|
|
77
|
+
* description on the hot path. Pass the id of the project that owns
|
|
78
|
+
* `document`; the typical exporter sources it from
|
|
79
|
+
* `ProjectManager.getProject(document.uri)?.id` once per document.
|
|
80
|
+
*/
|
|
81
|
+
createProject(options: {
|
|
82
|
+
readonly node: AstNode;
|
|
83
|
+
readonly name: string;
|
|
84
|
+
readonly document: LangiumDocument;
|
|
85
|
+
readonly projectId: string;
|
|
86
|
+
}): TieredAstNodeDescription {
|
|
87
|
+
return this.toTiered(super.createDescription(options.node, options.name, options.document), 'project', options.projectId);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Build a {@link TieredAstNodeDescription} at `tier: 'public'` — the
|
|
92
|
+
* public-tier sibling of a multi-tier emission. Visible to other
|
|
93
|
+
* projects in the source's dependency closure; suppressed inside its
|
|
94
|
+
* owning project (where the `'project'`-tier sibling under a shorter
|
|
95
|
+
* name is the canonical entry).
|
|
96
|
+
*
|
|
97
|
+
* `projectId` is REQUIRED. It identifies the owning project; the
|
|
98
|
+
* framework filter reads it directly to enforce the own-project
|
|
99
|
+
* canonical filter + closure membership without a URI-to-project
|
|
100
|
+
* lookup on the hot path.
|
|
101
|
+
*
|
|
102
|
+
* Use when exporting a node under two names — a short project-internal
|
|
103
|
+
* one and a workspace-qualified one.
|
|
104
|
+
*/
|
|
105
|
+
createPublic(options: {
|
|
106
|
+
readonly node: AstNode;
|
|
107
|
+
readonly name: string;
|
|
108
|
+
readonly document: LangiumDocument;
|
|
109
|
+
readonly projectId: string;
|
|
110
|
+
}): TieredAstNodeDescription {
|
|
111
|
+
return this.toTiered(super.createDescription(options.node, options.name, options.document), 'public', options.projectId);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Build a {@link TieredAstNodeDescription} at `tier: 'universal'` —
|
|
116
|
+
* visible everywhere unconditionally. Used for synthetic / library /
|
|
117
|
+
* stdlib content with no project ownership.
|
|
118
|
+
*
|
|
119
|
+
* `projectId` is forbidden by the type signature; universal
|
|
120
|
+
* descriptions have no owning project. If the node DOES have an
|
|
121
|
+
* owning project and should participate in multi-tier emission, use
|
|
122
|
+
* {@link createPublic} instead.
|
|
123
|
+
*/
|
|
124
|
+
createUniversal(options: {
|
|
125
|
+
readonly node: AstNode;
|
|
126
|
+
readonly name: string;
|
|
127
|
+
readonly document: LangiumDocument;
|
|
128
|
+
}): TieredAstNodeDescription {
|
|
129
|
+
return this.toTiered(super.createDescription(options.node, options.name, options.document), 'universal');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Attach `tier` + `projectId` fields to a plain {@link AstNodeDescription}
|
|
134
|
+
* in place, narrowing the static type to {@link TieredAstNodeDescription}.
|
|
135
|
+
* Mutates `base` rather than copying — the input is treated as
|
|
136
|
+
* just-constructed and not aliased elsewhere.
|
|
137
|
+
*/
|
|
138
|
+
protected toTiered(base: AstNodeDescription, tier: DescriptionTier, projectId?: string): TieredAstNodeDescription {
|
|
139
|
+
return Object.assign(base, { tier, projectId }) as TieredAstNodeDescription;
|
|
140
|
+
}
|
|
141
|
+
}
|