-
Notifications
You must be signed in to change notification settings - Fork 131
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 Bundler 2.6.1 #2129
base: main
Are you sure you want to change the base?
Support Bundler 2.6.1 #2129
Conversation
Gem::Specification.stubs used to be a `Bundler::SpecSet` when `bundler/setup` has been required. However, that was unintentional and was reverted to be a plain array of specs like with standard RubyGems in Bundler 2.5.23. This change make specs support that change.
RubyGems 3.5.x ships with Bundler 2.5.x, so it's unnecessary.
In CI, we bump to RubyGems 3.5.23 which ships with Bundler 2.5.23.
Bundler 2.6 made a change where missing_specs are now kept in the original resolve spec set, not in the spec set with materialized specifications. This change adapts tapioca to that.
dae7d98
to
a41dc1c
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.
Thanks! Opened sorbet/sorbet#8394 to resolve the type checking error.
@@ -45,6 +45,9 @@ jobs: | |||
experimental: true | |||
- ruby: "head" | |||
experimental: true | |||
- rails: "current" | |||
ruby: "3.3" | |||
rubygems: "3.5.23" |
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.
Curious, any particular reason you picked Ruby 3.3 for this?
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.
No, not really. I wanted to keep at least one job running with older Bundler, and I chose the latest released Ruby but there was no particular reason, we could also choose the oldest supported Ruby, for example.
I'm also adding a basic tapioca check to our CI: rubygems/rubygems#8346. |
Motivation
Bundler 2.6 has just been released and unfortunately I noticed that it does not play well with tapioca.
Implementation
The main incompatibility I noticed was introduced at rubygems/rubygems#8251.
In that PR, missing specs were moved from the spec set of materialized specifications to the spec set holding the original resolution.
Unfortunately, that's necessary to fix the issue I wanted to solve, and I'm not sure how to fix the original issue while making the change backwards compatible with what tapioca was doing here. So I'm trying to change tapioca instead to play nice with Bundler 2.6.
I also found another test only incompatibility introduced by rubygems/rubygems#8165 in Bundler 2.5.23. That's because
Gem::Specification.stubs
would hold aBundler::SpecSet
before that PR (similar to a hash) while after the PR it was change to hold an array of specs (the same thing it holds whenbundler/setup
has not been loaded). Since this only affects specs, I changed the specs to play nice with that change as well.Tests
My hope is to run CI with the latest Bundler and get tests green.
I'm also planning to introduce a basic tapioca CLI check to Bundler's CI so that I can detect this issue in advance in the future.