Support to call collection coomand in chid dir #1135
Merged
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 takes over #1025.
How to find
rbs_collection.yaml
andGemfile.lock
It searches these files with the following procedure.
rbs_collection.yaml
It searches this file upwards. Search
./rbs_collection.yaml
, then../rbs_collection.yaml
, then../../
, ...Gemfile.lock
It uses
Bundler.default_lockfile
, which is the same asbundle exec
'sGemfile.lock
. Ifrbs collection
is not executed with bundler, this method searchesGemfile.lock
with the same procedure asrbs_collection.yaml
.Mismatch between
rbs_collection.yaml
andGemfile.lock
As #1025 (comment),
rbs_collection.yaml
refers only to oneGemfile.lock
. If it refers to a differentGemfile.lock
,rbs collection install
generates inconsistentrbs_collection.lock.yaml
.rbs_collection.lock.yaml
recordsgemfile_lock_path
to avoid this problem. IfBundler.default_lockfile
points to a different path fromgemfile_lock_path
, it raises an error.This change extends the syntax of
rbs_collection.lock.yaml
, but it is not a breaking change because the old format is still supported. Ifrbs_collection.lock.yaml
has nogemfile_lock_path
, it doesn't check anything and record currentBundler.default_lockfile
asgemfile_lock_path
.