Enhance loading during `tapioca gem`
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 873
- Forks
- 164
- Avg merge
- 4d 27m
- Merged PRs (30d)
- 9
Description
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 https://github.com/Shopify/tapioca/issues/1562#issuecomment-1644801566
- Track references to external constants
- Identify which gems the constants belong to
- Queue RBI generation for those gems.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with bin/tapioca gem and the spoom v1.2.2 and syntax_tree example described in the issue. Review the proposal in issue #1562 about tracking external constant references, identifying their owning gems, and queuing RBI generation. Done means dependent gem RBIs are regenerated when loading reveals definitions they rely on, with the relevant behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100