-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Don't discard candidates matching Ruby metadata #5784
Merged
deivid-rodriguez
merged 12 commits into
master
from
dont-discard-candidates-matching-ruby-metadata
Aug 2, 2022
Merged
Don't discard candidates matching Ruby metadata #5784
deivid-rodriguez
merged 12 commits into
master
from
dont-discard-candidates-matching-ruby-metadata
Aug 2, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deivid-rodriguez
force-pushed
the
dont-discard-candidates-matching-ruby-metadata
branch
4 times, most recently
from
July 29, 2022 20:44
efbcbf2
to
4d5d0ab
Compare
It was just working by chance. (cherry picked from commit 16b2d6b)
deivid-rodriguez
force-pushed
the
dont-discard-candidates-matching-ruby-metadata
branch
from
July 30, 2022 19:47
4d5d0ab
to
41026a1
Compare
deivid-rodriguez
force-pushed
the
dont-discard-candidates-matching-ruby-metadata
branch
2 times, most recently
from
July 31, 2022 08:08
2fc5863
to
583dc07
Compare
As a side effect, this PR also implements a different improvement, namely, auto fixing lockfiles generated with different Ruby versions automatically, instead of raising errors. That, of course, unless we are in frozen mode and the lockfile can't be modified. This improvement was already planed since #5435 (comment). |
deivid-rodriguez
force-pushed
the
dont-discard-candidates-matching-ruby-metadata
branch
from
July 31, 2022 10:01
583dc07
to
af9ce37
Compare
Do dependency filtering and materialization in one step. Before, dependency filtering would not consider ruby metadata so it would discard variants that end up not being materializable in the end. Co-authored-by: Ian Ker-Seymer <ian.kerseymer@shopify.com>
deivid-rodriguez
force-pushed
the
dont-discard-candidates-matching-ruby-metadata
branch
from
July 31, 2022 10:03
af9ce37
to
6e35a6e
Compare
deivid-rodriguez
changed the title
Dont discard candidates matching Ruby metadata
Don't discard candidates matching Ruby metadata
Jul 31, 2022
deivid-rodriguez
deleted the
dont-discard-candidates-matching-ruby-metadata
branch
August 2, 2022 07:10
deivid-rodriguez
added a commit
that referenced
this pull request
Aug 10, 2022
…ng-ruby-metadata Don't discard candidates matching Ruby metadata (cherry picked from commit c63d258)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was the end-user or developer problem that led to this PR?
Sometimes a
Gemfile.lock
file will include a variant that matches the current Ruby, but Bundler will discard it because of not being the most platform specific one.What is your fix for the problem, implemented in this PR?
Bundler materializes lockfiles into real specifications in two steps. First, it filters the dependencies it needs (for example, if
BUNDLE_WITHOUT
is set or things like that), and chooses a set of specs from those. Then it converts those lockfile specifications into real specifications.From these two steps, only the second one considered Ruby metadata, while both steps considered platform. This resulted on these candidates already discarded by the time we try to materialize specifications.
This PR merges these two steps into a single pass, so that we consider metadata and platforms at the same time. This also speeds up
require "bundler/setup"
time in our example big Gemfile by about 2-3%.Closes #5715.
Make sure the following tasks are checked