Skip to content
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

Broken compatibility with rubocop-packages after latest *minor* update 1.33.0 #10871

Closed
ShockwaveNN opened this issue Aug 5, 2022 · 1 comment · Fixed by #10872
Closed

Broken compatibility with rubocop-packages after latest *minor* update 1.33.0 #10871

ShockwaveNN opened this issue Aug 5, 2022 · 1 comment · Fixed by #10872
Labels

Comments

@ShockwaveNN
Copy link
Contributor

ShockwaveNN commented Aug 5, 2022

Hi guys, just want to notify you that the latest update of rubocop was a minor update but seems it broke compatibility with rubocop-packaging extension

utkarsh2102/rubocop-packaging#44

Not sure that is an issue on side of rubocop or rubocop-packaging using som non-public API, but still think you need to know about it just in case

$ [bundle exec] rubocop -V
1.33.0 (using Parser 3.1.2.0, rubocop-ast 1.19.1, running on ruby 3.1.2 x86_64-linux)
  - rubocop-packaging 0.5.1
@koic koic added the bug label Aug 5, 2022
koic added a commit to koic/rubocop that referenced this issue Aug 5, 2022
…eprecated

Fixes rubocop#10871 and utkarsh2102/rubocop-packaging#44.

This PR restores `RuboCop::ConfigLoader.project_root` as deprecated.

It fixes the following build error.

```console
% cd path/to/github.com/utkarsh2102/rubocop-packaging
% bundle update && bundle exec rake
(snip)

Failures:

  1) RuboCop::Cop::Packaging::BundlerSetupInTests when `require
  bundler/setup` is used in a Rakefile does not register an offense
     Failure/Error: let(:project_root) {
  RuboCop::ConfigLoader.project_root }

     NoMethodError:
       undefined method `project_root' for RuboCop::ConfigLoader:Class
     # ./spec/rubocop/cop/packaging/bundler_setup_in_tests_spec.rb:6:in
       `block (2 levels) in <top (required)>'
     # ./spec/rubocop/cop/packaging/bundler_setup_in_tests_spec.rb:39:in
       `block (3 levels) in <top (required)>'
     # ./spec/rubocop/cop/packaging/bundler_setup_in_tests_spec.rb:43:in
       `block (3 levels) in <top (required)>'
```

I considered a soft deprecation, but decided to issue a warning as it
is probably of limited use.
bbatsov pushed a commit that referenced this issue Aug 5, 2022
Fixes #10871 and utkarsh2102/rubocop-packaging#44.

This PR restores `RuboCop::ConfigLoader.project_root` as deprecated.

It fixes the following build error.

```console
% cd path/to/github.com/utkarsh2102/rubocop-packaging
% bundle update && bundle exec rake
(snip)

Failures:

  1) RuboCop::Cop::Packaging::BundlerSetupInTests when `require
  bundler/setup` is used in a Rakefile does not register an offense
     Failure/Error: let(:project_root) {
  RuboCop::ConfigLoader.project_root }

     NoMethodError:
       undefined method `project_root' for RuboCop::ConfigLoader:Class
     # ./spec/rubocop/cop/packaging/bundler_setup_in_tests_spec.rb:6:in
       `block (2 levels) in <top (required)>'
     # ./spec/rubocop/cop/packaging/bundler_setup_in_tests_spec.rb:39:in
       `block (3 levels) in <top (required)>'
     # ./spec/rubocop/cop/packaging/bundler_setup_in_tests_spec.rb:43:in
       `block (3 levels) in <top (required)>'
```

I considered a soft deprecation, but decided to issue a warning as it
is probably of limited use.
WJWH pushed a commit to WJWH/rubocop that referenced this issue Aug 8, 2022
…eprecated

Fixes rubocop#10871 and utkarsh2102/rubocop-packaging#44.

This PR restores `RuboCop::ConfigLoader.project_root` as deprecated.

It fixes the following build error.

```console
% cd path/to/github.com/utkarsh2102/rubocop-packaging
% bundle update && bundle exec rake
(snip)

Failures:

  1) RuboCop::Cop::Packaging::BundlerSetupInTests when `require
  bundler/setup` is used in a Rakefile does not register an offense
     Failure/Error: let(:project_root) {
  RuboCop::ConfigLoader.project_root }

     NoMethodError:
       undefined method `project_root' for RuboCop::ConfigLoader:Class
     # ./spec/rubocop/cop/packaging/bundler_setup_in_tests_spec.rb:6:in
       `block (2 levels) in <top (required)>'
     # ./spec/rubocop/cop/packaging/bundler_setup_in_tests_spec.rb:39:in
       `block (3 levels) in <top (required)>'
     # ./spec/rubocop/cop/packaging/bundler_setup_in_tests_spec.rb:43:in
       `block (3 levels) in <top (required)>'
```

I considered a soft deprecation, but decided to issue a warning as it
is probably of limited use.
@pboling
Copy link
Contributor

pboling commented Jan 31, 2023

I found this issue by googling. The deprecation would ideally point to the file location, and line number of the offending deprecated usage. As it is I can't tell where the deprecation is coming from. Perhaps we need to upgrade the depreciation tooling inside RuboCop?

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

Successfully merging a pull request may close this issue.

3 participants