[DRE-maint] Bug#1019608: rubocop: FTBFS with ruby3.1: ERROR: Test "ruby3.1" failed: 40.2) Failure/Error: expect($stderr.string).to eq('')

Antonio Terceiro terceiro at debian.org
Tue Sep 13 00:21:36 BST 2022


Source: rubocop
Version: 0.89.1+dfsg-3
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: debian-ruby at lists.debian.org
Usertags: ruby3.1

Hi,

We are about to start the ruby3.1 transition in unstable. While trying to
rebuild rubocop with ruby3.1 enabled, the build failed.

Relevant part of the build log (hopefully):
>       40.2) Failure/Error: expect($stderr.string).to eq('')
> 
>               expected: ""
>                    got: "An error occurred while Layout/BlockAlignment cop was inspecting /tmp/d20220912-3420401-v590mj/work/...5:in `invoke'\n/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/exe/rspec:4:in `<main>'\n"
> 
>               (compared using ==)
> 
>               Diff:
>               @@ -1,71 +1,142 @@
>               +An error occurred while Layout/BlockAlignment cop was inspecting /tmp/d20220912-3420401-v590mj/work/example.rb:1:0.
>               +To see the complete backtrace run rubocop -d.
>               +An error occurred while Layout/BlockAlignment cop was inspecting /tmp/d20220912-3420401-v590mj/work/example.rb:2:0.
>               +To see the complete backtrace run rubocop -d.
>               +An error occurred while Layout/BlockAlignment cop was inspecting /tmp/d20220912-3420401-v590mj/work/example.rb:3:0.
>               +To see the complete backtrace run rubocop -d.
>               +
>               +3 errors occurred:
>               +An error occurred while Layout/BlockAlignment cop was inspecting /tmp/d20220912-3420401-v590mj/work/example.rb:1:0.
>               +An error occurred while Layout/BlockAlignment cop was inspecting /tmp/d20220912-3420401-v590mj/work/example.rb:2:0.
>               +An error occurred while Layout/BlockAlignment cop was inspecting /tmp/d20220912-3420401-v590mj/work/example.rb:3:0.
>               +undefined method `metadata' for nil:NilClass
>               +
>               +            #{Gem.loaded_specs['rubocop'].metadata['bug_tracker_uri']}
>               +                                         ^^^^^^^^^
>               +/<<PKGBUILDDIR>>/lib/rubocop/cli/command/execute_runner.rb:55:in `display_error_summary'
>               +/<<PKGBUILDDIR>>/lib/rubocop/cli/command/execute_runner.rb:23:in `execute_runner'
>               +/<<PKGBUILDDIR>>/lib/rubocop/cli/command/execute_runner.rb:13:in `run'
>               +/<<PKGBUILDDIR>>/lib/rubocop/cli/command.rb:10:in `run'
>               +/<<PKGBUILDDIR>>/lib/rubocop/cli/environment.rb:17:in `run'
>               +/<<PKGBUILDDIR>>/lib/rubocop/cli.rb:65:in `run_command'
>               +/<<PKGBUILDDIR>>/lib/rubocop/cli.rb:72:in `execute_runners'
>               +/<<PKGBUILDDIR>>/lib/rubocop/cli.rb:41:in `run'
>               +/<<PKGBUILDDIR>>/spec/rubocop/cli/cli_autocorrect_spec.rb:1499:in `block (2 levels) in <top (required)>'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:262:in `instance_exec'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:262:in `block in run'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:508:in `block in with_around_and_singleton_context_hooks'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:465:in `block in with_around_example_hooks'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:486:in `block in run'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:626:in `block in run_around_example_hooks_for'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:350:in `call'
>               +/usr/share/rubygems-integration/all/gems/rspec-expectations-3.10.1/lib/rspec/expectations/failure_aggregator.rb:10:in `block in aggregate'
>               +/usr/share/rubygems-integration/all/gems/rspec-support-3.10.3/lib/rspec/support.rb:118:in `with_failure_notifier'
>               +/usr/share/rubygems-integration/all/gems/rspec-expectations-3.10.1/lib/rspec/expectations/failure_aggregator.rb:8:in `aggregate'
>               +/usr/share/rubygems-integration/all/gems/rspec-expectations-3.10.1/lib/rspec/matchers.rb:306:in `aggregate_failures'
>               +/<<PKGBUILDDIR>>/spec/support/cli_spec_behavior.rb:27:in `block (2 levels) in <top (required)>'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:455:in `instance_exec'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:455:in `instance_exec'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:390:in `execute_with'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:350:in `call'
>               +/<<PKGBUILDDIR>>/lib/rubocop/rspec/shared_contexts.rb:31:in `block (4 levels) in <top (required)>'
>               +/<<PKGBUILDDIR>>/lib/rubocop/rspec/shared_contexts.rb:30:in `chdir'
>               +/<<PKGBUILDDIR>>/lib/rubocop/rspec/shared_contexts.rb:30:in `block (3 levels) in <top (required)>'
>               +/usr/lib/ruby/3.1.0/tmpdir.rb:96:in `mktmpdir'
>               +/<<PKGBUILDDIR>>/lib/rubocop/rspec/shared_contexts.rb:7:in `block (2 levels) in <top (required)>'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:455:in `instance_exec'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:455:in `instance_exec'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:390:in `execute_with'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:628:in `block (2 levels) in run_around_example_hooks_for'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:350:in `call'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:629:in `run_around_example_hooks_for'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:486:in `run'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:465:in `with_around_example_hooks'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:508:in `with_around_and_singleton_context_hooks'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:259:in `run'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:644:in `block in run_examples'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:640:in `map'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:640:in `run_examples'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:606:in `run'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:121:in `block (3 levels) in run_specs'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:121:in `map'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:121:in `block (2 levels) in run_specs'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:2067:in `with_suite_hooks'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:116:in `block in run_specs'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/reporter.rb:74:in `report'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:115:in `run_specs'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:89:in `run'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:71:in `run'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:45:in `invoke'
>               +/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/exe/rspec:4:in `<main>'
>             # /<<PKGBUILDDIR>>/spec/rubocop/cli/cli_autocorrect_spec.rb:1500:in `block (2 levels) in <top (required)>'
> 
> Finished in 43.22 seconds (files took 3.17 seconds to load)
> 13647 examples, 40 failures, 10 pending
> 
> Failed examples:
> 
> rspec '/<<PKGBUILDDIR>>/spec/rubocop/cli/cli_options_spec.rb[1:12:1:4]' # RuboCop::CLI --show-cops with no args prints the current configuration
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cli_spec.rb:1012 # RuboCop::CLI configuration from file matches included/excluded files correctly when . argument is given
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cli_spec.rb:637 # RuboCop::CLI configuration from file when a value in a hash is overridden with nil acts as if the key/value pair was removed
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:331 # RuboCop::Cop::Layout::BlockAlignment accepts end aligned with a method call
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:463 # RuboCop::Cop::Layout::BlockAlignment registers an offense for mismatched block end with a mass assignment
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:291 # RuboCop::Cop::Layout::BlockAlignment accepts end aligned with a global variable
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:432 # RuboCop::Cop::Layout::BlockAlignment accepts end aligned with an or-asgn (||=)
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:455 # RuboCop::Cop::Layout::BlockAlignment accepts end aligned with a call chain left hand side
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:257 # RuboCop::Cop::Layout::BlockAlignment registers an offense for mismatched block end with an instance variable
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:439 # RuboCop::Cop::Layout::BlockAlignment registers an offense for mismatched block end with an or-asgn (||=)
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:278 # RuboCop::Cop::Layout::BlockAlignment registers an offense for mismatched block end with a class variable
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:311 # RuboCop::Cop::Layout::BlockAlignment accepts end aligned with a constant
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:400 # RuboCop::Cop::Layout::BlockAlignment accepts end aligned with an op-asgn (+=, -=)
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:447 # RuboCop::Cop::Layout::BlockAlignment accepts end aligned with a mass assignment
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:250 # RuboCop::Cop::Layout::BlockAlignment accepts end aligned with an instance variable
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:417 # RuboCop::Cop::Layout::BlockAlignment accepts end aligned with an and-asgn (&&=)
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:339 # RuboCop::Cop::Layout::BlockAlignment registers an offense for mismatched block end with a method call
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:318 # RuboCop::Cop::Layout::BlockAlignment registers an offense for mismatched block end with a constant
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:271 # RuboCop::Cop::Layout::BlockAlignment accepts end aligned with a class variable
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:298 # RuboCop::Cop::Layout::BlockAlignment registers an offense for mismatched block end with a global variable
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:96 # RuboCop::Cop::Layout::BlockAlignment registers an offense for mismatched block end with a variable
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:408 # RuboCop::Cop::Layout::BlockAlignment registers an offense for mismatched block end with an op-asgn (+=, -=)
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:424 # RuboCop::Cop::Layout::BlockAlignment registers an offense for mismatched block end with an and-asgn (&&=)
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:354 # RuboCop::Cop::Layout::BlockAlignment accepts end aligned with a method call with arguments
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:362 # RuboCop::Cop::Layout::BlockAlignment registers an offense for mismatched end with a method call with arguments
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:57 # RuboCop::Cop::Layout::BlockAlignment accepts end aligned with a variable
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:24 # RuboCop::Cop::Layout::BlockAlignment when the block has arguments registers an offense for mismatched block end
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:9 # RuboCop::Cop::Layout::BlockAlignment when the block has no arguments registers an offense for mismatched block end
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:232 # RuboCop::Cop::Layout::BlockAlignment when variables of a mass assignment spans several lines registers an offense for end aligned with the block
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:223 # RuboCop::Cop::Layout::BlockAlignment when variables of a mass assignment spans several lines accepts end aligned with the variables
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:610 # RuboCop::Cop::Layout::BlockAlignment when the block is terminated by } mentions } (not end) in the message
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:78 # RuboCop::Cop::Layout::BlockAlignment when there is an assignment chain accepts end aligned with the first variable
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:65 # RuboCop::Cop::Layout::BlockAlignment when there is an assignment chain registers an offense for an end aligned with the 2nd variable
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:638 # RuboCop::Cop::Layout::BlockAlignment when configured to align with start_of_line errors when do aligned
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:629 # RuboCop::Cop::Layout::BlockAlignment when configured to align with start_of_line allows when start_of_line aligned
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:670 # RuboCop::Cop::Layout::BlockAlignment when configured to align with do errors when start_of_line aligned
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cop/layout/block_alignment_spec.rb:661 # RuboCop::Cop::Layout::BlockAlignment when configured to align with do allows when do aligned
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cli/cli_autocorrect_spec.rb:885 # RuboCop::CLI corrects SymbolProc and SpaceBeforeBlockBraces offenses
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cli/cli_autocorrect_spec.rb:1029 # RuboCop::CLI can correct two problems with blocks
> rspec /<<PKGBUILDDIR>>/spec/rubocop/cli/cli_autocorrect_spec.rb:1485 # RuboCop::CLI corrects Style/BlockDelimiters offenses when specifingLayout/SpaceInsideBlockBraces together
> 
> Randomized with seed 39902
> 
> /usr/bin/ruby3.1 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.10.3/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/exe/rspec --pattern ./spec/\*\*/\*_spec.rb  --exclude-pattern spec/rubocop/config_loader_spec.rb --format documentation failed
> ERROR: Test "ruby3.1" failed: 


The full build log is available from:
https://people.debian.org/~terceiro/ruby3.1/17/rubocop/rubocop_0.89.1+dfsg-3+rebuild1663007326_amd64-2022-09-12T18:28:47Z.build

To reproduce this, you need ruby-all-dev >= 1:3.0+2.  Depending on when you
read this, this might mean installing ruby-all-dev from experimental, or ir the
transition has alraedy started in unstable, a normal build on unstable should
do it.  If you fail to reproduce, please provide a build log and diff it with
mine so that we can identify if something relevant changed in the meantime.

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please marking it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-ruby-extras-maintainers/attachments/20220912/d1dfeb68/attachment.sig>


More information about the Pkg-ruby-extras-maintainers mailing list