feat(extract): add opt-in --cargo crate dependency extractor#1271
Merged
Conversation
Closes Graphify-Labs#1264 Also fixes a narrow watch-mode path-filtering bug found while running the required local full-suite gate for this PR. Hidden directories inside the watched corpus are still ignored; hidden ancestors outside the watched root no longer suppress valid file events.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1264
What / why
Graphify's Rust graph is source-AST only today. Crate-level dependencies live in
Cargo.toml, so workspace dependency layers are invisible to the graph.This adds an opt-in
--cargoextractor, mirroring the existing--postgresextractor path.There is zero behavior change unless
--cargois passed.This PR also includes one small watch-mode fix outside #1264. The repo requires the full
pytest tests/gate before review, and that gate failed locally because watch-mode ignored validfiles when the temp directory had a hidden parent like
.ctx-mode-*. The fix scopes hidden-pathfiltering to the watched corpus root, so hidden directories inside the corpus are still ignored but
hidden parents outside the corpus no longer suppress valid file events.
Design
crate:<name>.crate_depends_on.build.pyremains unchanged.tomllib/tomliloading with a clear Python 3.10 error.pyproject.tomloruv.lock.Deferred on purpose:
serde,tokio, etc.).dev-dependencies/build-dependencies.Changes
graphify/cargo_introspect.pygraphify/__main__.py--cargoflag, help text, usage text, extractor call, and merge wiring.tests/test_cargo_introspect.pygraphify/watch.pytests/test_watch.pyREADME.md--cargoexample.Testing