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

Enhance loading during tapioca gem #1576

Open
KaanOzkan opened this issue Jul 21, 2023 · 0 comments
Open

Enhance loading during tapioca gem #1576

KaanOzkan opened this issue Jul 21, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@KaanOzkan
Copy link
Contributor

bin/tapioca gem X loads all the gems but it only regenerates RBIs for X. This could cause issues when X RBIs rely on definitions from another gem, Y. An example of this is in spoom v1.2.2 (X) where there's a new method override that'll be generated in spoom's new RBIs. The abstract method is defined in syntax_tree gem(Y).

A problem occurs if loading of the abstract method has started after we last generated RBIs for syntax_tree. The abstract method isn't defined in syntax_tree's RBIs and we end up with a typechecking error.

We could implement @paracycle's suggestion from #1562 (comment)

  • Track references to external constants
  • Identify which gems the constants belong to
  • Queue RBI generation for those gems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants