Skip to content

Bump minimum rubocop gem version to 1.74.0 to pick up redundant plugin loading bug fix #35

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

larouxn
Copy link

@larouxn larouxn commented May 17, 2025

The RuboCop plugin system introduced in 1.72.0, which improves the way of using additional cop gems such as rubocop-rails, had a bug in which linting runs could fail due to RuboCop trying to load additional cop gems via both the new plugins system and the original requires system. An example of said error which caused CI to fail is as follows. (CI logs)

Run bin/rubocop -f github
Error: `Performance` cops have been extracted to the `rubocop-performance` gem.
(obsolete configuration found in vendor/bundle/ruby/3.4.0/gems/rubocop-rails-omakase-1.1.0/rubocop.yml, please update it)
`Rails` cops have been extracted to the `rubocop-rails` gem.
(obsolete configuration found in vendor/bundle/ruby/3.4.0/gems/rubocop-rails-omakase-1.1.0/rubocop.yml, please update it)

Thankfully this appears to have been fixed in 1.74.0, specifically in rubocop/rubocop#13981. Thus, I'm proposing to bump the minimum required version of the rubocop gem to 1.74.0 in order to automatically prevent the above issue.

Noting, the workaround for this issue is to manually upgrade the rubocop gem to 1.74.0 or later. However, this will not happened automatically via, for example, Dependabot and therefore is pretty surprising/unintuitive/non-omakase.

Follow up to #28

The RuboCop plugin system introduced in 1.72.0, which improves the way of using additional cop gems such as rubocop-rails, had a bug in which linting runs could fail due to RuboCop trying to load additional cop gems via both the new plugins system and the original requires system. An example of said error which caused CI to fail is as follows. ([CI logs](https://github.com/larouxn/rails_8_store/actions/runs/15054427243/job/42316854789#step:4:1))

```console
Run bin/rubocop -f github
Error: `Performance` cops have been extracted to the `rubocop-performance` gem.
(obsolete configuration found in vendor/bundle/ruby/3.4.0/gems/rubocop-rails-omakase-1.1.0/rubocop.yml, please update it)
`Rails` cops have been extracted to the `rubocop-rails` gem.
(obsolete configuration found in vendor/bundle/ruby/3.4.0/gems/rubocop-rails-omakase-1.1.0/rubocop.yml, please update it)
```

Thankfully this appears to have been fixed in [1.74.0](https://github.com/rubocop/rubocop/releases/tag/v1.74.0), specifically in [rubocop/rubocop#13981](rubocop/rubocop#13981). Thus, I'm proposing to bump the minimum required version of the rubocop gem to 1.74.0 in order to automatically prevent the above issue.

Noting, the workaround for this issue is to manually upgrade the rubocop gem to 1.74.0 or later, though this will not happened automatically via, for example, Dependabot.
@larouxn larouxn mentioned this pull request May 19, 2025
@seuros
Copy link
Member

seuros commented May 19, 2025

sound reasonable. 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants