sysml-v2-lsp 0.39.0 → 0.41.0
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/CHANGELOG.md +46 -0
- package/README.md +4 -2
- package/dist/server/browserServerMain.js +5822 -5116
- package/dist/server/mcpServer.js +4636 -4001
- package/dist/server/parseWorker.js +4022 -3921
- package/dist/server/server.js +5822 -5116
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,52 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.41.0]
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Update the pinned grammar to `v2026.09.1` (OMG release `2026-09.1`) and refresh the parser and DFA snapshot with `make update-grammar`. The lexer and parser grammars are unchanged from `v2026.09.0`; this introduces no language behavior changes.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- `sysml/model` reports an element's prefix from its own prefix and multiplicity productions (SysML 8.2.2.6.2 `RefPrefix`, `BasicUsagePrefix`, `EndUsagePrefix`, 8.2.2.6.6 `MultiplicityPart`): `modifier` now includes `ref`, `constant` and `end`, in written order; `direction` is reported for every usage, not only ports; `ordered: true` and `nonunique: true` when written. A keyword in a member's or an owned feature's declaration (e.g. a transition's trigger payload or guard), in a name or reference spelled like a keyword (`var`), or in a comment is no longer credited to the element.
|
|
14
|
+
- `readonly`, which is not a keyword in the SysML v2 grammar (KERML_-57 renamed it to `constant`), is no longer reported in `modifier` when written; completion offers `constant` instead. Resolved features have `isConstant`.
|
|
15
|
+
- `sysml/model` reports the value of every kind of usage, not only attributes, read from its own `ValuePart` (SysML 8.2.2.6.2): the expression after `=`, `:=` or `default`, with `isDefault` and `isInitial` for a default and an initial value (SysML 7.13.4). A cross subsetting (`=> x`) is no longer reported as a value.
|
|
16
|
+
- `sysml/model` reports an element's specializations from its own declaration only (SysML 8.2.2.6.1, 8.2.2.6.2), one relationship per target with its `notation`: a usage's `:>` as `subsetting` (not `specializes`), every `:>>` target as `redefinition`, and new `referenceSubsetting` (`::>`, `perform a`) and `crossSubsetting` (`=>`). A definition's `:>`, an anonymous redefinition and a transition's trigger payload are no longer reported as typings, a target keeps `$::` and a conjugated port typing's `~`, and `resolvedTypes` covers each usage with specializations of its own, its `specializes` listing the same targets.
|
|
17
|
+
|
|
18
|
+
### Deprecated
|
|
19
|
+
|
|
20
|
+
- The resolved features' `isReadonly`: use `isConstant` instead, which it always equals. It will be removed in a future release.
|
|
21
|
+
|
|
22
|
+
## [0.40.0]
|
|
23
|
+
|
|
24
|
+
### Security
|
|
25
|
+
|
|
26
|
+
- Update transitive `body-parser` to 2.4.0 (CVE-2026-111181) and `ip-address` to 10.7.5 (CVE-2026-111997) to address denial-of-service advisories.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- Update the pinned grammar to `v2026.09.0` and regenerate the parser and DFA snapshot. Typed ends such as `end occurrence source : Occurrence;` now parse in shared behavior bodies, including September's `Flows::messages`. This adopts [upstream Fix 54](https://github.com/daltskin/sysml-v2-grammar/blob/v2026.09.0/grammar/PATCHES.md#fix-54-allow-typed-ends-in-shared-non-behavior-body-items), an intentional compatibility extension to formal SysML 2.0 8.2.2.6.2, 8.2.2.9.2 and 8.2.2.17, which omit that typed-end route.
|
|
31
|
+
- Make `npm run update-grammar` use the same pinned parser/DFA refresh workflow as `make update-grammar`, rather than downloading the moving upstream main branch.
|
|
32
|
+
- Preserve syntax errors beside expressions, quoted names and notes in editor diagnostics and `sysml/validateText`, removing obsolete block-wide grammar-limitation suppression (#154). Valid arithmetic is already supported by the grammar's `ownedExpression` production.
|
|
33
|
+
- A flow definition (`flow def`) gets a symbol, owning its members, so a flow usage typed by it is no longer reported as `unresolved-type`.
|
|
34
|
+
- A message (`message`) gets a flow usage symbol, with its payload and `from`/`to` events (8.2.2.16 `Message : FlowUsage`).
|
|
35
|
+
- The payload type of a flow, succession flow or message written without a payload name (`flow of Fuel ...`, `flow of [2] Fuel ...`) is a `type` semantic token, not a `variable`.
|
|
36
|
+
- A flow payload's type is read from its typing only and as written: a payload subsetting a feature (`of p :> a.b`) has no type, and a qualified one (`of P::Fuel`) keeps its qualification.
|
|
37
|
+
- A single-quoted (unrestricted) name (`'my part'`) gets the same semantic token as a basic name (type, variable, …), not a `string` token; only a double-quoted literal is a `string` (KerML 8.2.2.3, 8.2.2.5).
|
|
38
|
+
- The type after `specializes`, `defined by` or `typed by` is a `type` semantic token, as after `:>` or `:`, not a `variable`.
|
|
39
|
+
- A keyword in the wrong place (`attribute` after a missing `;`, `def` after `succession flow`, a repeated `in` before a name) is now reported with the parser's own syntax error, not as "a reserved SysML keyword and cannot be used as a name".
|
|
40
|
+
- A definition's or usage's members include the ones it inherits (KerML 7.3.2.1, 8.2.3.5.3, 8.3.3.1.10 `Type::inheritedMemberships`): the public and protected members of the types it specializes by typing, subclassification, subsetting or redefinition, less the features redefined there. An owned member comes first, an imported one after the inherited ones.
|
|
41
|
+
- A redefined feature named after `:>>` or `redefines` is resolved from the types the redefining feature's owner specializes (KerML 8.2.3.5.1). `part part2R :>> part2;` inside `part part1S :> part1` now resolves to `part1`'s `part2` in go-to-definition, references and rename, rather than to an unrelated element of the same name elsewhere.
|
|
42
|
+
- A usage declared without a kind keyword (`x : A;`, `in p : A;`, `:>> x = 1;`, `return : Real;`) gets a reference usage symbol, like one with `ref` (7.6.4), so parameters are no longer missing and an unknown type on one is reported as `unresolved-type`.
|
|
43
|
+
- An empty declaration (`{ part w : A; }`, a lone `;`) is an anonymous reference usage, owning the members of its body.
|
|
44
|
+
- A variant naming a separately declared usage (`variant part1;`) is a reference usage owned by its variation, with that usage's name and short name, whichever of them it is referenced by (7.6.7, 8.3.6.4). Go to definition and rename on its name, and on `perform a;`, resolve it in its owning namespace, including that namespace's imports, to the usage it references rather than to itself.
|
|
45
|
+
- The outline and `sysml/model` name such a variant after a usage in another document, and name it again when that usage is renamed. A chain of variants each naming the one before it is named through to its end, however long. A variant named after itself through other variants is reported as `circular-naming`. One whose name does not settle within the budget of rounds of name resolution is reported as `naming-resolution-limit`.
|
|
46
|
+
|
|
47
|
+
### Deprecated
|
|
48
|
+
|
|
49
|
+
- `caches.symbolTables` in the `sysml/serverStats` result, and `symbolTables` in the `sysml/clearCache` result, are always 0 and will be removed in a future release: the server keeps a single workspace symbol table, built incrementally with the documents.
|
|
50
|
+
|
|
5
51
|
## [0.39.0]
|
|
6
52
|
|
|
7
53
|
### Fixed
|
package/README.md
CHANGED
|
@@ -259,13 +259,15 @@ If the base cannot be benchmarked (for example, when a PR changes server APIs th
|
|
|
259
259
|
|
|
260
260
|
## Grammar Updates
|
|
261
261
|
|
|
262
|
-
The grammar files in `grammar/` are sourced from [daltskin/sysml-v2-grammar](https://github.com/daltskin/sysml-v2-grammar).
|
|
262
|
+
The grammar files in `grammar/` are sourced from [daltskin/sysml-v2-grammar](https://github.com/daltskin/sysml-v2-grammar), pinned to `v2026.09.0` by `GRAMMAR_BRANCH` in the [Makefile](Makefile). To refresh that release, rebuild the parser, and regenerate the DFA snapshot:
|
|
263
263
|
|
|
264
264
|
```bash
|
|
265
265
|
make update-grammar
|
|
266
266
|
```
|
|
267
267
|
|
|
268
|
-
This fetches the `.g4` files, runs `npm run build`,
|
|
268
|
+
This fetches the pinned `.g4` files, runs `npm run build`, regenerates the DFA snapshot that eliminates the ANTLR4 cold-start penalty, and recompiles it. `npm run update-grammar` delegates to this same workflow and also requires Make. Run `npm run build` afterwards to include the new snapshot in the server bundles.
|
|
269
|
+
|
|
270
|
+
To adopt a newer release, update `GRAMMAR_BRANCH` first. Do not edit downloaded grammar files, generated parser outputs or the DFA snapshot by hand: grammar corrections belong in the upstream generator. `make dfa` rebuilds the parser and regenerates just the snapshot from the current grammar.
|
|
269
271
|
|
|
270
272
|
## Technology Stack
|
|
271
273
|
|