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.
Updates mdc for the latest resolve-deps work, then adds support for multiple modes directories.
I previously incorrectly added a 'npm install' check into mdc, not seeing that mdc actually supported a path to not use resolve-deps at all. This seems useful, if we can sustain it (and it doesn't confuse users), so I first restore that functionality and move the check into run-tests.sh. We can test this continues to work using test4 by explicitly listing modes that would have been resolved.
To support multiple modes directories, we have the resolve-deps-less path return the same "node=/some/path" format that resolve-deps would. We check all modes directories and ensure that each mode in the mode spec is found and found only once.
As part of this, I added some comments to mdc to delineate creating base compose and files dir, then looping over modes to incorporate their contents, then finally user feedback ("MODES: ...") and setting env for COMPOSE_PROFILES/etc. The goal was to reduce the processing needed to show "MODES: ...", but it has a small advantage of consolidating the code to show all the env vars we set.
I considered reworking test4 to use multiple modes dirs, but it makes the test4 README fairly verbose.