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 Resolver::APISet to always include prereleases when necessary #4113

Merged
merged 1 commit into from Dec 10, 2020

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented Dec 9, 2020

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

gem install rails --pre

fails to install the latest rails prerelease.

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

Previous versions of molinillo, specifically before CocoaPods/Molinillo@d29a053, would include special logic for dealing with prereleases. Now this logic needs to be implemented by the specification provider, in this case, rubygems.

That change in molinillo made an issue in our Resolver::APISet implementation manifest, where even if the set has been created with the prerelease flag, it would fail to return prereleases unless the dependency explicitly allowed them. For example, it would return prereleases given the dependency "activesupport, = 6.1.rc2", but it will fail to return prereleases given the dependency "activesupport, >= 4.2.0". In the latter case, we also want prereleases returned when the --pre flag has been passed to gem install, i.e., when the API set has been created with the prerelease flag.

Fixes #4112.

Make sure the following tasks are checked

Previous versions of molinillo, specifically before
CocoaPods/Molinillo@d29a053,
would include special logic for dealing with prereleases. Now this logic
needs to be implemented by the specification provider, in this case,
rubygems.

That change in molinillo made an issue in our `Resolver::APISet`
implementation manifest, where even if the set has been created with the
`prerelease` flag, it would fail to return prereleases unless the
dependency explicitly allowed them. For example, it would return
prereleases given the dependency "activesupport, = 6.1.rc2", but it will
fail to return prereleases given the dependency "activesupport, >=
4.2.0". In the latter case, we also want prereleases returned when the
`--pre` flag has been passed to `gem install`, i.e., when the API set
has been created with the prerelease flag.
Copy link
Member

@hsbt hsbt left a comment

Choose a reason for hiding this comment

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

👍

@deivid-rodriguez deivid-rodriguez merged commit b70b07b into master Dec 10, 2020
@deivid-rodriguez deivid-rodriguez deleted the fix_gem_install_pre branch December 10, 2020 09:58
deivid-rodriguez added a commit that referenced this pull request Dec 14, 2020
Fix Resolver::APISet to always include prereleases when necessary

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

gem command neglects --pre option
3 participants