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

Add versioning to ErrorReporter methods and backfill 7.0 signatures #278

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

@bdewater bdewater requested a review from a team as a code owner August 13, 2024 15:05
@bdewater
Copy link
Contributor Author

This is causing linting errors:

### Linting RBI files...

Linting activesupport...

Error: rbi/annotations/activesupport.rbi:486:3: W: Lint/DuplicateMethods: Method ActiveSupport::ErrorReporter#handle is defined at both rbi/annotations/activesupport.rbi:471 and rbi/annotations/activesupport.rbi:486.
  def handle(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil), source: T.unsafe(nil), &blk); end
  ^^^^^^^^^^
rbi/annotations/activesupport.rbi:513:3: W: Lint/DuplicateMethods: Method ActiveSupport::ErrorReporter#record is defined at both rbi/annotations/activesupport.rbi:499 and rbi/annotations/activesupport.rbi:513.
  def record(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil), &blk); end
  ^^^^^^^^^^
rbi/annotations/activesupport.rbi:536:3: W: Lint/DuplicateMethods: Method ActiveSupport::ErrorReporter#report is defined at both rbi/annotations/activesupport.rbi:5[24](https://github.com/Shopify/rbi-central/actions/runs/10372306547/job/28714725504#step:4:25) and rbi/annotations/activesupport.rbi:536.
  def report(error, handled: true, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end
  ^^^^^^^^^^

and fails static checking:

### Checking RBI files against Tapioca and Sorbet...

Checking static for activesupport...

Error: rbi/annotations/activesupport.rbi:486: Method ActiveSupport::ErrorReporter#handle redefined without matching argument count. Expected: 4, got: 5 https://srb.help/4010
     486 |  def handle(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil), source: T.unsafe(nil), &blk); end
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

rbi/annotations/activesupport.rbi:[51](https://github.com/Shopify/rbi-central/actions/runs/10372306547/job/28714725504?pr=278#step:4:52)3: Method ActiveSupport::ErrorReporter#record redefined without matching argument count. Expected: 3, got: 4 https://srb.help/4010
     513 |  def record(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil), &blk); end
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

rbi/annotations/activesupport.rbi:[53](https://github.com/Shopify/rbi-central/actions/runs/10372306547/job/28714725504?pr=278#step:4:54)6: Method ActiveSupport::ErrorReporter#report redefined without matching argument count. Expected: 4, got: 5 https://srb.help/4010
     536 |  def report(error, handled: true, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

... and backfill the 7.0 signatures
@egiurleo
Copy link
Contributor

I think the issues preventing this from being merged were adequately addressed by @KaanOzkan in #286. Woohoo!

@egiurleo egiurleo merged commit 0a1ad30 into Shopify:main Nov 14, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants