Make repo take precedence over sig/ in gem package #762
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR changes loading priority between gem_repo and sig/ in gem package. Repo will take precedence over sig/.
Currently sig/ in gem package takes precedence over gem_repo. It means if there're RBSs in both of gem_repo and sig/, sig/ is used.
It is not a useful behavior. We can modify gem_repo's content easily, especially if we use
rbs collection
. But we need to fork the gem to modify sig/ directory in the gem package.So, overriding RBS in sig/ with gem_repo is useful, but the opposite isn't.
I propose this PR to enable the overriding.
By the way, I'm wondering if EnvironmentLoader can receive the sources of RBS, which are gem_repo, sig/, or stdlibs.
I guess this PR is ok in most cases, but we need to specify the source to EnvLoader to make 100% sure that the loader loads RBS from expected places. I'll consider this problem 馃