Skip to content

Latest commit

 

History

History
541 lines (346 loc) · 26.2 KB

File metadata and controls

541 lines (346 loc) · 26.2 KB

Changelog

All notable changes to the SysML v2.0 Language Support extension will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

Added

  • Prepare Release workflowprepare-release.yml automates version bumping, CHANGELOG stamping, and tag creation via GitHub Actions workflow_dispatch
  • Composite setup action.github/actions/setup/action.yml centralises Node.js setup, LSP dependency switching, and npm install across all workflows

Changed

  • Refactored ci.yml and release.yml to use the composite setup action, eliminating repeated boilerplate
  • Updated RELEASE_CHECKLIST.md to reference the new prepare-release workflow
  • Removed manual version:* and release:* npm scripts (superseded by prepare-release workflow)

Fixed

  • "Go to References" missing anonymous interface usages (#34) — downstream LSP now indexes anonymous typed interface usages (e.g. port pwrOut : ~PwrHeaterIface) in the symbol table
  • False parse errors from stale DFA states — downstream LSP retry logic now correctly detects and clears stale DFA states instead of checking pre-seed status

[0.35.0]

Fixed

  • DFA snapshot coverage — expanded warmup text with prefix metadata (#Safety, #Security), nested action def inside part def, then state succession shorthand, and nested subviews; regenerated DFA snapshot eliminating false parse errors for these constructs
  • False invalid-constraint-body warning in viewpointsrequire constraint { doc /* ... */ } inside viewpoint bodies no longer flagged as invalid
  • view-showcase.sysml syntax — corrected entry state idle to state idle in OperatingStates state def

[0.34.0]

Added

  • SysML v2 View/Viewpoint support — views with expose, filter, and render directives now drive the visualizer dropdown and diagram selection
  • Boolean filter expressionsfilter directives support or, and, not, and parenthesised grouping (e.g. filter @PartUsage or @PortUsage)
  • Textual notation rendererrender asTextualNotation displays scoped elements as monospace SysML text with coloured keywords and click-to-navigate
  • Subview hierarchy — nested view usages shown with indent in the dropdown; parentView tracked through the element tree
  • View definition inheritance — view usages inherit filter, render, and expose from their view definition type
  • Package-level filter extractionfilter directives inside package bodies are collected alongside view-body filters
  • Transitive port type hierarchy — port compatibility checks walk specialisation chains and detect common ancestors before flagging warnings
  • Viewpoint satisfaction diagnosticview-no-scope info hint when a view usage has no expose or filter
  • view-showcase.sysml sample — 17 view usages demonstrating all supported view/filter/render scenarios
  • View filter contract tests — 45 new extension tests covering boolean expressions, metaclass resolution, metadata matching, subview tracking, and render mappings
  • LSP test coverage — 13 new tests for transitive type hierarchy, viewpoint diagnostics, and symbol table view/filter/expose/rendering extraction

Fixed

  • Multi-filter AND semantics — multiple filter directives now correctly combine with AND; previously the fast path used set union (OR)

Removed

  • Dead code: unused _lastUpdateTime field and unreferenced findElementInParent() method

[0.33.0]

Added

  • LSP model cachingLspModelProvider now caches results by URI, avoiding redundant LSP requests when multiple consumers (model explorer, visualization, feature inspector, dashboard) query the same file
  • Consolidated file-change notifications — save, edit, and file-system-watcher events are debounced into a single 300ms notification per URI, eliminating up to 3 redundant panel refreshes per save
  • Parallel workspace loading — model explorer loads files in chunks of 4 concurrently instead of sequentially, improving workspace load times
  • Dependabot configuration — automated dependency updates for npm and GitHub Actions with grouped minor/patch PRs
  • npm audit in CI — lint job now runs npm audit --audit-level=high to catch known vulnerabilities
  • LSP dependency management scriptslsp:local, lsp:npm, and lsp:which scripts for switching between local and npm LSP versions

Changed

  • Updated sysml-v2-lsp dependency from 0.12.0 to 0.13.0 — batch parsing bug fixes (DFA pre-seed retry, error listener ordering, SLL error collection)
  • Upgraded typescript from 5.x to 6.0.2
  • Upgraded eslint from 9.x to 10.2.0 and @eslint/js to 10.0.1
  • Upgraded @types/node from 24.x to 25.6.0 and @types/vscode to 1.116.0
  • Upgraded cytoscape to 3.33.2 and @vscode/vsce to 3.9.0
  • Unit tests now run compiled .js output instead of using ts-node, fixing compatibility with Node 22+ ESM resolution
  • Release workflow restricted to main branch and version tags only

Fixed

  • Unit test failures on Node 22 — replaced CJS Module._resolveFilename vscode mock hook with a plain .cjs require hook that works with Node 22's ESM module resolution
  • Release workflow running on non-main branches — added branch guard (main and v* tags only)
  • CI YAML syntax errors — converted inline node -e scripts to YAML block scalars to avoid nested quote issues

Removed

  • Deprecated downlevelIteration option from tsconfig.json (unnecessary with ES2022 target, deprecated in TypeScript 6)

[0.32.0]

Changed

  • Updated sysml-v2-lsp dependency from 0.11.0 to 0.12.0

[0.31.0]

Added

  • DFA snapshot pre-seeding — ANTLR parser DFA tables are pre-built at compile time and loaded at startup, eliminating cold-start ATN simulation. Benchmarks show 35–500x faster per-file parsing and ~120x aggregate throughput improvement across files of all sizes
  • DFA self-healing — if the pre-seeded DFA has incomplete coverage for a construct, the parser automatically clears and retries with a full LL pass, then subsequent parses benefit from the corrected states

Changed

  • Updated sysml-v2-lsp dependency from 0.10.0 to 0.11.0 — DFA pre-seeding, worker DFA retry logic, cross-file requirement diagnostics, narrowed expression-operator suppression, keyword set derived from ANTLR lexer at runtime

Fixed

  • False parse errors from worker thread — worker now mirrors the main-thread DFA retry logic; raw worker diagnostics are re-derived through the diagnostics provider to apply grammar-limitation suppression
  • Flaky cancellation test — widened timing margins in loadWorkspaceModel cancellation test to eliminate race condition
  • Security: patched brace-expansion CVE (GHSA-f886-m6hf-6m8v) via npm override

[0.30.0]

Added

  • Parse orchestrator test suite — debounce, cancellation, rapid-edit, and cold/hot-start scenarios (#23)

Changed

  • Updated sysml-v2-lsp dependency from 0.9.0 to 0.10.0 — off-main-thread worker parsing, enum value recognition, early-open document queue
  • Release workflow accepts version number parameter; added warnings for failed marketplace/Open VSX publishes

[0.29.0]

Added

  • Worker thread parsing — ANTLR parsing now runs in a dedicated worker_threads thread; diagnostics appear immediately while the symbol table builds on the main thread, keeping hover/completion/go-to-def responsive
  • Parse lifecycle test suites — tests covering ModelExplorerProvider concurrency (queuing, cancellation, rapid edits, workspace/file mode transitions) and ParseOrchestrator debounce/cooldown/guard logic
  • Enum value symbol extraction — bare enum values (red;) and explicit enum values (enum red;) inside enum def bodies now produce EnumUsage symbols in the symbol table

Fixed

  • Redundant re-parsing on activationparseDebounceTimer now clears correctly after firing; 3-second cooldown on notifyServerParseDone prevents cascading re-parses during cold start
  • False-positive "no viable alternative at input 'import'" — DFA snapshot regenerated to cover bare import (without private/public prefix); server defers diagnostics for documents opened before DFA is loaded
  • False "empty enum" hintcheckEmptyEnum validator no longer flags enums with bare values as empty
  • Status bar bug fix

[0.28.0]

Added

  • Requirement satisfy/verify diagnostics — warnings for unsatisfied and unverified requirements
  • Cross-file go-to-definition — Ctrl+Click navigates to definitions in other workspace files and standard library packages
  • Library unit resolution — SI and USCustomary units (kg, foot, knot, etc.) resolve in constraint expressions

Changed

  • Updated sysml-v2-lsp dependency from 0.8.0 to 0.9.0
  • CI/release workflows updated to Node.js 22 LTS; GitHub Release action bumped to v4
  • Sequence diagram spacing adapts to label width; long labels truncated with tooltip

Fixed

  • False-positive syntax errors suppressed — arithmetic operators, collection expressions (->select, ->collect), and unit expressions (W/m^2) no longer flagged inside block bodies
  • Concatenated type names
  • Keyword validatorcollect, xor, null, implies no longer flagged as misspelled keywords

[0.27.0]

Added

  • Metadata visualizationmetadata def and metadata elements now render as first-class structural nodes in diagram views
  • Base type display on nodes — diagram nodes show specialization and typing relationships using SysML notation (:> for definitions, : for usages)
  • Attribute values in diagram nodes — definition nodes display attribute values inline

Changed

  • Updated sysml-v2-lsp dependency from 0.7.0 to 0.8.0
    • Fixed extractName() picking up prefix metadata annotation names instead of element names
    • Metadata annotations extracted and emitted in model DTOs

Fixed

  • Metadata keyword text colourmetadata def and metadata keywords now render in purple (#D4A5FF) instead of falling through to the grey default

[0.26.0]

Added

  • Model Explorer package context menu action: View Model Dashboard
  • Model Dashboard now support workspaces

Changed

  • LSP updated to 0.7.0
    • Improved semantic validation
    • New quick fix actions
    • Model Complexity Index calculation tweaks
    • Model Dashboard workspace targeting UI: file/semantic mode toggle with filtered target dropdown
    • Updated to OMG 2026-02 - SysML v2 Release

Fixed

  • Visualizer filter reliability across diagram data sources (including non-standard element collections)
  • State transition rendering for qualified names and selected-machine transition mapping
  • Webview disposal race conditions in visualizer updates/postMessage paths
  • Model Dashboard auto-refresh on file changes while open

[0.25.0]

Added

  • Comprehensive test suite — new test files covering CodeLens, diagram buttons, editing features, MCP server, Model Explorer integration, performance and visualization panel (224 tests total, 176 unit + 48 integration)
  • CI pipeline restructured — split into 3 parallel jobs: lint, unit-tests, and integration-tests (runs after lint + unit pass)
  • Release pipeline test gatetest job must pass before the release job runs

Changed

  • Updated sysml-v2-lsp dependency from 0.5.1 to 0.6.0
  • Makefile: make test runs unit tests only; make test-integration runs the full Extension Host suite

Fixed

  • end port validation false positive (#15) — parser erroneously rejected end port, end part, end item, and other end <keyword> syntax in interface/connection definitions; root cause was a stale DFA snapshot in the LSP server that didn't cover the new grammar paths
  • DFA snapshot robustness — LSP parser now retries with a cleared DFA when pre-seeded states produce parse errors, preventing stale snapshots from causing silent failures

[0.24.0]

Changed

  • Updated sysml-v2-lsp dependency from 0.5.0 to 0.5.1 (enhanced code actions with structured diagnostic data, qualified name resolution)
  • Simplified CI configuration by removing Node.js version matrix

[0.23.0]

Changed

  • Updated sysml-v2-lsp dependency from 0.4.1 to 0.5.0

Fixed

  • Removed minimatch override from package.json

[0.22.0]

Added

  • Feature Inspector panel (src/panels/featureInspectorPanel.ts) — cursor-tracking webview showing resolved type information, specialization breadcrumbs, feature tables with direction/multiplicity/modifier badges, clickable type drill-down, and navigation history with back button
  • Feature Explorer tree view (src/explorer/featureExplorerProvider.ts) — master-detail sidebar showing resolved type info, specialization chains, and feature groups (parts, ports, attributes, etc.) for the selected definition
  • Model Complexity Index (MCI) — status bar indicator (0–100 score) with hotspot detection for complex elements, documentation coverage, coupling analysis, and textual rating
  • Model Explorer workspace modes — toggle between By File and Semantic Model views; workspace-wide model loaded automatically for .code-workspace projects; active document auto-revealed in tree
  • Diagnostic-reactive status bar — live error/warning counts with colour-coded icons ($(error) / $(warning) / $(check)); click to open the Problems panel
  • LSP server health in status bar tooltip — uptime, heap/RSS memory usage, and cache statistics (documents, symbol tables, semantic tokens)
  • SysML: Show Type Hierarchy command — surfaces VS Code's built-in type hierarchy view for SysML definitions
  • SysML: Show Call Hierarchy command — surfaces VS Code's built-in call hierarchy view for action/state invocations
  • SysML: Toggle View: By File / Semantic Model command — switch Model Explorer between file-based and semantic views
  • Workspace pre-parsing settingssysml.workspace.preloadOnOpen (always / workspaceOnly / never) and sysml.workspace.excludePatterns (glob array)
  • Camera Example multi-file sample (samples/Camera Example/) — .code-workspace with 8 SysML files covering General View, Interconnection View, Activity, Sequence, State, and Use Case diagrams
  • Animated parse progress indicator — status bar animation showing parse stages (assembling model, building blocks, linking elements) with real-time progress feedback

Changed

  • SysML: Clear Parse Cache enhanced — now flushes server caches (documents, symbol tables, semantic token sets) with reported counts, then re-parses the active file immediately
  • Model Dashboard updated with Model Complexity Index display and build timing metrics
  • ESLint configuration modernised — flat config format with browser globals for webview JS, Node globals for scripts, vendor files ignored, type-checked TypeScript linting

Fixed

  • ESLint errors in browser JS — added proper environment globals for media/game/, media/webview/, and scripts/ files; ignored third-party vendor bundles and .venv directory

[0.21.0]

Added

  • LSP model provider (src/providers/lspModelProvider.ts) — sends sysml/model requests to the language server for structured model data
  • Model type definitions (src/providers/sysmlModelTypes.ts) — shared TypeScript types for elements, relationships, and model statistics
  • Model Dashboard panel (src/panels/modelDashboardPanel.ts) — webview dashboard showing model statistics and build timing
  • Go-to-Definition for library imports — navigate to standard library definitions from import statements
  • modelBuildTimeMs timing metric — real ANTLR parse time from the LSP server, reported consistently across status bar, dashboard, and output log

Changed

  • Architecture: complete migration to LSP-only model — visualization panel and model explorer now use sysml/model LSP requests instead of the in-extension ANTLR parser; the extension no longer bundles any parser, resolver, or library code
  • Visualization panel refactored (src/visualization/visualizationPanel.ts) — rebuilt to consume LSP model data directly
  • Model Explorer refactored (src/explorer/modelExplorerProvider.ts) — uses LSP model provider instead of in-extension parser
  • Extension activation refactored (src/extension.ts) — streamlined for LSP-only architecture

Fixed

  • LSP cold-start race condition — model explorer and visualization now wait for the server to be ready
  • Filename encoding in logs — spaces in filenames are properly handled

Removed

  • In-extension ANTLR parser (src/parser/) — antlrSysMLParser.ts, sysmlParser.ts, parserWorker.ts, parserWorkerHost.ts, libraryIndexer.ts, vscodeMock.ts, and generated/ directory
  • Semantic resolver (src/resolver/) — resolver.ts, diagnostics.ts, types.ts, index.ts
  • Library service (src/library/) — service.ts, cacheManager.ts, compiler.ts, types.ts, index.ts
  • Grammar files (grammar/) — SysMLv2Lexer.g4, SysMLv2Parser.g4
  • sysml.library/ directory — standard library files now bundled in the LSP server
  • antlr4 runtime dependency

[0.20.0]

Fixed

  • Comprehensive keyword validator fix: eliminated ~100 false-positive "Unexpected identifier where a SysML keyword was expected" diagnostics by adding missing tokens to NAME_PRECEDING_KEYWORDS — covers KerML elements, annotations, control nodes, reference-preceding keywords, succession/flow tokens, relationship keywords, modifiers, visibility keywords, and punctuation (e.g. attribute redefines, <'short-name'> identifier, exhibit, perform, include, etc.)

Changed

  • Updated sysml-v2-lsp dependency from 0.1.6 to 0.1.7

[0.19.0]

Added

  • Semantic validation for enum literals: warns when enumeration members inside enum def are missing the required enum keyword prefix (e.g. bare condenser; → should be enum condenser;)
  • Missing import detection: warns when standard-library types (String, Integer, Boolean, Real, Natural, Number, Complex) are used without the corresponding import ScalarValues::* (or NumericalValues::*) statement, with a suggested fix
  • Semantic diagnostics surface in Problems panel: resolver warnings (enum keyword, missing imports, unresolved types) now appear as VS Code diagnostics alongside LSP diagnostics
  • Enumeration literals are now properly extracted into the structural diagram data (previously always empty)

Fixed

  • MCP / Visualizer parser alignment: the extension's semantic resolver now detects issues that the MCP parse / validate tools miss (permissive ANTLR grammar accepts ENUM? optional), preventing the false-confidence loop where MCP reports 0 errors but the visualizer shows "Parse Error"
  • sysml.validateModel command now runs the full semantic resolution pass instead of only showing LSP diagnostic count

Changed

  • Updated sysml-v2-lsp dependency from 0.1.5 to 0.1.6

[0.18.0]

Added

  • RC car sample model (samples/rc-car.sysml) — 540-line SysML v2 example with activity, sequence, and state machine diagrams

Fixed

  • MCP server registration: replaced broken require('sysml-v2-lsp') with direct path resolution — fixes "Tried to use SysML v2 tools but was blocked" in Copilot agent mode
  • Removed duplicate MCP server definitions from .vscode/settings.json, .vscode/mcp.json, and samples/.vscode/ that caused two servers to appear in the debug host

Changed

  • Updated sysml-v2-lsp dependency from 0.1.4 to 0.1.5
  • MCP server now registered programmatically by the extension only (single sysml-v2-mcp provider)

[0.17.0]

Added

  • Language Server Protocol (LSP) integration via the sysml-v2-lsp package — all language intelligence features (diagnostics, completions, hover, go-to-definition, references, rename, formatting, code actions, semantic tokens, CodeLens, inlay hints, type/call hierarchy, document symbols, folding ranges, selection ranges, workspace symbols) now provided by the language server
  • New LSP client module (src/lsp/client.ts) managing server lifecycle over IPC transport
  • sysml.restartServer command to restart the language server on demand
  • Configuration settings: sysml.trace.server (off/messages/verbose), sysml.maxNumberOfProblems, sysml.library.path
  • New test suite lspClient.test.ts covering LSP diagnostics, hover, document symbols, and completions

Changed

  • Extension architecture: language features delegated to LSP server instead of in-extension providers
  • Local ANTLR parser retained only for visualization panel and model explorer tree view
  • parseSysMLDocument() simplified — parse gate mechanism and inline validation removed
  • validateModel command now reports vscode.languages.getDiagnostics() count from the LSP server
  • deactivate() now stops the LSP client
  • Updated ARCHITECTURE.md to reflect LSP client/server architecture

Removed

  • In-extension provider registrations: SysMLFormatter, SysMLDefinitionProvider, SysMLDocumentSymbolProvider, SysMLCompletionProvider, SysMLCodeActionProvider, SysMLValidator
  • LibraryService initialization from extension activation (LSP handles library resolution)
  • getLibraryService() export from extension module
  • Test files for removed providers: formatter.test.ts, navigation.test.ts, validator.test.ts

[0.16.0]

Changed

  • Extracted grammar generation pipeline into standalone sysml-v2-grammar repository
  • Grammar files now downloaded from release artifacts via make grammar / npm run grammar:download
  • Parser grammar renamed from SysMLv2.g4 to SysMLv2Parser.g4 (aligned with upstream repo)
  • Removed redundant antlr:copy-tokens build step — tokens file now included in grammar release
  • Removed make debug-elk target — use npm run debug:elk directly if needed

Removed

  • 19 orphaned renderer files and associated view model types
  • 6 dead test files for removed renderers
  • Python-based grammar generation scripts (scripts/grammar/)

[0.15.0]

Added

  • Worker thread for ANTLR parsing — heavy lexer/parser/visitor work now runs off the extension host thread, eliminating ~4s UI freezes on large files
  • parseAsync() method on SysMLParser with automatic fallback to synchronous parsing if the worker is unavailable
  • 300ms debounce on document change events to avoid parse-per-keystroke

Fixed

  • Cytoscape SVG plugin registered twice — removed duplicate cytoscape.use() calls; UMD bundles already self-register on script load
  • Removed unsupported <meta http-equiv> cache tags from visualization webview HTML (stripped by VS Code sandbox)
  • Release workflow now installs Java and downloads the ANTLR jar so vscode:prepublish succeeds in CI

[0.14.0]

Added

  • BNF-based grammar generation pipeline from official OMG SysML v2 KEBNF spec
  • SLL prediction mode with DFA cache reuse for faster parsing
  • Clear Parse Cache command
  • Parse-error diagnostics from ANTLR4
  • Centralised parse entry point with cancellation and progress notifications
  • 12 targeted grammar fixes for spec ambiguities

Changed

  • Migrated from antlr4ts to official antlr4 runtime (v4.13.2)
  • Parser and lexer grammars regenerated from spec
  • Validator rewritten with two-phase semantic resolution approach

Fixed

  • State transition source/target extraction
  • Subclassification extraction from definition declarations
  • Extension activation reliability
  • TreeView node size & spacing improvements

[0.13.0]

Added

  • ANTLR-based SysML v2 parser with full grammar support
  • Interactive diagram visualizations (BDD, IBD, Activity, Sequence, State, Use Case)
  • Model Explorer tree view
  • Code formatting and validation
  • Go-to-definition and symbol navigation
  • Completion provider with context-aware suggestions
  • Standard SysML v2 library support
  • D3.js and Cytoscape.js based rendering

Changed

  • Improved syntax highlighting coverage

Fixed

  • Initial release stability improvements

[0.12.0]

Added

  • Configurable export resolution for diagram PNG export
  • PNG export scale options (1×, 2×, 4×)

Fixed

  • Tree view export rendering issues

[0.10.0]

Added

  • IntelliSense completion provider for SysML keywords and element references
  • Multi-selection support in visualization commands
  • Enhanced element navigation from diagrams

Changed

  • Improved validator with better duplicate detection and reference handling
  • Nested action validation and visualization support

[0.7.0]

Added

  • Fork and join node support in activity diagram parsing and rendering

[0.6.0]

Added

  • Model Explorer registered as command palette entry (SysML: Explorer)

[0.5.0]

Added

  • Keyword validation with typo detection and quick-fix suggestions
  • CI workflow for automated testing
  • Release workflow for automated VSIX packaging and publishing

[0.4.0]

Added

  • Inline editing for element names in diagram views
  • Enhanced element navigation from visualization panels
  • Visualization interaction tests

Changed

  • Replaced nyc with c8 for code coverage

[0.3.1]

Fixed

  • Spurious re-render on first resize observer callback

[0.3.0]

Added

  • Toggle for category headers in General View

Changed

  • Reduced debounce times for improved responsiveness
  • Optimised update logic in visualization panel

[0.2.1]

Changed

  • README screenshots and video assets updated to WebP format

[0.2.0]

Added

  • Compact UI styling for buttons, menus, and toolbar
  • Dropdown interaction improvements

Changed

  • Document loading performance improved with debounced parsing

Fixed

  • Release workflow conditional check for marketplace publishing

[0.1.0]

Added

  • Initial release
  • SysML v2.0 syntax highlighting via TextMate grammar
  • Regex-based parser with element extraction
  • Interactive diagram visualizations (General View)
  • Model Explorer tree view
  • Basic code formatting
  • Extension activation on .sysml files