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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't ignore pre-releases when there's only one candidate #6441

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented Mar 7, 2023

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

While playing around with the latest (master) branch of Bundler, I found a surprising behavior: a simple Gemfile including only "rails" resolves to Rails 2.3.18 (10 years old!) 馃槷.

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

Turns out the issue was introduced by #6246.

Since Bundler 2.5.0.dev is a pre-release version, Bundler actually ignores it and tries to find a resolution that does not have any dependency on Bundler, and Rails 2.3.18 satisfies that.

I could've special cased this specifically for Bundler, but I think it does make sense for every gem to not ignore prereleases if the resolver is considering a single version of that gem.

Make sure the following tasks are checked

This should be a very rare edge case, however, it does happen when using
a .dev version of Bundler because in that case, that's the only version
that the resolver considers, and it should not be ignored.

We could've special cased this specifically for Bundler, but I think it
does make sense for every gem.
@deivid-rodriguez deivid-rodriguez added this pull request to the merge queue Mar 9, 2023
Merged via the queue into master with commit 5cf7094 Mar 9, 2023
@deivid-rodriguez deivid-rodriguez deleted the fix-resolve-with-dev-bundler branch March 9, 2023 19:14
deivid-rodriguez added a commit that referenced this pull request Mar 20, 2023
Don't ignore pre-releases when there's only one candidate

(cherry picked from commit 5cf7094)
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.

None yet

1 participant