Refactor the ConstantFound event to take better advantage of polymorphism
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 873
- Forks
- 164
- Avg merge
- 4d 27m
- Merged PRs (30d)
- 9
Description
I wonder if we should do the breakdown of the kinds of constants at push time, so that these become 4 separate events instead:
AliasConstantFoundValueConstantFoundModuleConstantFoundForeignModuleConstantFound < ModuleConstantFound
All we would need to do is to move the logic in compile_constant inside push_constant and the handling becomes much simpler.
Originally posted by @paracycle in https://github.com/Shopify/tapioca/pull/903#discussion_r860921372
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 by tracing push_constant and compile_constant, then inspect the current ConstantFound event handling. Compare the event hierarchy with the four proposed event types and update the handling so each constant kind is represented separately; done means the refactor is consistent across the affected event flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100