-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Regression in v.1.63.3 #12865
Comments
Likely it was a regression from the fix of another regression. We've been plagued by different forms of the same problem since 1.63 was released and it seems that every fix creates another problem. //cc @amomchilov @koic |
Yea, I thought so yesterday when we faced the 'uninitialized constant Bundler' problem. I hope this helps. |
Oh boy, a fractal of regressions. Sorry for causing this trouble, I had done a pretty through job at manually testing these changes at different times, but there's so many scenarios to consider, and it needs to be retested after even the smallest tweaks. Is there a way we can add tests to characterize all the various ways that Rubocop can be called? Off the top of my head:
As for what OP is describing here, I think the correct approach would be to always try to |
Interestingly, the Bundler docs confirm the idea that it can be used "as a library":
|
OOOOOHHHHHHhhhhhh. The issue isn't with The issue in #12846 was from trying to call I think a simple |
… don't crash if we aren't running in a folder with a `Gemfile(.lock)`.
… don't crash if we aren't running in a folder with a `Gemfile(.lock)`.
[Fix #12865] `require 'bundler'` if possible and rescue `Bundler::GemfileNotFound`
Thanks a lot! |
#12848 (comment) mentions a problem with
bundler
not being used anymore if rubocop is run globally. This indeed causes a regression with e.g. rubocop-rails, see https://github.com/rubocop/rubocop-rails/blob/28b274bcd14da7d8c861aaf9dcdbe165d9fc28f2/lib/rubocop/cop/rails/reversible_migration.rb#L293C1-L293C84I suspect
target_rails_version
to not return the installed Rails version anymore. Which makes sense because theGemfile.lock
is not parsed anymore. However, we use rubocop globally in CI. Why would I want to install the bundle everytime?I don't think that this change should be made quietly in a patch version update. If this is intentional, this is a big thing that should at least be announced.
Expected behavior
Actual behavior
Steps to reproduce the problem
RuboCop version
The text was updated successfully, but these errors were encountered: