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
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ The Python walk is removed. Captured targets and bindings retain the same contai
imports at 255/256 containers remain, and a real import at 257 is cut and disclosed. An import-free deep
container, including a top-level import followed by a deep `pass`, no longer produces `extract-partial`
and may be cached. Disclosure now reports a captured import actually cut, rather than an empty container.
No persisted record or extraction-version change is intended; the Python import gate checks
fresh/warm output and, when `RIPWIRE_BASE_BIN` is supplied, acceptance of a pristine-main cache
without rewriting it.

There is no record content or extraction-version change; the order of a file's bind records
differs, and no reader depends on it (a cache written by the previous release gives identical
answers). The Python import gate checks fresh/warm output and, when `RIPWIRE_BASE_BIN` is supplied,
acceptance of a pristine-main cache without rewriting it.

## [0.6.7] — 2026-10-11

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,8 @@ review will credit it, but it is never a condition for merging the language.

| Family | Shared mechanism today | State | Claimable slices |
|---|---|---|---|
| 1. Imports | `ingest_importcap.h`: `@import.path` captures, `emitCapturedImport`, one `normaliseImportSpecifier` arm per `DepDialect`. Resolution in `resolve.h`. | partly. C-family, JS/TS and Go read the capture; Python is in review (#382). The rest still go through per-language arms of `directiveTargetOf` (`ingest_relations.h`): `csharpUsingTarget`, `phpUseTarget`, `luaRequireTarget`, `bashSourceTarget`, `rubyRequireTarget`, `elixirDirectiveTarget`, plus Rust `use`/`mod`, Kotlin `import_header` and Swift `import_declaration`. | **1a** one language per PR onto `@import.path` plus its normaliser arm, deleting its arm in `directiveTargetOf`: S each for C#, PHP, Lua, Bash, Kotlin and Swift; M for Rust (`use` trees, `mod`), Ruby (`autoload`) and Elixir (`alias`/`use`), whose directives carry more meaning. Claim on #358. |
| 2. Aliases | None. Renames reach the resolver as `RawBind` records (`ingest_cache.h`) from separate producers: `capturePythonImportBinds` (`ingest_relations.h`), `captureJsImportFacts`, `captureJsModuleAliases` and `captureGoImportFacts` (`ingest_jsimports.h`), C/C++ aliases in `fnPtrAliasName` (`ingest_binds.h`) and `captureTypeAlias` (`ingest_relations.h`). The readers are separate too: `addTypeAliasBases` and `buildUsingReexports` (`resolve.h`). | duplicated: one "local name → target" concept in about five shapes. | **2a** one shared binds channel (`@import.alias` / `@import.names` → one `RawBind` kind): M, *maintainers*, after the #358 import slices. **2b** after 2a, one language per PR moves its renames onto it: S each (Rust `use a as b`, Kotlin `import x as y`, PHP `use … as`, C# `using X = …`). |
| 1. Imports | `ingest_importcap.h`: `@import.path` captures, `emitCapturedImport`, one `normaliseImportSpecifier` arm per `DepDialect`. Resolution in `resolve.h`. | partly. C-family, JS/TS, Go and Python read the capture (Python since #382). The rest still go through per-language arms of `directiveTargetOf` (`ingest_relations.h`): `csharpUsingTarget`, `phpUseTarget`, `luaRequireTarget`, `bashSourceTarget`, `rubyRequireTarget`, `elixirDirectiveTarget`, plus Rust `use`/`mod`, Kotlin `import_header` and Swift `import_declaration`. | **1a** one language per PR onto `@import.path` plus its normaliser arm, deleting its arm in `directiveTargetOf`: S each for C#, PHP, Lua, Bash, Kotlin and Swift; M for Rust (`use` trees, `mod`), Ruby (`autoload`) and Elixir (`alias`/`use`), whose directives carry more meaning. Claim on #358. |
| 2. Aliases | None. Renames reach the resolver as `RawBind` records (`ingest_cache.h`) from separate producers: Python's `@import.names` / `@import.alias` captures, read in `captureTagsFacts` (`ingest_sidecap.h`) and turned into binds by the Python-only `emitCapturedPythonImportBind` (`ingest_importcap.h`); `captureJsImportFacts`, `captureJsModuleAliases` and `captureGoImportFacts` (`ingest_jsimports.h`), C/C++ aliases in `fnPtrAliasName` (`ingest_binds.h`) and `captureTypeAlias` (`ingest_relations.h`). The readers are separate too: `addTypeAliasBases` and `buildUsingReexports` (`resolve.h`). | duplicated: one "local name → target" concept in about five shapes. | **2a** one shared binds channel (`@import.alias` / `@import.names` → one `RawBind` kind): M, *maintainers*, after the #358 import slices. **2b** after 2a, one language per PR moves its renames onto it: S each (Rust `use a as b`, Kotlin `import x as y`, PHP `use … as`, C# `using X = …`). |
| 3. Types | `captureTagsFacts` (`ingest_sidecap.h`) reads `@definition.*` captures for every language. | shared, but language decisions are `Lang::` branches inside the loop: 36 non-comment `Lang::` mentions, 15 of them Elixir. | **3a** #374: one constexpr per-language hook table that `captureTagsFacts` calls once per capture, one language per commit, Elixir first. M. |
| 4. Inheritance | `captureBases` (`ingest_relations.h`): base clauses for C++, TS/JS, Java, Python, Swift, C#, PHP, Kotlin and Ruby, chosen by node kind (`isBaseTypeNodeIn`). | partly. Rust `impl … for` is a separate pass; Ruby mixins have their own `captureRubyMixinBases`. | **4a** Ruby `include`/`extend`/`prepend` as captures read by the shared path, retiring `captureRubyMixinBases`: S–M, Ruby (offered on #339). **4b** the base-clause node kinds move from `isBaseTypeNodeIn` into `tags.scm` captures: M, all of the languages above. **4c** structural conformance (#386): a class or type whose methods cover a structural base's required methods (Python `typing.Protocol`, Go interfaces, possibly TS interfaces) is listed as an implementor marked `structural=1`, never as a nominal subclass, with a disclosed minimum-method threshold; step (c), one shared method-set check, per-language data for which bases are structural. M; Python and Go first. |
| 5. Callables | Definitions come from `tags.scm`, read by `captureTagsFacts`. | partly. Keyword-headed definitions keep keyword tables in C++: `elixirFunctionKeyword` and `elixirMetadataAttribute` (`ingest_elixir.h`) repeat `macroBodyKeyword` (`ingest_relations.h`), 0.82 and 0.96 similar by `--clones`. | **5a** #355: the tags pass evaluates `#eq?`/`#any-of?`/`#not-any-of?`, then Elixir's table moves into its `tags.scm`. M; Elixir, then Clojure. |
Expand Down
5 changes: 3 additions & 2 deletions queries/python/tags.scm
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@

; Shared import vocabulary (#358). The dependency target is still ONE per statement: the first
; name of a plain import (including its alias spelling), or the module_name of a from-import.
; The child anchor captures only the first plain-import name. C++ imposes the old container
; reach/depth; statement patterns remain unanchored so conditional and function imports keep coverage.
; The child anchor captures only the first plain-import name. The C++ side (ingest_importcap.h)
; imposes the old container reach/depth; statement patterns remain unanchored so conditional and
; function imports keep coverage.
(import_statement . name: (_) @import.path)
(import_from_statement module_name: (_) @import.path)

Expand Down
4 changes: 2 additions & 2 deletions src/graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -2620,8 +2620,8 @@ inline JsImportTables buildJsImportTables( const IngestResult& ing, const WsIncl
// (3) a split with one evidenced arm is kept whole, false arms included;
// (4) an object handed to the caller with no mention of its class in the file (an unannotated parameter, dependency
// injection, a factory return) no longer reaches the in-repo method by name; the call is declined and counted;
// (5) Python `from m import Cls as Alias` records no original name (capturePythonImportBinds keeps the module only),
// so an aliased class is no evidence until the extractor records it (a parser-version change); likewise a TS
// (5) Python `from m import Cls as Alias` records no original name (emitCapturedPythonImportBind keeps the module
// only), so an aliased class is no evidence until the extractor records it (a parser-version change); likewise a TS
// namespace import used as `ns.Cls.m()` and a CJS `const X = require( … )` that the export table does not pin;
// (6) languages without a table keep the ladder unchanged, each for the reason externalnames.h records: Java,
// Kotlin, C#, Swift, Rust and ObjC (the extractor records no declared parameter or local type there — an ObjC
Expand Down
2 changes: 1 addition & 1 deletion src/ingest_importcap.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ void emitCapturedPythonImportBind( TSNode namesNode, TSNode aliasNode, std::uint
//
// SEVEN PARAMETERS, and that is the house shape rather than an accident. --quality-delta's `params` check
// bars 5, and this is over it; the siblings it sits between take 5 (captureBases, captureFields,
// capturePythonImportBinds) and 9 (captureIncludes — the very function this round moved C-family OUT of),
// emitCapturedPythonImportBind above) and 9 (captureIncludes — the very function this round moved C-family OUT of),
// with the two per-file drivers at 10. Four of the seven are the sink set (includes, refs, shortfall) plus
// the file id every capture records carry. Collapsing them into a context struct would take this one call
// under the bar while leaving every sibling over it, i.e. a local abstraction that makes the family harder
Expand Down
Loading
Loading