Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
target/
target-wasm/
target-msrv/
/CLAUDE.local.md
node_modules/
.DS_Store
98 changes: 98 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Changelog

## v0.9.1

- Added summary mode for large tree graphs: collapsed containers report hidden element counts, references to hidden elements are grouped with counts, and excess notes are counted on their targets.
- Added configurable member and note limits, with per-container overrides to show every direct member.
- Added WebAssembly controls to expand containers by qualified name or element ID, report unresolved selections, and reveal an element's containing path with `revealPath`.
- Included the pinned Rust toolchain configuration in the public source release.

## v0.9.0

### Added

- Derived-property access in Rust, Python, and WebAssembly for names, ownership, annotations, types, connector ends, behaviors, expressions, requirements, and views. Property catalogs report which values are exact, approximate, or not computed.
- Optional inheritance and import closures in derived properties and full-form export, including implied library inheritance. Closure expansion is opt-in.
- JSON reports for `check` and `lint`, with consistent positions, stages, severities, rule identifiers, fixes, and summary counts.
- Checks for conflicting inherited member names, an `inherited-name-shadow` lint with a redefinition fix, and editor actions to fix all findings of one rule.
- Editor requests to preview and apply package splitting: `sysmlv2/splitPlan` and `sysmlv2/split`.
- Reusable prepared libraries across in-memory sessions, including a WebAssembly `PreparedLibrary` handle, and reusable parsed-source inputs for validation.
- Session checks reuse the session's resolved model without changing lint or unused-import findings; syntax-only checks are available separately.
- Python `Error` and `RefusedError` exceptions; Python checks release the interpreter lock while running.

### Fixed

- Interchange sessions preserve supplied element IDs across loading, edits, and export. Compact and full forms retain the same identities, including references to external elements.
- JSON and CBOR round trips preserve long expressions and owned element graphs. Cycles, excessive depth, and incomplete reconstruction report errors instead of silently dropping content.
- Numeric literals that exceed JSON numeric precision retain their exact text. Full-form output preserves external references and derives names, implied relationships, and connector structure consistently.
- Evaluation keeps type defaults unknown through unbound subjects, references, and inputs, including aliases, nested members, and calculation calls. Fixed formulas use the receiver's redefinitions; unsupported nested solver paths remain undecided.
- Parser handling of accept actions, conditional triggers, `else` branches, word-operator operands, and escaped names and strings. Binding and connector printing preserves ends in both dialects, including one-ended and multi-ended bindings.
- Deep nesting and long operator chains produce bounded diagnostics; parsing entry points reserve sufficient stack space and report reservation failures. Evaluation budgets cover all materialized values.
- Refactorings reject edits to library declarations and blank source names, avoid conflicting renames and overlapping qualification edits, and remove whole member lines correctly with either line ending. Inferred typing fixes account for values and redefinitions.
- Language-server sessions survive malformed requests and recoverable panics, report model and library failures, handle encoded file paths and large offsets correctly, and process documents in a stable order.
- Model-file extensions are recognized regardless of case. CLI output handles closed pipes quietly, and project archives validate offsets and total expanded size.
- Library caches handle concurrent writes and invalid data safely, with clearer failures and fewer repeated warnings.
- CBOR readers reject malformed references, invalid map lengths, and out-of-range integers and type codes without panicking or truncating values.
- Solver propagation continues tightening one-sided ranges, supports enumerations beyond 128 literals, and avoids repeated operand evaluation. Solver failures preserve their causes and clean up child processes.
- Diagram labels, notes, and links escape line breaks, backslashes, and delimiters correctly.
- Generated web libraries pass inherited-name checks; displayed element names follow the specification's naming rules.

### Performance

- Reduced repeated parsing, graph construction, metaclass lookup, import resolution, and full-form export work. Linting, editor diagnostics, binary conversion, and diagram generation reuse indexes and shared data.

### Upgrade notes

- Rust 1.97 or newer is required. Development and WebAssembly package builds use the pinned toolchain.
- Rust diagram options use default construction and setters. Several public error and result types are now typed or non-exhaustive; callers may need updated matches and error handling.
- Compact CBOR marks explicit IDs with a new flag. Sessions with explicit IDs reject ID-elided snapshots and delta export.
- JSON consumers must accept numeric literal values as either numbers or exact-text strings; the string form is a documented departure from the interchange schema.

## v0.8.0

### Added

