Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict between activerecord.rbi and sorbet-typed #370

Open
choubacha opened this issue Sep 8, 2021 · 0 comments
Open

Conflict between activerecord.rbi and sorbet-typed #370

choubacha opened this issue Sep 8, 2021 · 0 comments

Comments

@choubacha
Copy link

The changes from #347 appear to have exposed conflicts between the generated activerecord.rbi and the sorbet-typed files. After this update was pulled into an update we found that the activerecord.rbi file generated by the gems sorbet command conflicts with definitions with the sorbet-typed version:

sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi:566: Method ActiveRecord::Base.around_save redefined without matching argument count. Expected: 1, got: 3 https://srb.help/4010
     566 |  def self.around_save(
     567 |    *args,
     568 |    if: nil,
     569 |    unless: nil,
     570 |    &block
     571 |  ); end
    sorbet/rbi/gems/activerecord.rbi:2482: Previous definition
    2482 |  def self.around_save(*args, &block); end

This is resulting in the activerecord.rbi file being marked as typed: ignored and causing sorbet to think that many common activerecord methods (such as find_by and where) are not known to the type checker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant