-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Stop generating binstubs for Bundler itself #8345
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
Stop generating binstubs for Bundler itself #8345
Conversation
f69a01c to
3db9c19
Compare
|
I plan to add code suggesting to explain what happened and suggesting to remove |
Would you like to add this into current PR or in separate one? |
|
I was planning to add it to this PR. |
|
I briefly looked into adding those messages I had suggested, but I decided it's fine as is, so will merge. |
293a2c0 to
088c919
Compare
088c919 to
8d596c0
Compare
|
Rails generates For example, So I assume this change may be breaking change. How about showing a deprecation message before stoping generation? Ref: rails/rails#54563 |
- Fix rails#54563 - ### Context In a future version of Bundler, running `bundle binstub bundler` will no longer generate a `bin/bundle` binstub. The reason for this change upstream is well explained in ruby/rubygems#8345. ### Problem When the change in Bundler is cut into a release, generating new rails application will throw a Bundler warning, and the AuthenticationGenerator which makes use of `bin/bundle` will stop working. ### Solution Stop generating a bundler binstub and modify the generator to use the same bundler command as the rest of the codebase.
- Fix rails#54563 - ### Context In a future version of Bundler, running `bundle binstub bundler` will no longer generate a `bin/bundle` binstub. The reason for this change upstream is well explained in ruby/rubygems#8345. ### Problem When the change in Bundler is cut into a release, generating new rails application will throw a Bundler warning, and the AuthenticationGenerator which makes use of `bin/bundle` will stop working. ### Solution Stop generating a bundler binstub and modify the generator to use the same bundler command as the rest of the codebase.
- Fix rails#54563 - ### Context In a future version of Bundler, running `bundle binstub bundler` will no longer generate a `bin/bundle` binstub. The reason for this change upstream is well explained in ruby/rubygems#8345. ### Problem When the change in Bundler is cut into a release, generating new rails application will throw a Bundler warning, and the AuthenticationGenerator which makes use of `bin/bundle` will stop working. ### Solution Stop generating a bundler binstub and modify the generator to use the same bundler command as the rest of the codebase.
- Fix rails#54563 - ### Context In a future version of Bundler, running `bundle binstub bundler` will no longer generate a `bin/bundle` binstub. The reason for this change upstream is well explained in ruby/rubygems#8345. ### Problem When the change in Bundler is cut into a release, generating new rails application will throw a Bundler warning, and the AuthenticationGenerator which makes use of `bin/bundle` will stop working. ### Solution Stop generating a bundler binstub and modify the generator to use the same bundler command as the rest of the codebase.
|
I did assume this PR could break some stuff, that's why I plan to release it with next's year release, not on a patch version. Maybe worth adding some deprecation note now in a patch level release, though. |
- Fix rails#54563 - ### Context In a future version of Bundler, running `bundle binstub bundler` will no longer generate a `bin/bundle` binstub. The reason for this change upstream is well explained in ruby/rubygems#8345. ### Problem When the change in Bundler is cut into a release, generating new rails application will throw a Bundler warning, and the AuthenticationGenerator which makes use of `bin/bundle` will stop working. ### Solution Stop generating a bundler binstub and modify the generator to use the same bundler command as the rest of the codebase.
- Fix rails#54563 - ### Context In a future version of Bundler, running `bundle binstub bundler` will no longer generate a `bin/bundle` binstub. The reason for this change upstream is well explained in ruby/rubygems#8345. ### Problem When the change in Bundler is cut into a release, generating new rails application will throw a Bundler warning, and the AuthenticationGenerator which makes use of `bin/bundle` will stop working. ### Solution Stop generating a bundler binstub and modify the generator to use the same bundler command as the rest of the codebase.
|
I understood the plan. Thanks for your explanation! |
which was failing because the bundler binstub has been removed in modern bundler, see ruby/rubygems#8345
which was failing because the bundler binstub has been removed in modern bundler, see ruby/rubygems#8345
What was the end-user or developer problem that led to this PR?
Bundler generated binstubs are sometimes too strict, and error out directly, preventing Bundler auto-install and auto-switch mechanism from triggering.
We have two mechanisms that are almost identical for activating the proper version of Bundler, with only one difference:
~> x.yconstraint on the version of Bundler, so it could end up in errors.In particular, when
vendor/bundleis configured, and a minor version of Bundler is running that that does match the locked version of Bundler, Bundler binstubs will bail out with an error. If they were not in place, Bundler internal mechanism would automatically restart with the locked version of Bundler itself present invendor/bundleand everything would just work.What is your fix for the problem, implemented in this PR?
Stop generating binstubs for Bundler itself, since they are no longer necessary, given that the same (more relaxed) mechanism is present in all RubyGems version that we support.
Make sure the following tasks are checked