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 ruby DSL requirement matching for head and prerelease rubies #5766

Merged
merged 1 commit into from
Jul 27, 2022

Conversation

deivid-rodriguez
Copy link
Member

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

While working on #5715, my changes made this bug surface.

With the following Gemfile

source "https://rubygems.org"

ruby ">= 3.2.0"

And

$ ruby -v
ruby 3.2.0preview1 (2022-04-03 master f801386f0c) [arm64-darwin21]

Currently Bundler is happy

$ bundle
The Gemfile specifies no dependencies
Resolving dependencies...
Bundle complete! 0 Gemfile dependencies, 1 gem now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

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

My fix is to pass the resolver an actual string for the current Ruby version that considers prereleases.

After this fix, the previous case gives the expected error:

$ bundle
Your Ruby version is 3.2.0.preview1, but your Gemfile specified >= 3.2.0

Make sure the following tasks are checked

Development versions were not correctly resolved.
@deivid-rodriguez deivid-rodriguez force-pushed the fix-ruby-version-dsl-for-head-rubies branch from 19c9161 to 94f9643 Compare July 25, 2022 11:31
@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review July 25, 2022 13:03
@deivid-rodriguez deivid-rodriguez marked this pull request as draft July 25, 2022 13:06
@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review July 25, 2022 14:24
@deivid-rodriguez
Copy link
Member Author

Merging since it unblocks the fix for #5715.

@deivid-rodriguez deivid-rodriguez merged commit 0789bca into master Jul 27, 2022
@deivid-rodriguez deivid-rodriguez deleted the fix-ruby-version-dsl-for-head-rubies branch July 27, 2022 09:00
deivid-rodriguez added a commit that referenced this pull request Aug 10, 2022
…rubies

Fix `ruby` DSL requirement matching for head and prerelease rubies

(cherry picked from commit 0789bca)
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