Skip to content

Conversation

@epage
Copy link
Contributor

@epage epage commented Dec 4, 2025

What does this PR try to resolve?

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

How to test and review this PR?

@epage epage added the T-cargo Team: Cargo label Dec 4, 2025
@rustbot rustbot added Command-package S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 4, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 4, 2025

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot

This comment has been minimized.

@weihanglo
Copy link
Member

weihanglo commented Dec 5, 2025

@rfcbot fcp merge T-cargo

Before this change

  • cargo package --registry REG --list would fail if REG wasn’t in the package.publish list.
  • If config registry.default is set, cargo package --list can fail even without --registry CLI option specified.

After this change, it now succeeds. This closes a door to the possibility that (--registry/registry.default) + --list with package.publish specified may be useful in the future.

Note that it already succeeds with package.publish=false.

@rust-rfcbot
Copy link
Collaborator

rust-rfcbot commented Dec 5, 2025

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.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period An FCP proposal has started, but not yet signed off. disposition-merge FCP with intent to merge labels Dec 5, 2025
@epage
Copy link
Contributor Author

epage commented Dec 5, 2025

@rfcbot fcp merge T-cargo

Before this change

cargo package --registry REG --list would fail if REG wasn’t in the package.publish list.

After this change, it now succeeds. This closes a door to the possibility that --registry + --list with package.publish specified may be useful in the future.

Note that it isn't just with --registry that this failed but with registry.default being set which is the more interesting case because it means cargo package --list can fail.

@weihanglo
Copy link
Member

Thanks. Included in the FCP text.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

Copy link
Member

@0xPoe 0xPoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ehuss ehuss moved this to FCP merge in Cargo status tracker Dec 9, 2025
@rust-rfcbot rust-rfcbot added the final-comment-period FCP — a period for last comments before action is taken label Dec 9, 2025
@rust-rfcbot rust-rfcbot removed the proposed-final-comment-period An FCP proposal has started, but not yet signed off. label Dec 9, 2025
@rust-rfcbot
Copy link
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

@rustbot
Copy link
Collaborator

rustbot commented Dec 9, 2025

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.

@weihanglo
Copy link
Member

Since this is not too controversial, I am going to merge this now. Also 1.94-nightly were just branched off last week so we have roughly 10 weeks period to re-evaluate.

If anything comes up and doesn't feel right, let us know!

@weihanglo weihanglo added this pull request to the merge queue Dec 12, 2025
Merged via the queue into rust-lang:master with commit 94f73a3 Dec 12, 2025
28 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 12, 2025
bors added a commit to rust-lang/rust that referenced this pull request Dec 13, 2025
Update cargo submodule

27 commits in 2c283a9a5c5968eeb9a8f12313f04feb1ff8dfac..c46423de7351e3c4c734b2faa86088a9f5d1302b
2025-12-04 16:47:28 +0000 to 2025-12-12 23:16:12 +0000
- feat(report): cargo report timings HTML replay (rust-lang/cargo#16377)
- feat: stabilize `-Zconfig-include` (rust-lang/cargo#16284)
- fix(package): Don't verify registry for --list  (rust-lang/cargo#16341)
- Fixed incorrect locking logic when artifact-dir == build-dir (rust-lang/cargo#16385)
- feat(log): make timing messages ready for HTML replay (rust-lang/cargo#16382)
- chore(deps): update msrv (1 version) to v1.92 (rust-lang/cargo#16381)
- Downgrade curl-sys to 0.4.83 (rust-lang/cargo#16379)
- fix(timing): more self-contained timing/log data (rust-lang/cargo#16378)
- test: update to `proc_macro::tracked::path` (rust-lang/cargo#16380)
- refactor(lint): move lints to separate modules (rust-lang/cargo#16364)
- fix(index): Apply feedback from Cargo team (rust-lang/cargo#16369)
- fix(lints): handle lints separately at ws pkg level  (rust-lang/cargo#16367)
- feat(lint): new `implicit_minimum_version_req` lint (rust-lang/cargo#16321)
- fix(info): default to local without explicit reg (rust-lang/cargo#16358)
- Remove `[no-mentions]` handler in our triagebot config (rust-lang/cargo#16361)
- Don't read the config file twice when $CARGO_HOME is a symlink (rust-lang/cargo#16325)
- fix(timings): forgot to negate filter (rust-lang/cargo#16352)
- fix(doctest): Include all search paths with new build layout  (rust-lang/cargo#16348)
- fix(layout): Remove hashes from bins in new layout  (rust-lang/cargo#16351)
- docs(faq): Include an entry on disk space (rust-lang/cargo#16349)
- feat(timings): derive concurrency data from unit data (rust-lang/cargo#16350)
- perf(layout): Use unit_id, not pkg hash, for bin/lib pkg_dirs for new layout (rust-lang/cargo#16345)
- Validate target source paths before compilation with clearer errors (rust-lang/cargo#16338)
- test(doc): Remove unused build script (rust-lang/cargo#16344)
- refactor(timings): store UnitData in RenderContext instead  (rust-lang/cargo#16346)
- perf(clean): Optimize (legacy) clean with multiple -p specifiers (rust-lang/cargo#16264)
- test: Adjust output for out-of-tree build-dir (rust-lang/cargo#16343)
bors added a commit to rust-lang/rust that referenced this pull request Dec 13, 2025
Update cargo submodule

29 commits in 2c283a9a5c5968eeb9a8f12313f04feb1ff8dfac..e91b2baa632c0c7e84216c91ecfe107c37d887c1
2025-12-04 16:47:28 +0000 to 2025-12-13 16:29:21 +0000
- refactor(lints): move from cargo::util::lints to cargo::lints (rust-lang/cargo#16392)
- test(lint): redact more due to line got omitted (rust-lang/cargo#16391)
- feat(report): cargo report timings HTML replay (rust-lang/cargo#16377)
- feat: stabilize `-Zconfig-include` (rust-lang/cargo#16284)
- fix(package): Don't verify registry for --list  (rust-lang/cargo#16341)
- Fixed incorrect locking logic when artifact-dir == build-dir (rust-lang/cargo#16385)
- feat(log): make timing messages ready for HTML replay (rust-lang/cargo#16382)
- chore(deps): update msrv (1 version) to v1.92 (rust-lang/cargo#16381)
- Downgrade curl-sys to 0.4.83 (rust-lang/cargo#16379)
- fix(timing): more self-contained timing/log data (rust-lang/cargo#16378)
- test: update to `proc_macro::tracked::path` (rust-lang/cargo#16380)
- refactor(lint): move lints to separate modules (rust-lang/cargo#16364)
- fix(index): Apply feedback from Cargo team (rust-lang/cargo#16369)
- fix(lints): handle lints separately at ws pkg level  (rust-lang/cargo#16367)
- feat(lint): new `implicit_minimum_version_req` lint (rust-lang/cargo#16321)
- fix(info): default to local without explicit reg (rust-lang/cargo#16358)
- Remove `[no-mentions]` handler in our triagebot config (rust-lang/cargo#16361)
- Don't read the config file twice when $CARGO_HOME is a symlink (rust-lang/cargo#16325)
- fix(timings): forgot to negate filter (rust-lang/cargo#16352)
- fix(doctest): Include all search paths with new build layout  (rust-lang/cargo#16348)
- fix(layout): Remove hashes from bins in new layout  (rust-lang/cargo#16351)
- docs(faq): Include an entry on disk space (rust-lang/cargo#16349)
- feat(timings): derive concurrency data from unit data (rust-lang/cargo#16350)
- perf(layout): Use unit_id, not pkg hash, for bin/lib pkg_dirs for new layout (rust-lang/cargo#16345)
- Validate target source paths before compilation with clearer errors (rust-lang/cargo#16338)
- test(doc): Remove unused build script (rust-lang/cargo#16344)
- refactor(timings): store UnitData in RenderContext instead  (rust-lang/cargo#16346)
- perf(clean): Optimize (legacy) clean with multiple -p specifiers (rust-lang/cargo#16264)
- test: Adjust output for out-of-tree build-dir (rust-lang/cargo#16343)
@rustbot rustbot added this to the 1.94.0 milestone Dec 13, 2025
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Dec 14, 2025
Update cargo submodule

29 commits in 2c283a9a5c5968eeb9a8f12313f04feb1ff8dfac..e91b2baa632c0c7e84216c91ecfe107c37d887c1
2025-12-04 16:47:28 +0000 to 2025-12-13 16:29:21 +0000
- refactor(lints): move from cargo::util::lints to cargo::lints (rust-lang/cargo#16392)
- test(lint): redact more due to line got omitted (rust-lang/cargo#16391)
- feat(report): cargo report timings HTML replay (rust-lang/cargo#16377)
- feat: stabilize `-Zconfig-include` (rust-lang/cargo#16284)
- fix(package): Don't verify registry for --list  (rust-lang/cargo#16341)
- Fixed incorrect locking logic when artifact-dir == build-dir (rust-lang/cargo#16385)
- feat(log): make timing messages ready for HTML replay (rust-lang/cargo#16382)
- chore(deps): update msrv (1 version) to v1.92 (rust-lang/cargo#16381)
- Downgrade curl-sys to 0.4.83 (rust-lang/cargo#16379)
- fix(timing): more self-contained timing/log data (rust-lang/cargo#16378)
- test: update to `proc_macro::tracked::path` (rust-lang/cargo#16380)
- refactor(lint): move lints to separate modules (rust-lang/cargo#16364)
- fix(index): Apply feedback from Cargo team (rust-lang/cargo#16369)
- fix(lints): handle lints separately at ws pkg level  (rust-lang/cargo#16367)
- feat(lint): new `implicit_minimum_version_req` lint (rust-lang/cargo#16321)
- fix(info): default to local without explicit reg (rust-lang/cargo#16358)
- Remove `[no-mentions]` handler in our triagebot config (rust-lang/cargo#16361)
- Don't read the config file twice when $CARGO_HOME is a symlink (rust-lang/cargo#16325)
- fix(timings): forgot to negate filter (rust-lang/cargo#16352)
- fix(doctest): Include all search paths with new build layout  (rust-lang/cargo#16348)
- fix(layout): Remove hashes from bins in new layout  (rust-lang/cargo#16351)
- docs(faq): Include an entry on disk space (rust-lang/cargo#16349)
- feat(timings): derive concurrency data from unit data (rust-lang/cargo#16350)
- perf(layout): Use unit_id, not pkg hash, for bin/lib pkg_dirs for new layout (rust-lang/cargo#16345)
- Validate target source paths before compilation with clearer errors (rust-lang/cargo#16338)
- test(doc): Remove unused build script (rust-lang/cargo#16344)
- refactor(timings): store UnitData in RenderContext instead  (rust-lang/cargo#16346)
- perf(clean): Optimize (legacy) clean with multiple -p specifiers (rust-lang/cargo#16264)
- test: Adjust output for out-of-tree build-dir (rust-lang/cargo#16343)
github-actions bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Dec 15, 2025
Update cargo submodule

29 commits in 2c283a9a5c5968eeb9a8f12313f04feb1ff8dfac..e91b2baa632c0c7e84216c91ecfe107c37d887c1
2025-12-04 16:47:28 +0000 to 2025-12-13 16:29:21 +0000
- refactor(lints): move from cargo::util::lints to cargo::lints (rust-lang/cargo#16392)
- test(lint): redact more due to line got omitted (rust-lang/cargo#16391)
- feat(report): cargo report timings HTML replay (rust-lang/cargo#16377)
- feat: stabilize `-Zconfig-include` (rust-lang/cargo#16284)
- fix(package): Don't verify registry for --list  (rust-lang/cargo#16341)
- Fixed incorrect locking logic when artifact-dir == build-dir (rust-lang/cargo#16385)
- feat(log): make timing messages ready for HTML replay (rust-lang/cargo#16382)
- chore(deps): update msrv (1 version) to v1.92 (rust-lang/cargo#16381)
- Downgrade curl-sys to 0.4.83 (rust-lang/cargo#16379)
- fix(timing): more self-contained timing/log data (rust-lang/cargo#16378)
- test: update to `proc_macro::tracked::path` (rust-lang/cargo#16380)
- refactor(lint): move lints to separate modules (rust-lang/cargo#16364)
- fix(index): Apply feedback from Cargo team (rust-lang/cargo#16369)
- fix(lints): handle lints separately at ws pkg level  (rust-lang/cargo#16367)
- feat(lint): new `implicit_minimum_version_req` lint (rust-lang/cargo#16321)
- fix(info): default to local without explicit reg (rust-lang/cargo#16358)
- Remove `[no-mentions]` handler in our triagebot config (rust-lang/cargo#16361)
- Don't read the config file twice when $CARGO_HOME is a symlink (rust-lang/cargo#16325)
- fix(timings): forgot to negate filter (rust-lang/cargo#16352)
- fix(doctest): Include all search paths with new build layout  (rust-lang/cargo#16348)
- fix(layout): Remove hashes from bins in new layout  (rust-lang/cargo#16351)
- docs(faq): Include an entry on disk space (rust-lang/cargo#16349)
- feat(timings): derive concurrency data from unit data (rust-lang/cargo#16350)
- perf(layout): Use unit_id, not pkg hash, for bin/lib pkg_dirs for new layout (rust-lang/cargo#16345)
- Validate target source paths before compilation with clearer errors (rust-lang/cargo#16338)
- test(doc): Remove unused build script (rust-lang/cargo#16344)
- refactor(timings): store UnitData in RenderContext instead  (rust-lang/cargo#16346)
- perf(clean): Optimize (legacy) clean with multiple -p specifiers (rust-lang/cargo#16264)
- test: Adjust output for out-of-tree build-dir (rust-lang/cargo#16343)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Command-package disposition-merge FCP with intent to merge final-comment-period FCP — a period for last comments before action is taken T-cargo Team: Cargo

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Cargo registry.default setting breaks registry checks

6 participants