Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix git source conservativeness #6850

Merged
merged 8 commits into from
Aug 9, 2023
Merged

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented Aug 1, 2023

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

Git sources are not always conservative.

If you edit an attribute of a git source in the Gemfile (like its tag), but don't change the source itself (it's URL), then Bundler should behave consistently for dependencies of that source: it should re-resolve direct dependencies to satisfy the new change git source, but keep transitive dependencies already in the lockfile as much as possible.

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

The fix is to allow Bundler to make the distinction between:

  • A git source was completely changed to a different source. We want full unlock here.
  • A git source is still the same, but the Gemfile is now pointing to a different reference. We want conservative subdependencies here.

This distinction is implemented by 9a0e0df. The other commits are just minor refactorings while trying to figure things out.

Fixes #6816.

Make sure the following tasks are checked

@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review August 7, 2023 15:15
@deivid-rodriguez deivid-rodriguez merged commit 0b3b289 into master Aug 9, 2023
92 checks passed
@deivid-rodriguez deivid-rodriguez deleted the fix-git-conservativeness branch August 9, 2023 09:35
deivid-rodriguez added a commit that referenced this pull request Aug 17, 2023
Fix git source conservativeness

(cherry picked from commit 0b3b289)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bundler --conservative is not always conservative in case of git sources
1 participant