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

check-shims should ignore typed: ignore files #1053

Closed
Morriar opened this issue Jul 12, 2022 · 1 comment · Fixed by #1054
Closed

check-shims should ignore typed: ignore files #1053

Morriar opened this issue Jul 12, 2022 · 1 comment · Fixed by #1054
Assignees
Labels
bug Something isn't working

Comments

@Morriar
Copy link
Collaborator

Morriar commented Jul 12, 2022

Consider this:

# file: sorbet/rbi/annotations/foo.rbi
# typed: true

class Foo; end
# file: sorbet/rbi/gems/[email protected]
# typed: ignore

class Foo; end

The check-shims command will complain that the definition for Foo is duplicated between the generated gem RBI and the annotations. Yet the generated gem RBI was generated with typed-override: ignore meaning that the RBI file for the gem is written on disk with typed: ignore thus not even seen by Sorbet. In this case the duplication is justified.

We should ignore files marked typed: ignore when running check-shims.

@Morriar Morriar added the bug Something isn't working label Jul 12, 2022
@Morriar Morriar self-assigned this Jul 12, 2022
@Morriar
Copy link
Collaborator Author

Morriar commented Jul 12, 2022

Not this could also happen between a shim and a generate gem RBI file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant