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 1.63.1 -- "Could not locate Gemfile" #12846
Comments
#12826 appears to be the cause -- bisected to b0c508a and reverting it makes the regression goes away -- cc @bbatsov @amomchilov |
Fixes rubocop#12846. This PR fixes an error for `RuboCop::Lockfile` when there is no Bundler environment. From a performance perspective as well, resolving through `require 'bundler'` is not optimal. This PR ensures that the necessary `Bundler::LockfileParser` exists as a constant. This approach reduces unnecessary loading caused by `require 'bundler'` and ensures the presence of the essential `Bundler::LockfileParser`.
Thank you for the feedback. I've opened #12847 to solve the issue. |
Fixes #12846. This PR fixes an error for `RuboCop::Lockfile` when there is no Bundler environment. From a performance perspective as well, resolving through `require 'bundler'` is not optimal. This PR ensures that the necessary `Bundler::LockfileParser` exists as a constant. This approach reduces unnecessary loading caused by `require 'bundler'` and ensures the presence of the essential `Bundler::LockfileParser`.
Ah so the issue here isn't the This error was caused by rubocop/lib/rubocop/lockfile.rb Line 16 in d148ee5
|
appears to be a regression of some very old issues #9148 and #6939
a sample ruby file (
t.rb
)install a copy of rubocop 1.63.0 and 1.63.1:
Expected behavior
on 1.63.0 I get:
Actual behavior
on 1.63.1 I get:
annoyingly,
--debug
causes it to no longer crash:Steps to reproduce the problem
see above!
RuboCop version
Include the output of
rubocop -V
orbundle exec rubocop -V
if using Bundler.If you see extension cop versions (e.g.
rubocop-performance
,rubocop-rspec
, and others)output by
rubocop -V
, include them as well. Here's an example:The text was updated successfully, but these errors were encountered: