Remove runtime dependency on lint_roller#2080
Conversation
rubocop-rspec should not need to have a runtime dependency on lint_roller. And since RuboCop v1.72.1 already has a dependency on lint_roller `~> 1.1.0`, it should be safe to remove from our gemspec.
|
cc @paracycle |
pirj
left a comment
There was a problem hiding this comment.
No objections
I wonder, if we had it, do we use it?
I’m a tad concerned if RuboCop drops or replaces it, will it still work for us?
|
I don't think RuboCop will drop it, then the whole plugin loading would stop working. But I would like @koic's comment. We spoke briefly about it today at RubyKaigi. |
|
I’ll move this PR to draft while I rethink some problems with lint_roller… |
|
Unless something has been overlooked, declaring a runtime dependency on Although the likelihood is low, if RuboCop were to depend on a future version such as By specifying the dependency in the gemspec, potential errors caused by an unexpected update to When removing the dependency on By the way, @bquorning, I was glad to meet you at RubyKaigi 2025! |
|
I realize that currently this line prevents us from removing lint_roller as a dependency – by always loading plugin.rb, lint_roller is a direct dependency.
If the version 2 API is incompatible with the current API, I would expect lint_roller to also change what needs to be entered into our gemspec metadata. Perhaps they would use a
Likewise 🙏🏼 |
|
As a hypothetical / abstract example, what if we wanted rubocop-rspec to also be a plugin of another linter project than RuboCop, using a different way to write plugins? Should we then give rubocop-rspec another extra runtime dependency? I don’t think so. I think if our gemspec metadata defined a path instead of a class name, rubocop would be able to load our plugin code, and rubocop-rspec would not have any knowledge (besides defining, but not loading, a |
rubocop-rspec should not need to have a runtime dependency on lint_roller. And since RuboCop v1.72.1 already has a dependency on lint_roller
~> 1.1.0, it should be safe to remove from our gemspec.Before submitting the PR make sure the following are checked:
master(if not - rebase it).CHANGELOG.mdif the new code introduces user-observable changes.bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).