sysml-v2-lsp 0.12.0 → 0.14.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 +22 -0
- package/README.md +58 -0
- package/dist/server/mcpServer.js +8 -9
- package/dist/server/parseWorker.js +2 -2
- package/dist/server/server.js +20 -21
- package/package.json +12 -7
- package/sysml.library/Domain Libraries/Quantities and Units/SIPrefixes.sysml +45 -45
- package/sysml.library/Kernel Libraries/Kernel Semantic Library/FeatureReferencingPerformances.kerml +106 -106
- package/sysml.library/Kernel Libraries/Kernel Semantic Library/Occurrences.kerml +992 -992
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.13.0]
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Comprehensive benchmark framework (`benchmarks/`) with 6 suites: parse, symbolTable, providers, memory, throughput, folderLoad — includes CLI runner, JSON baselines, and regression detection
|
|
8
|
+
- Dependabot configuration for weekly npm and GitHub Actions dependency updates
|
|
9
|
+
- Security audit step (`npm audit --audit-level=high`) in CI pipeline
|
|
10
|
+
- Configurable `sysml.scan.skipDirectories` setting for workspace scanning
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Symbol table: O(1) `inferKind()` via `ruleIndex` lookup maps, binary-search `findSymbolAtPosition()`, reverse-index `findReferences()`, cached `getAllSymbols()`
|
|
15
|
+
- Batch parsing with shared lexer/parser singletons; token stream reuse on SLL→LL fallback
|
|
16
|
+
- Workspace scanning redesigned as 3-phase async pipeline: concurrent discovery → batched file I/O → sequential batch parse
|
|
17
|
+
- Provider caching: SemanticTokens (URI+version), DiagnosticsProvider (grammar ranges), CompletionProvider (array identity), SemanticValidator (symbol names, library names, line-offset binary search)
|
|
18
|
+
- HoverProvider uses cached diagnostics only — no longer triggers full validation on hover
|
|
19
|
+
- Parse worker builds visible token array once, shared across all post-parse analysis
|
|
20
|
+
- Removed dead `scanWorkspaceFolder` function and superseded `scripts/benchmark-parse.ts`
|
|
21
|
+
- Security: updated `hono` to fix HTML injection via JSX attribute names (GHSA-458j-xx4x-4375)
|
|
22
|
+
- Enforced consistent LF line endings via `.gitattributes`
|
|
23
|
+
- Build artifacts and Python cache excluded from version control
|
|
24
|
+
|
|
3
25
|
## [0.12.0]
|
|
4
26
|
|
|
5
27
|
### Added
|
package/README.md
CHANGED
|
@@ -118,6 +118,11 @@ sysml-v2-lsp/
|
|
|
118
118
|
│ └── mcp/ # Mermaid diagram generator
|
|
119
119
|
├── grammar/ # ANTLR4 grammar files (.g4)
|
|
120
120
|
├── sysml.library/ # SysML v2 standard library
|
|
121
|
+
├── benchmarks/ # Performance benchmark suite
|
|
122
|
+
│ ├── src/ # Runner, suites, reporters, utilities
|
|
123
|
+
│ ├── baselines/ # Saved baseline for regression detection
|
|
124
|
+
│ ├── results/ # JSON + Markdown output per run
|
|
125
|
+
│ └── fixtures/ # Synthetic .sysml files for benchmarking
|
|
121
126
|
├── examples/ # Example .sysml models
|
|
122
127
|
├── test/ # Unit tests (vitest)
|
|
123
128
|
└── package.json # Extension manifest + monorepo scripts
|
|
@@ -139,6 +144,59 @@ make update-grammar # Pull latest grammar, rebuild parser + DFA snapshot
|
|
|
139
144
|
make update-library # Pull latest SysML v2 standard library
|
|
140
145
|
make dfa # Regenerate DFA snapshot (after any grammar change)
|
|
141
146
|
make ci # Full CI pipeline (lint + build + test)
|
|
147
|
+
npm run bench # Run all benchmark suites
|
|
148
|
+
npm run bench:baseline # Save benchmark baseline
|
|
149
|
+
npm run bench:regression # Compare against baseline
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Benchmarks
|
|
153
|
+
|
|
154
|
+
A built-in benchmark suite measures parser, symbol table, LSP provider, memory, throughput, and folder-load performance. Results are written as both JSON and Markdown to `benchmarks/results/`.
|
|
155
|
+
|
|
156
|
+
### Running Benchmarks
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
npm run bench # run all suites
|
|
160
|
+
npm run bench:parse # parse suite only
|
|
161
|
+
npm run bench:providers # LSP providers suite only
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Or use the runner directly for full control:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
npx tsx benchmarks/src/runner.ts --suite parse --suite symbolTable
|
|
168
|
+
npx tsx benchmarks/src/runner.ts --runs 10 --warmup 3
|
|
169
|
+
npx tsx benchmarks/src/runner.ts --output ./my-results
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Suites
|
|
173
|
+
|
|
174
|
+
| Suite | What it measures |
|
|
175
|
+
| ------------- | ---------------------------------------------------------------------- |
|
|
176
|
+
| `parse` | ANTLR4 parse time — cold (no DFA) vs warm (DFA snapshot pre-loaded) |
|
|
177
|
+
| `symbolTable` | Symbol table build and lookup latency |
|
|
178
|
+
| `providers` | LSP features: diagnostics, hover, completion, references, rename, etc. |
|
|
179
|
+
| `memory` | Heap allocation per file and scaling behaviour |
|
|
180
|
+
| `throughput` | End-to-end lines/sec and tokens/sec across all example files |
|
|
181
|
+
| `folderLoad` | Full folder parse + symbol build (examples, standard library, all) |
|
|
182
|
+
|
|
183
|
+
### Regression Detection
|
|
184
|
+
|
|
185
|
+
Save a baseline, then compare future runs against it:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
npm run bench:baseline # save current results as baseline
|
|
189
|
+
npm run bench:regression # compare against baseline, exit 1 on regression
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
The default regression threshold is 20%. Override with `--threshold <n>`.
|
|
193
|
+
|
|
194
|
+
### Viewing Results
|
|
195
|
+
|
|
196
|
+
Each run produces a JSON file and a Markdown report in `benchmarks/results/`. To convert an existing JSON result to Markdown:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
npx tsx benchmarks/src/reporters/markdownReporter.ts benchmarks/results/<file>.json
|
|
142
200
|
```
|
|
143
201
|
|
|
144
202
|
## Grammar Updates
|