- Guided lint repairs for incompatible usage kinds, composite port members, unqualified enumeration literals, inaccessible private members, and import visibility, with editor quick fixes and a fix-all action.
- Package splitting into per-child files through the transformation API, `refactor split`, and editor move actions.
- Opt-in repair of parse-broken sources for session construction, with records of removed or appended text and any unrepaired units.
- Diagnostic stages distinguish parse, context, reference-resolution, and semantic findings.
- Inherited-member enumeration and dialect-aware reference spelling in the model API and bindings.
- WebAssembly view information and view-directed diagrams based on exposed elements.

### Fixed

- Generated references and edits quote reserved words for the source dialect.
- Named dependencies, documentation, comments, and textual representations resolve in their namespaces. Inheritance and recursive imports respect lookup precedence and import order.
- Full-form interchange derives ownership, annotation endpoints, and type multiplicity correctly.
- Diagrams resolve library renderings, retain explicitly inherited library ports, omit generic implied ports, and draw nothing for views with no exposed elements.
- Anonymous comments keep their indentation; editor symbols always have nonempty labels; CLI diagnostics handle multibyte text safely.
- Diagnostic rendering and full-form relationship export reuse indexes to reduce repeated work.

## v0.7.2

- Constraint propagation uses exact rational interval endpoints, preserving decimal bounds without rounding drift. Solver witnesses also retain exact rational values.
- Editor and WebAssembly range reports provide marked approximate decimals alongside exact ranges.
- **Rust API change:** `WitnessValue::Real` now carries a rational value.

## v0.7.1

- Fixed diagram occurrence endpoints and implicit action succession, preserving the identity of connected elements.

## v0.7.0

### Added

- Exact rational arithmetic for numeric evaluation, comparisons, unit scales, and solver literals, exposed through Python and WebAssembly. Editor hints mark approximate displays of non-terminating decimals.
- Broader static checks for typing, dimensions, structure, relationships, expressions, connector accessibility, and action/state contracts, plus warnings for declarations that shadow standard-library roots.
- Evaluation limits for steps, ranges, strings, cumulative allocation, and exact-number size.
- WebAssembly lookup of anonymous elements by interchange ID.

### Fixed

- Anonymous redefinitions no longer target sibling declarations. KerML feature chains resolve in the preceding feature's context, and indexing is distinguished from quantity diagnostics.
- Full-form export includes effective qualified names for redefined elements and correct library-element flags. Calculation results receive typing and dimension checks.
- WebAssembly packaging selects the current package when older archives are present; generated web attributes with unrestricted types use `Base::DataValue`.

### Performance

- Prepared library graphs, shared lookup tables, deferred syntax loading, and compact semantic storage reduce library startup, memory use, and repeated validation work. Connector and unused-import checks reuse indexes; failed cache saves warn once per process.
26 changes: 13 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@ default-members = [
]

[workspace.package]
version = "0.9.0"
version = "0.9.1"
edition = "2021"
rust-version = "1.97"
license = "Apache-2.0"
repository = "https://github.com/Open-MBEE/sysml-toolkit"

[workspace.dependencies]
sysmlv2-parser = { path = "crates/sysmlv2-parser", version = "0.9.0" }
sysmlv2-cbor = { path = "crates/sysmlv2-cbor", version = "0.9.0" }
sysmlv2-solve = { path = "crates/sysmlv2-solve", version = "0.9.0" }
sysmlv2-lint = { path = "crates/sysmlv2-lint", version = "0.9.0" }
sysmlv2-parser = { path = "crates/sysmlv2-parser", version = "0.9.1" }
sysmlv2-cbor = { path = "crates/sysmlv2-cbor", version = "0.9.1" }
sysmlv2-solve = { path = "crates/sysmlv2-solve", version = "0.9.1" }
sysmlv2-lint = { path = "crates/sysmlv2-lint", version = "0.9.1" }
sysmlv2-testkit = { path = "crates/sysmlv2-testkit" }
sysmlv2-transform = { path = "crates/sysmlv2-transform", version = "0.9.0" }
sysmlv2-viz = { path = "crates/sysmlv2-viz", version = "0.9.0" }
sysmlv2-lsp = { path = "crates/sysmlv2-lsp", version = "0.9.0" }
sysmlv2-transform = { path = "crates/sysmlv2-transform", version = "0.9.1" }
sysmlv2-viz = { path = "crates/sysmlv2-viz", version = "0.9.1" }
sysmlv2-lsp = { path = "crates/sysmlv2-lsp", version = "0.9.1" }
lsp-server = "0.10"
lsp-types = "0.97"
crossbeam-channel = "0.5"
Expand Down
2 changes: 1 addition & 1 deletion crates/sysmlv2-cbor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository.workspace = true
include = ["src/**", "Cargo.toml", "README.md"]

