Index project dependency paths from wrapper#821
Open
st0012 wants to merge 1 commit into
Open
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
b3c1fba to
e4a0c56
Compare
bc19a73 to
28572bc
Compare
8a9dae2 to
db06ee9
Compare
db06ee9 to
12f74c7
Compare
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.

Summary
Start
rubydex_mcpfrom the Ruby wrapper with the target Bundler context, then pass workspace and dependency roots to the Rust server.Changes
bundler/setupin the wrapper (Rubydex::MCPServerBridge), inferringBUNDLE_GEMFILEfrom the target path or cwd.canonicalize_pathnow warns and falls back to the original path instead of panicking on non-UTF-8 paths.UriIdand overwrites on re-index, so a file discovered through two roots only costs wasted indexing work, never duplicate declarations.StandardError(it touches the filesystem), and document theBUNDLE_GEMFILEside effect plus the workspace-vs-argv contract (only the first argv entry drives the Bundler context; all entries become index roots).MCPServerBridge) inAGENTS.md.Verification
bundle exec ruby -Itest test/mcp_server_bridge_test.rb(ENV save/restore,passthrough?, dependency-path collection, empty-argv default)cargo test --manifest-path rust/Cargo.toml -p rubydex-mcp(includes an overlapping-roots dedup test asserting a doubly-discovered file yields exactly one definition)cargo clippy --manifest-path rust/Cargo.toml -p rubydex-mcp --all-targets -- -D warningscargo fmt --manifest-path rust/Cargo.toml --all --checkbundle exec rubocop exe/rubydex_mcp lib/rubydex/mcp_server_bridge.rb test/mcp_server_bridge_test.rbbundle exec exe/rubydex_mcp: found workspace declarationRubydex::MCPServerBridgeand dependency declarationRake::Task.ActiveRecord::Basethrough the resolved dependency paths.