Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 4, 2026

What was the end-user or developer problem that led to this PR?

The original PR #9301 fixed fallback behavior for both Path and Git sources when transitive dependencies don't exist in the source, but only included test coverage for Path sources. Git sources inherit from Path, so the fix applies to both, but lacked regression protection.

What is your fix for the problem, implemented in this PR?

Added parallel test case for git sources mirroring the existing path source test:

context "when a git gem has a transitive dependency that does not exist in the git source" do
  # Tests that missing_dep falls back to rubygems when parent_gem is git-sourced
  it "falls back to the default rubygems source for that dependency when updating"
end

Both path and git source tests verify the fix at bundler/lib/bundler/definition.rb:1080 works correctly.

Make sure the following tasks are checked


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: hsbt <12301+hsbt@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on fallback git/path sources implementation Add test coverage for git sources with transitive dependency fallback Feb 4, 2026
Copilot AI requested a review from hsbt February 4, 2026 02:51
@hsbt hsbt marked this pull request as ready for review February 4, 2026 03:00
Copilot AI review requested due to automatic review settings February 4, 2026 03:00
@hsbt hsbt merged commit d73e4a9 into fallback-git-path-sources Feb 4, 2026
86 checks passed
@hsbt hsbt deleted the copilot/sub-pr-9301 branch February 4, 2026 03:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds missing regression coverage to ensure Bundler’s transitive dependency fallback behavior works for git-sourced gems (in addition to the existing path-sourced coverage), matching the fix introduced in PR #9301.

Changes:

  • Adds a new spec context for a git gem whose transitive dependency is not present in the git source.
  • Verifies that during bundle update, the missing transitive dependency continues to resolve from the default RubyGems source while the parent remains git-sourced.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants