[DRE-maint] Bug#955405: ruby-thor: superclass mismatch for class Command

Johan Smits johan at smitsmail.net
Tue Mar 31 10:16:44 BST 2020


Package: ruby-thor
Version: 0.19.4-1
Severity: normal

Dear Maintainer,

When I update my rails project thor from `0.20.3` to `1.0.0` or `1.0.1` I cannot run tests anymore.
It gives me this trackback:

```
Traceback (most recent call last):
	82: from bin/rails:4:in `<main>'
	81: from ~/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `require'
	80: from ~/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:291:in `load_dependency'
	79: from ~/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `block in require'
	78: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	77: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	76: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	75: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	74: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	73: from ~/vendor/bundle/ruby/2.5.0/gems/railties-6.0.2.2/lib/rails/commands.rb:18:in `<top (required)>'
	72: from ~/vendor/bundle/ruby/2.5.0/gems/railties-6.0.2.2/lib/rails/command.rb:46:in `invoke'
	71: from ~/vendor/bundle/ruby/2.5.0/gems/railties-6.0.2.2/lib/rails/command/base.rb:69:in `perform'
	70: from /usr/lib/ruby/vendor_ruby/thor.rb:369:in `dispatch'
	69: from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:126:in `invoke_command'
	68: from /usr/lib/ruby/vendor_ruby/thor/command.rb:27:in `run'
	67: from ~/vendor/bundle/ruby/2.5.0/gems/railties-6.0.2.2/lib/rails/commands/test/test_command.rb:33:in `perform'
	66: from ~/vendor/bundle/ruby/2.5.0/gems/railties-6.0.2.2/lib/rails/test_unit/runner.rb:39:in `run'
	65: from ~/vendor/bundle/ruby/2.5.0/gems/railties-6.0.2.2/lib/rails/test_unit/runner.rb:50:in `load_tests'
	64: from ~/vendor/bundle/ruby/2.5.0/gems/railties-6.0.2.2/lib/rails/test_unit/runner.rb:50:in `each'
	63: from ~/vendor/bundle/ruby/2.5.0/gems/railties-6.0.2.2/lib/rails/test_unit/runner.rb:50:in `block in load_tests'
	62: from ~/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `require'
	61: from ~/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:291:in `load_dependency'
	60: from ~/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `block in require'
	59: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	58: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	57: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	56: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	55: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	54: from ~/test/controllers/fonts_controller_test.rb:1:in `<top (required)>'
	53: from ~/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `require'
	52: from ~/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:291:in `load_dependency'
	51: from ~/vendor/bundle/ruby/2.5.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:325:in `block in require'
	50: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	49: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	48: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	47: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	46: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	45: from ~/test/test_helper.rb:4:in `<top (required)>'
	44: from ~/vendor/bundle/ruby/2.5.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
	43: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	42: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	41: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	40: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	39: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	38: from ~/vendor/bundle/ruby/2.5.0/gems/railties-6.0.2.2/lib/rails/test_help.rb:11:in `<top (required)>'
	37: from ~/vendor/bundle/ruby/2.5.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
	36: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	35: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	34: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	33: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	32: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	31: from ~/vendor/bundle/ruby/2.5.0/gems/railties-6.0.2.2/lib/rails/generators/test_case.rb:3:in `<top (required)>'
	30: from ~/vendor/bundle/ruby/2.5.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
	29: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	28: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	27: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	26: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	25: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	24: from ~/vendor/bundle/ruby/2.5.0/gems/railties-6.0.2.2/lib/rails/generators.rb:6:in `<top (required)>'
	23: from ~/vendor/bundle/ruby/2.5.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
	22: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	21: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	20: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	19: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	18: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	17: from ~/vendor/bundle/ruby/2.5.0/gems/thor-1.0.1/lib/thor/group.rb:1:in `<top (required)>'
	16: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:49:in `require_relative'
	15: from ~/vendor/bundle/ruby/2.5.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
	14: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	13: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	12: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	11: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	10: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	 9: from ~/vendor/bundle/ruby/2.5.0/gems/thor-1.0.1/lib/thor/base.rb:1:in `<top (required)>'
	 8: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:49:in `require_relative'
	 7: from ~/vendor/bundle/ruby/2.5.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
	 6: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	 5: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	 4: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	 3: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	 2: from ~/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	 1: from ~/vendor/bundle/ruby/2.5.0/gems/thor-1.0.1/lib/thor/command.rb:1:in `<top (required)>'
~/vendor/bundle/ruby/2.5.0/gems/thor-1.0.1/lib/thor/command.rb:2:in `<class:Thor>': superclass mismatch for class Command (TypeError)
```

I run on Debian testing but I have installed `ruby-bundler` which also installs `ruby-thor at 0.19.4-1`. Not sure if this is the case but why does this break?

I have filed a report at the project: https://github.com/erikhuda/thor/issues/721
Their responce was:

Thor 0.19 has different superclass for Command. So if both versions are loaded you will get this error.

35ab20d.

bundler vendor thor with a different namespace to avoid this problem and others, so the fact debian doesn't respect that project choice is an issue in the OS, not in thor or even bundler.



-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.4.0-4-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=nl_NL.UTF-8, LC_CTYPE=nl_NL.UTF-8 (charmap=UTF-8), LANGUAGE=nl_NL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ruby-thor depends on:
ii  ruby  1:2.5.7.1

ruby-thor recommends no packages.

ruby-thor suggests no packages.

-- no debconf information



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