Summary
--proxy-registry does not validate the packages requirement up front. When packages are being pulled (not skipped) and no --include-package is given, the pull passes pre-run validation and then fails late, during the packages phase.
Details
internal/mirror/cmd/pull/validation.go — validateProxyRegistryFlag enforces the --include-platform (platform) and --include-module@<constraint> (modules) requirements, but never considers packages.
internal/mirror/packages/packages.go — in proxy mode, discoverPackageNames requires a whitelist and errors with --proxy-registry requires a whitelist of packages (--include-package).
So a command like:
d8 mirror pull /tmp/bundle --proxy-registry \
--include-platform ">=1.64" \
--include-module foo@^1.0.0
(packages left enabled, no --include-package) passes validation, does the platform/module work, and only then aborts in the packages phase.
Impact
Late failure after significant work, instead of an immediate, actionable validation error at startup.
Expected
Validate the packages requirement in validateProxyRegistryFlag — require --include-package (or --no-packages) when proxy mode pulls packages — symmetric with the existing modules/platform checks.
Severity: medium (UX). As of main (62132d6).
Summary
--proxy-registrydoes not validate the packages requirement up front. When packages are being pulled (not skipped) and no--include-packageis given, the pull passes pre-run validation and then fails late, during the packages phase.Details
internal/mirror/cmd/pull/validation.go—validateProxyRegistryFlagenforces the--include-platform(platform) and--include-module@<constraint>(modules) requirements, but never considers packages.internal/mirror/packages/packages.go— in proxy mode,discoverPackageNamesrequires a whitelist and errors with--proxy-registry requires a whitelist of packages (--include-package).So a command like:
(packages left enabled, no
--include-package) passes validation, does the platform/module work, and only then aborts in the packages phase.Impact
Late failure after significant work, instead of an immediate, actionable validation error at startup.
Expected
Validate the packages requirement in
validateProxyRegistryFlag— require--include-package(or--no-packages) when proxy mode pulls packages — symmetric with the existing modules/platform checks.Severity: medium (UX). As of
main(62132d6).