[mirror] Ignore --no-modules when --include-module is set#417
Merged
Conversation
--include-module was silently ignored under --no-modules, producing a bundle with no modules and no warning. Treat the whitelist as intent: drop --no-modules, mirror only the listed modules, and warn on stderr. Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
ldmonster
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
--no-modulesand--include-modulecontradict each other. Treat the whitelist as intent: mirror the listed modules and drop--no-modules, instead of silently mirroring nothing.Problem
--no-modulesskips module mirroring,--include-modulewhitelists modules to mirror--include-modulewas silently ignoredFix
parseAndValidateParameters: when both are set,--include-modulewins--no-modulesso only the whitelisted modules are mirroredBefore / After
Before:
--no-modules --include-module fooskipped all modules and ignored the whitelist without warning.After: the same command warns
--no-modules is ignored because --include-module is setand mirrors onlyfoo.Tests
TestValidationResolveModuleFlags- covers the pair dropping--no-modules, and each flag alone left untouched