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
[Fix #6917] Bump Bundler dependency to >= 1.15.0 #6919
Conversation
Fixes rubocop#6917. This PR bumps Bundler dependency to >= 1.15.0. Bundler 2 has already been released. This PR drops old Bundler versions (1.14 or lower) to prevent the following error. ## Bundler 1.14 An unexpected error occurs. ```console % bundle _1.14.6_ exec rubocop bundler: failed to load command: rubocop (/Users/koic/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/bin/rubocop) TypeError: no implicit conversion of String into Integer /Users/koic/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/rubocop-0.67.1/exe/rubocop:16:in `<top (required)>' /Users/koic/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/bin/rubocop:23:in `load' /Users/koic/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/bin/rubocop:23:in `<top (required)>' ``` ## Bundler 1.15 Errors does not occur as expected. ```console % bundle _1.15.0_ exec rubocop [Warn] Performance Cops will be removed from RuboCop 0.68. Use rubocop-performance gem instead. https://github.com/rubocop-hq/rubocop/tree/master/manual/migrate_performance_cops.md (snip) ```
Thanks! |
Hi @koic! I don't think this PR fixes the issue.
What you can do is activate the version your code needs inside the rubocop executable ( Also, shouldn't the warning be activated only if the user is actually using performance cops? |
Fixes rubocop#6939. Fixes rubocop#6917. This warning should not be displayed if users don't use Performance cops as follows: - rubocop#6845 (comment) - rubocop#6919 (comment) In the future, it will be better to replace it with a mechanism that displays a warning only when the user need Performance cops. This PR removes a warning for rubocop-performance when runinng `rubocop` command. It just leave a warning just to `gem install rubocop`. https://github.com/rubocop-hq/rubocop/blob/v0.67.2/rubocop.gemspec#L47
@deivid-rodriguez Right! Thanks for your feedback.
I opened a PR #6944 that removes a warning when running |
Fixes #6939. Fixes #6917. This warning should not be displayed if users don't use Performance cops as follows: - #6845 (comment) - #6919 (comment) In the future, it will be better to replace it with a mechanism that displays a warning only when the user need Performance cops. This PR removes a warning for rubocop-performance when running `rubocop` command. It leaves a warning just for `gem install rubocop`. https://github.com/rubocop-hq/rubocop/blob/v0.67.2/rubocop.gemspec#L47
No problem, thanks to you for your good work! |
Rubocop failed for older bundlers because "Bundle dependencies" were change to be a Hash instead of an Array in: rubygems/bundler@9febe9a Fix is here:agraul@09e0a90. It may help when bringing this back only for the case the user need Performance without having to require a newer Bundler. |
Fixes #6917.
This PR bumps Bundler dependency to >= 1.15.0.
Bundler 2 has already been released.
This PR drops old Bundler versions (1.14 or lower) to prevent the following error.
Bundler 1.14
An unexpected error occurs.
Bundler 1.15
Errors does not occur as expected.
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).and description in grammatically correct, complete sentences.
bundle exec rake default
. It executes all tests and RuboCop for itself, and generates the documentation.