Skip to content

v0.2.16 — sdivi-rust v0.2.16 — TS/JS/Python/Go/Java edges actually count

Choose a tag to compare

@GeoffGodwin GeoffGodwin released this 05 May 13:40
· 58 commits to main since this release

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_bytes and string_content
    consolidated into sdivi-parsing::text (eliminates five-way
    duplication previously flagged in the drift log).
  • M26 — Resolver parent navigation + per-language module conventions.
    dependency_graph::resolve_import now walks parent directories for
    ../ and super:: 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.mod module 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.
  • M27 — tsconfig path alias support. TypeScript and JavaScript
    adapters resolve compilerOptions.paths aliases 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.md resolved or dispositioned: dynamic-import
    docstring softened in crates/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 expires set
    1–2 weeks out to absorb the cutover. See MIGRATION_NOTES.md for the
    exact override block.

Rust-only projects are unaffected; Rust import resolution did not change.

What did not change

  • snapshot_version is still "1.0". v0.2.13 snapshots load and diff
    cleanly under v0.2.16.
  • Public API additions only: build_dependency_graph_with_go_module is
    additive; the existing build_dependency_graph(records) continues to
    work and dispatches with go_module = None.
  • WASM TypeScript types remain tsify-derived from the same Rust types.
    Existing JS/TS callers using WasmAssembleSnapshotInput need 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.16

Documentation

Released under Apache 2.0.

What's Changed

Full Changelog: v0.2.13...v0.2.16