-
-
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
Support gemified set
#4297
Support gemified set
#4297
Conversation
1f9b385
to
7b2a8e0
Compare
I submitted upstream PRs: |
507f329
to
a290552
Compare
Thor PR was merged, Molinillo's one is waiting on feedback from Samuel. I'll update the comments about the vendored libraries and their differences with their latest released versions later. |
Thor 1.1.0 has been released 🎉, I'll update this PR to use that. |
a290552
to
83fc52d
Compare
I updated the PR to use thor 1.1.0. I wouldn't rely on the Molinillo PR to be attended soon, so this should be ready. |
365e387
to
0e6c648
Compare
Got some feedback in the Molinillo PR so I updated the PR in Molinillo and this PR to include the modified version. |
0e6c648
to
2d84a90
Compare
Pull request to Molinillo was merged, and now this PR reflects that. |
549b2fa
to
7408d33
Compare
Not sure why but removing usages of the default gem `set` triggers some missing `Bundler::SharedHelpers::OpenSSL` missing constant errors. Fully qualify these usages to avoid it.
Actually making this a set seems to be a very noticiable performance penalty in some cases. It's not necessary so remove it.
Since it has changes to lazily load `set`.
So it can be used by rubygems too.
As long as you use the latest rubygems too.
7408d33
to
bc53b79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm +1 for the changes under the lib/*
and bundler/lib/*
.
Thanks @hsbt! I will review @segiddins comment, and try to get this ready soon. |
Let's do this and see how it goes! |
Support gemified `set` (cherry picked from commit 25fee8b)
What was the end-user or developer problem that led to this PR?
The problem is that users can't currently specify
set
in their Gemfiles with the version they want to use, becausebundler
usesset
and activates the default version of set unconditionally.To be honest though, the reason that made me work on this was not that one, but that I found that some usages of
Set
are actually much slower than using plan arrays. In particular, I was making some improvements to the resolver, and found that due to the nature of my changes (making inclusion checks on the@platforms
array quite frequently), they were slowing down the resolver quite a lot (from 9 seconds to 12 seconds on a Gemfile proved problematic in the past). When switching to plain arrays, there was no performance penalty.What is your fix for the problem, implemented in this PR?
My fix is to replace all usages of
Set
preventing it to be supported as a default gem, fixing both of the above issues.This requires changes in both
thor
andMolinillo
which I will propose upstream.Fixes #3912.
Make sure the following tasks are checked