Make `require.rb` less necessary
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 873
- Forks
- 164
- Avg merge
- 4d 27m
- Merged PRs (30d)
- 9
Description
One of the main stumbling blocks for people getting started with Tapioca is around the require.rb file. There are a few things we can do to improve the brittleness around it, some of which are:
-
Require all gems in the
Gemfileregardless ofrequire: false.This is a bit hacky, but most of our
require.rbfiles are dominated by the requires for gems that have been marked asrequire: falsein theGemfile. If we can make Bundler load those gems as well, then those entries in therequire.rbfile can just go away. -
Add built-in knowledge of some of the non-default requires of popular gems.
Like how Sorbet
srb rbitooling does, we can start maintaining a list of gems with their non-standard (optional) requires that we can use instead of asking everyone to keep redeclaring those again and again. Ideally, this would not be bundled into the Tapioca gem, but can be distributed out-of-band and fetched using a Tapioca command (maybetapioca requirecan do that?) -
Try to brute force loading as many files from the gem lib path as possible.
We could try to load all the files from a gem's lib directory, but we have to be careful about
exit/abortcalls,at_exithooks, etc etc and we also need to probably make a few passes through the requires to make sure that the include order related issues can be resolved as much as possible.
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 how require.rb is used and how gem lib paths are loaded. The issue proposes brute-force loading with safeguards for exit, abort, at_exit hooks, and repeated passes for require ordering. Done means reducing manual require.rb entries without introducing unsafe loading or order-related failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- devtools, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100