Summary
todo_spec.rb:34 ("it creates a list of all unresolved constants") fails on all Rails 8.0 CI matrix jobs (Ruby 3.2, 3.3, 3.4, 4.0), but passes on Rails current (8.1) and main.
Observed on PR #2588, commit 13303b7.
Failure
Sorbet's --print=missing-constants outputs different fully-qualified names on Rails 8.0 vs 8.1+:
module ::Undef1; end
-module ::Undef1::Undef3; end
-module ::Undef2::Undef4; end
+module ::Undef3::Undef1; end
+module ::Undef4::Undef2; end
module Foo::Bar::Undef6; end
module Foo::Bar::Undef7; end
module Foo::Undef2; end
The namespace nesting is reversed — ::Undef1::Undef3 becomes ::Undef3::Undef1.
Reproducing
The test input is:
::Undef1::Undef3.foo
Undef2::Undef4.bar
On Rails 8.0, Sorbet resolves these constant references differently than on 8.1+, presumably due to a difference in Rails' constant autoloading or namespace setup that affects Sorbet's resolver.
CI matrix
| Ruby |
Rails 8.0 |
Rails current (8.1) |
Rails main |
| 3.2 |
failure |
success |
- |
| 3.3 |
failure |
success |
success |
| 3.4 |
failure |
success |
success |
| 4.0 |
failure |
success |
success |
| head |
success |
success |
success |
Summary
todo_spec.rb:34("it creates a list of all unresolved constants") fails on all Rails 8.0 CI matrix jobs (Ruby 3.2, 3.3, 3.4, 4.0), but passes on Railscurrent(8.1) andmain.Observed on PR #2588, commit 13303b7.
Failure
Sorbet's
--print=missing-constantsoutputs different fully-qualified names on Rails 8.0 vs 8.1+:The namespace nesting is reversed —
::Undef1::Undef3becomes::Undef3::Undef1.Reproducing
The test input is:
On Rails 8.0, Sorbet resolves these constant references differently than on 8.1+, presumably due to a difference in Rails' constant autoloading or namespace setup that affects Sorbet's resolver.
CI matrix