Open tophattom opened 3 years ago
Still happens with Sorbet version 0.5.6357
@tophattom Hi Jaakko, can I ask if your ActiveRecord::Base has any method overriding "inherited"? I haven't seen this bug before and I suspect there is something that conflicts with the way sorbet-rails set up the inherited method.
https://github.com/chanzuckerberg/sorbet-rails/blob/master/lib/sorbet-rails/railtie.rb#L32
class ::ActiveRecord::Base
# open ActiveRecord::Base to override inherited
class << self
alias_method :sbr_old_inherited, :inherited
def inherited(child)
sbr_old_inherited(child)
# make the relation classes public so that they can be used for sorbet runtime checks
...
I can't find anything in our codebase that would override it. Maybe some gem could do that? I couldn't figure out what gem would do that if any so I'll attach my Gemfile and Gemfile.lock here.
Describe the bug: I'm getting the following error when trying to run
srb rbi hidden-definitions
after installingsorbet-rails
:Steps to reproduce: Install
sorbet-rails
, runsrb rbi hidden-definitions
either before of after running Rails RBI generator tasks.Expected behavior: Should not crash.
Versions: