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

Tapioca generated RBI for spoom 1.2.2 fails typechecking #405

Closed
jesse-shopify opened this issue Jun 21, 2023 · 4 comments
Closed

Tapioca generated RBI for spoom 1.2.2 fails typechecking #405

jesse-shopify opened this issue Jun 21, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@jesse-shopify
Copy link

Describe the bug
Upgrading from spoom 1.2.1 to 1.2.2 produces errors when the RBI file is regenerated using tapioca.

There are 74 errors but all seem to stem from these 2 causes:

  • Unable to resolve constant SyntaxTree
  • Spoom::Deadcode::Indexer#... is marked override but does not override anything

To Reproduce
Spoom version: 1.2.2

Steps to reproduce the behavior:

  1. bundle exec tapioca gem spoom
  2. bundle exec srb

Expected behavior

In version 1.2.1 srb completes with no errors.

@jesse-shopify jesse-shopify added the bug Something isn't working label Jun 21, 2023
@Morriar
Copy link
Collaborator

Morriar commented Jun 21, 2023

👋 Hey @jesse-shopify,

Can you try to add require "syntax_tree" in your sorbet/tapioca/require.rb file and run tapioca gem again please? 🙏

@jesse-shopify
Copy link
Author

jesse-shopify commented Jun 21, 2023

Thanks! I found the solution. It is because I already had the latest syntax_tree (and thus prettier_print) RBI files, so they didn't get regenerated when spoom was updated. This fixed it:

bundle exec tapioca gem syntax_tree prettier_print spoom

@michaelherold
Copy link

We had the same issue and Jesse's fix was required. require "syntax_tree" doesn't do anything because it's the older RBIs that cause the problem.

This makes me wonder if, when updating Tapioca, we should always regenerate all RBIs?

@andyw8
Copy link
Contributor

andyw8 commented Aug 22, 2023

It's a good practice to do so, but it's time-consuming. We're working on more automation to help with this.

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

No branches or pull requests

4 participants