Repository navigation
Fix vex warning on a vendored gem leftover (#2076) - #2081
Draft
Mikola Lysenko (mikolalysenko) wants to merge 3 commits into
Draft
Mikola Lysenko (mikolalysenko) wants to merge 3 commits into
Mikola Lysenko (mikolalysenko) wants to merge 3 commits into
Conversation
Assisted-by: Claude Code:claude-fable-5-2
Once Gemfile.lock takes a vendored gem from its PATH source, Bundler loads the vendored directory and installs nothing for the gem. The registry copy an earlier bundle install left in the gem home stays, unpatched, until bundle clean. vex counted it as the live tree and warned vendored_tree_out_of_sync on every run, with a remedy (re-run the install) that could never clear it. The probe now skips a vendored gem's gem-home copies, as it does Go's module cache and Gradle's files-2.1 copies. A default gem's copy still counts, since RubyGems can load it before Bundler sets the load path. The verdict was never affected and is unchanged. Fixes #2076 Assisted-by: Claude Code:claude-fable-5-2
This replaces the previous commit's approach. Dropping the gem-home copy from the drift probe hid a copy that a load outside Bundler still runs (plain ruby, a stale --standalone setup script), so the probe is back to what main has. What #2076 reports is the wording. For a vendored gem the warning said the live tree carries different bytes and to re-run the install. Bundler loads the vendored path and bundle install never replaces the old registry copy, so the advice could not clear it. The gem detail now says the copy is a leftover Bundler no longer loads, and names bundle clean (a project bundle path) or gem uninstall NAME -v VERSION (a shared gem home). The warning code, the verdict and every other ecosystem's text are unchanged. Fixes #2076 Assisted-by: Claude Code:claude-fable-5-2
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.
LLM Description written by Claude Code:claude-fable-5-2
Fixes #2076
Root cause
vex's vendored drift probe (applied_patches_with_copiesincrates/socket-patch-core/src/vex/verify.rs) compares every installed copythe crawler finds against the patch record. For a vendored gem the lock
resolves the gem from a
PATHsource, so Bundler loads the vendoreddirectory and never the registry copy an earlier
bundle installleft inthe gem home. That leftover is still counted as "the live tree", so
vendored_tree_out_of_syncfires on every run and nobundle installclears it.
Plan
vex/verify.rsand an end-to-end test for the gem case.(as Go's module cache and Gradle's
files-2.1copies already are).CLI_CONTRACT.md.Generated by Claude Code