Skip to content

Conversation

@paracycle
Copy link
Member

@paracycle paracycle commented Jan 12, 2026

Apparently missing gem specs are only populated if the platform for the declared gem is one of the platforms Bundler is installing for. Since :rbx wasn't one of the added platforms, the gem was completely being ignored.

However, we can't just add :rbx as a platform to the lockfile since (a) it is not a platform supported by RubyGems anymore, and (b) it isn't a platform that Sorbet has any support for.

Of the platforms supported by RubyGems, the one that we can also resolve Sorbet against seems only to be the :jruby platform. So, adding the gem that we expect to be missing as a :jruby platform gem and then adding :jruby as a platform to the lockfile resurfaces the missing gem spec again.

@paracycle paracycle requested a review from a team as a code owner January 12, 2026 19:38
Copy link
Contributor

@Morriar Morriar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find. But what was making the test pass sometimes and sometimes not

@paracycle
Copy link
Member Author

Nice find. But what was making the test pass sometimes and sometimes not

I think it has been consistently failing on Ruby 4, probably due to some recent Bundler changes. Not really sure, tbh. I was able to recreate on my local machine with Ruby 4.0.0 and Bundler 4.0.3, and was able to solve it this way.

Apparently missing gem specs are only populated if the platform for the
declared gem is one of the platforms Bundler is installing for. Since
`:rbx` wasn't one of the added platforms, the gem was completely being
ignored.

However, we can't just add `:rbx` as a platform to the lockfile since
(a) it is not a platform supported by RubyGems anymore, and (b) it isn't
a platform that Sorbet has any support for.

Of the platforms supported by RubyGems, the one that we can also resolve
Sorbet against seems only to be the `:jruby` platform. So, adding the
gem that we expect to be missing as a `:jruby` platform gem and then
adding `:jruby` as a platform to the lockfile resurfaces the missing gem
spec again.
@paracycle paracycle force-pushed the uk-fix-missing-specs-test branch from 182b76d to 17aa29a Compare January 12, 2026 19:56
@Morriar
Copy link
Contributor

Morriar commented Jan 12, 2026

I think it has been consistently failing on Ruby 4

I'm not sure, I see some status where
image it passed on some 4.0 tests and failed on some other.

Maybe it depends on the test order somehow? 🤔

@paracycle paracycle merged commit b107e22 into main Jan 12, 2026
19 checks passed
@paracycle paracycle deleted the uk-fix-missing-specs-test branch January 12, 2026 20:59
@paracycle
Copy link
Member Author

Sorry, I misspoke. Somehow it was consistently failing on Ruby 4.0 and Rails current. Not sure what was different about Rails 8.0 that didn't make it fail.

@paracycle
Copy link
Member Author

Actually, even that isn't true, I see all kinds of different ones failing. I was able to recreate it by running the test on its own on my branch, though, so that was lucky.

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 this pull request may close these issues.

3 participants