[dependencies]
sysmlv2-model = { path = "../sysmlv2-model", version = "0.9.0" }
sysmlv2-model = { path = "../sysmlv2-model", version = "0.9.1" }
serde_json.workspace = true
uuid.workspace = true

Expand Down
2 changes: 1 addition & 1 deletion crates/sysmlv2-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ xattr = "1"

[dev-dependencies]
sysmlv2-testkit.workspace = true
sysmlv2-model = { path = "../sysmlv2-model", version = "0.9.0" }
sysmlv2-model = { path = "../sysmlv2-model", version = "0.9.1" }
4 changes: 2 additions & 2 deletions crates/sysmlv2-lint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ repository.workspace = true
include = ["src/**", "Cargo.toml"]

[dependencies]
sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.9.0" }
sysmlv2-model = { path = "../sysmlv2-model", version = "0.9.0" }
sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.9.1" }
sysmlv2-model = { path = "../sysmlv2-model", version = "0.9.1" }
serde_json.workspace = true
regex-lite.workspace = true

Expand Down
2 changes: 1 addition & 1 deletion crates/sysmlv2-model/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository.workspace = true
include = ["src/**", "build.rs", "Cargo.toml"]

[dependencies]
sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.9.0", features = ["serde"] }
sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.9.1", features = ["serde"] }
serde = { workspace = true, features = ["rc"] }
serde_json.workspace = true
uuid = { workspace = true, features = ["serde"] }
Expand Down
4 changes: 2 additions & 2 deletions crates/sysmlv2-parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ default = ["json"]
json = ["dep:sysmlv2-model", "dep:serde_json"]

[dependencies]
sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.9.0" }
sysmlv2-model = { path = "../sysmlv2-model", version = "0.9.0", optional = true }
sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.9.1" }
sysmlv2-model = { path = "../sysmlv2-model", version = "0.9.1", optional = true }
# for tests/examples that build serde_json values directly
serde_json = { workspace = true, optional = true }

Expand Down
10 changes: 5 additions & 5 deletions crates/sysmlv2-py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ name = "sysmlv2"
crate-type = ["cdylib", "rlib"]

[dependencies]
sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.9.0" }
sysmlv2-model = { path = "../sysmlv2-model", version = "0.9.0" }
sysmlv2-transform = { path = "../sysmlv2-transform", version = "0.9.0" }
sysmlv2-viz = { path = "../sysmlv2-viz", version = "0.9.0" }
sysmlv2-lsp = { path = "../sysmlv2-lsp", version = "0.9.0" }
sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.9.1" }
sysmlv2-model = { path = "../sysmlv2-model", version = "0.9.1" }
sysmlv2-transform = { path = "../sysmlv2-transform", version = "0.9.1" }
sysmlv2-viz = { path = "../sysmlv2-viz", version = "0.9.1" }
sysmlv2-lsp = { path = "../sysmlv2-lsp", version = "0.9.1" }
serde_json.workspace = true
pyo3 = { version = "0.29", features = ["abi3-py39"] }
4 changes: 2 additions & 2 deletions crates/sysmlv2-solve/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ repository.workspace = true
include = ["src/**", "Cargo.toml"]

[dependencies]
sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.9.0" }
sysmlv2-model = { path = "../sysmlv2-model", version = "0.9.0" }
sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.9.1" }
sysmlv2-model = { path = "../sysmlv2-model", version = "0.9.1" }

[dev-dependencies]
sysmlv2-testkit.workspace = true
6 changes: 3 additions & 3 deletions crates/sysmlv2-transform/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ repository.workspace = true
include = ["src/**", "Cargo.toml"]

[dependencies]
sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.9.0" }
sysmlv2-model = { path = "../sysmlv2-model", version = "0.9.0" }
sysmlv2-cbor = { path = "../sysmlv2-cbor", version = "0.9.0" }
sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.9.1" }
sysmlv2-model = { path = "../sysmlv2-model", version = "0.9.1" }
sysmlv2-cbor = { path = "../sysmlv2-cbor", version = "0.9.1" }
uuid.workspace = true
serde_json.workspace = true

Expand Down
4 changes: 2 additions & 2 deletions crates/sysmlv2-viz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ license.workspace = true
repository.workspace = true

[dependencies]
sysmlv2-model = { path = "../sysmlv2-model", version = "0.9.0" }
sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.9.0" }
sysmlv2-model = { path = "../sysmlv2-model", version = "0.9.1" }
sysmlv2-syntax = { path = "../sysmlv2-syntax", version = "0.9.1" }
serde.workspace = true
serde_json.workspace = true

Expand Down
Loading
Loading