You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eager load autoloads registered before RBS rewriter is required
We need to eager load all the autoloads registered before we load the RBS rewriter, since we might enter into a weird loop when those constants are used for rewriting, which triggers their autoloads which tries to require their file, which we will try to rewrite, but fail since we need the constant to do the rewriting in the first place.
This is especially important since Prism has a few autoloaded constants whose associated file should NOT be rewritten (since they are needed for the rewriting itself), so should be loaded as early as possible.
Using the `AutoloadTracker` like this is appropriate since we continue to register autoloads even after the `eager_load_all!` is triggered, which makes calling `eager_load_all!` multiple times a safe operation.
0 commit comments