You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(package): Skip registry check if its not needed (#15629)
### What does this PR try to resolve?
As of #13947, `-Zpackage-workspace` made `cargo package` require extra
arguments when it didn't need it before. When a packaging operation will
resolve dependencies, we need to know what registry packages would be
published to in order to correctly generate the overlay to generate the
right lockfile.
We skipped this if there were no dependencies, so no overlay was going
to be used, to reduce the impact of this.
This change goes a step further and only runs the check if the resolver
will run. This should mean that `-Zpackage-workspace` should now only
error when `cargo package` would have failed before.
### How to test and review this PR?
To verify this, the existing failure tests were forked, removing
`-Zpackage-workspace`, and then `--exclude-lockfile`, `--no-verify`, and
`--exclude-lockfile --no-verify` variants were added to characterize
when the check is behavior-neutral vs not needed and that the behavior
is now the same.
0 commit comments