Skip to content

fix caching of relative path source gems - #75

Merged
ccutrer merged 2 commits into
mainfrom
cache-relative-path-source
Oct 29, 2026
Merged

ccutrer merged 2 commits into
mainfrom
cache-relative-path-source

Conversation

@ccutrer

@ccutrer ccutrer commented Oct 29, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The path-source check also matches Git sources, causing alternate-lockfile caching with Git gems to raise when expanded_original_path expands their uninitialized @original_path.

1 open issue
What changed in this PR

This PR fixes caching of relative path gems declared in alternate Gemfiles, while keeping gems inside the project out of the cache.

Changes:

  • Resolve relative source paths from the declaring Gemfile’s directory while preserving the project cache destination.
  • Skip caching path gems located inside the project.
  • Add regression specs for external and internal relative path gems.
File Description
spec/​bundler/​multilock_cache_spec.rb Tests relative path caching with an alternate Gemfile in a subdirectory.
lib/​bundler/​multilock/​ext/​runtime.rb Adjusts source path resolution, cache destinations, and internal path exclusions.

Review effort: Balanced

Comment thread lib/bundler/multilock/ext/runtime.rb Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@ccutrer
ccutrer merged commit 3084d93 into main Oct 29, 2026
10 checks passed
@ccutrer
ccutrer deleted the cache-relative-path-source branch October 29, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants