-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix(package): Don't verify registry for --list #16341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Since `--list` is doing nothing with registries, imo, it shouldn't error if `CARGO_REGISTRY_DEFAULT` is not in `package.publish`. This also affects `--registry` and `--index` but that should be fine. Fixes crate-ci/cargo-release#921
tests/testsuite/package.rs
Outdated
| p.cargo("package --registry alternative --list") | ||
| .with_status(101) | ||
| .with_stderr_data(str![[r#" | ||
| [ERROR] `foo` cannot be packaged. | ||
| The registry `alternative` is not listed in the `package.publish` value in Cargo.toml. | ||
| .with_stdout_data(str![[r#" | ||
| Cargo.lock | ||
| Cargo.toml | ||
| Cargo.toml.orig | ||
| src/main.rs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this turns an error case into a success case, I'm assuming we should have an FCP for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally don't think it is needed, but no harm to do it. We are going to miss the 1.93 window anyway.
This comment has been minimized.
This comment has been minimized.
tests/testsuite/package.rs
Outdated
| p.cargo("package --registry alternative --list") | ||
| .with_status(101) | ||
| .with_stderr_data(str![[r#" | ||
| [ERROR] `foo` cannot be packaged. | ||
| The registry `alternative` is not listed in the `package.publish` value in Cargo.toml. | ||
| .with_stdout_data(str![[r#" | ||
| Cargo.lock | ||
| Cargo.toml | ||
| Cargo.toml.orig | ||
| src/main.rs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally don't think it is needed, but no harm to do it. We are going to miss the 1.93 window anyway.
|
@rfcbot fcp merge T-cargo Before this change
After this change, it now succeeds. This closes a door to the possibility that ( Note that it already succeeds with |
|
Team member @weihanglo has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Note that it isn't just with |
|
Thanks. Included in the FCP text. |
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
What does this PR try to resolve?
Since
--listis doing nothing with registries, imo, it shouldn't error ifCARGO_REGISTRY_DEFAULTis not inpackage.publish.This also affects
--registryand--indexbut that should be fine.Fixes crate-ci/cargo-release#921
How to test and review this PR?