Open panthomakos opened 5 years ago
What happens when you run this: srb rbi suggest-typed
It's really weird that the bundler.rbi
would cause that but not cause it in sorbet-typed itself :/
Are you on the latest version of sorbet? I'm not seeing this error :?
Oh it seems to happen if you have the bundler.rbi
set to strong
or strict
. It won't error if it's set to true
.
We've temporarily reverted the change that caused this—that way, we can figure out what caused this situation to arise in the first place before re-merging the PR.
I'm still confused as to where the Elem
is supposed to be coming from :?
Also, if you want to get rid of the gem.rbi in your project you'll need to delete it yourself. Sorbet doesn't seem to delete files if they're in sorbet-typed, it only overwrites existing files or adds them.
ok, so it looks like Gem::Specification does indeed extend Enumerable in hidden.rbi
, which would be why there's an issue that CI didn't pick up, because CI doesn't generate any hidden definitions.
class Gem::Specification
extend ::Enumerable
end
So when I removed the explicit extend Enumerable
for Specification in #92, it fixed the problem in CI but not when actually using Sorbet.
hm, actually this might happen regardless of whether gem.rbi
is there? It seems to be entirely dependent on the typing level of bundler.rbi
. So this problem is probably just caused by bundle exec srb rbi sorbet-typed
not also running suggest-typed. At least, kind of.
Running suggest-typed
downgrades the file to typed: true
and resolves the issue. It seems as though that file should be able to have a higher strictness though?
I am getting this error after updating
sorbet-typed
and I am unsure how to resolve the issue: