v0.2.16 — sdivi-rust v0.2.16 — TS/JS/Python/Go/Java edges actually count
sdivi-rust v0.2.16 — TS/JS/Python/Go/Java edges actually count
This release lands the three-milestone fix for cross-file edge detection in
non-Rust languages. Before v0.2.14, adapters for Python, TypeScript,
JavaScript, Go, and Java pushed whole import-statement text into
FeatureRecord::imports, which dependency_graph::resolve_import silently
dropped. modularity, community_count, and boundary_violation_rate
were therefore computed against a graph with almost no edges and reported
near-zero divergence regardless of what the code did.
After this release, the import graph reflects the actual import graph for
all six supported languages.
snapshot_version stays at "1.0". No CLI flag, exit code, or
.sdivi/config.toml key changed.
Highlights
- M25 — Adapter extract_imports rewrite. Python, TypeScript,
JavaScript, Go, and Java adapters now emit bare module specifiers
(e.g."./utils","foo.bar","github.com/acme/lib") rather than
whole-statement text.truncate_to_256_bytesandstring_content
consolidated intosdivi-parsing::text(eliminates five-way
duplication previously flagged in the drift log). - M26 — Resolver parent navigation + per-language module conventions.
dependency_graph::resolve_importnow walks parent directories for
../andsuper::instead of stripping prefix characters; gained
per-language dispatch:- Python bare dotted specifiers (
foo.bar) resolve as path lookups. - Go module-path imports resolve via the
go.modmodule prefix
(auto-detected by the pipeline). - Java dotted imports resolve via standard Maven source roots plus
auto-discovered module roots; wildcards (com.acme.lib.*) emit one
edge per class file. - New API:
build_dependency_graph_with_go_module(records, go_module)
so WASM / non-pipeline callers can supply the Go module prefix
without filesystem access.
- Python bare dotted specifiers (
- M27 — tsconfig path alias support. TypeScript and JavaScript
adapters resolvecompilerOptions.pathsaliases declared in
tsconfig.json/jsconfig.json. Aliases that point to non-existent
targets are dropped without warning; standard relative and bare imports
are unaffected. - Non-blocking-note sweep. Six open items in
.tekhton/NON_BLOCKING_LOG.mdresolved or dispositioned: dynamic-import
docstring softened incrates/sdivi-lang-javascript/src/extract.rs:32
to match the test's grammar-version-dependent intent; remaining notes
closed with carry-forward justifications.
Impact on existing baselines
The first snapshot taken on a Python, TypeScript, JavaScript, Go, or Java
project after upgrading from ≤ v0.2.13 will show a large coupling_delta
and community_count_delta against the prior baseline. This is a
correctness fix, not a schema change.
Recommended actions:
- Re-baseline at the M25+M26 boundary, or
- Apply a one-time per-category threshold override with
expiresset
1–2 weeks out to absorb the cutover. SeeMIGRATION_NOTES.mdfor the
exact override block.
Rust-only projects are unaffected; Rust import resolution did not change.
What did not change
snapshot_versionis still"1.0". v0.2.13 snapshots load and diff
cleanly under v0.2.16.- Public API additions only:
build_dependency_graph_with_go_moduleis
additive; the existingbuild_dependency_graph(records)continues to
work and dispatches withgo_module = None. - WASM TypeScript types remain tsify-derived from the same Rust types.
Existing JS/TS callers usingWasmAssembleSnapshotInputneed no
changes. - Snapshot atomic-write, retention, and exit-code contracts unchanged.
Install
# crates.io
cargo install sdivi-cli
# pre-built binary (Linux x86_64 example)
curl -Lo sdivi https://github.com/GeoffGodwin/sdivi-rust/releases/download/v0.2.16/sdivi-x86_64-unknown-linux-gnu
chmod +x sdivi && mv sdivi ~/.local/bin/
# WASM / npm
npm install @geoffgodwin/sdivi-wasm@0.2.16Documentation
- Migration notes: https://github.com/GeoffGodwin/sdivi-rust/blob/main/MIGRATION_NOTES.md
- CHANGELOG: https://github.com/GeoffGodwin/sdivi-rust/blob/main/CHANGELOG.md
Released under Apache 2.0.
What's Changed
- Feature/fix graph edge detection in ts by @GeoffGodwin in #4
Full Changelog: v0.2.13...v0.2.16