feat(manifest): allow git dependency alongside alternate registry#16810
feat(manifest): allow git dependency alongside alternate registry#16810arlosi merged 2 commits intorust-lang:masterfrom
Conversation
|
r? @ehuss rustbot has assigned @ehuss. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Please update your commits for how they should be revewered and merged, rather than reflecting your development process. Within a PR, there isn't much reason to have a revert commit. |
fe1e42d to
d8e9ad4
Compare
ok, I squashed the revert commit into the original commit. |
|
@rfcbot fcp merge cargo Currently, you can have dep = { version = "1", git = "..." }which gets stripped on publish to dep = { version = "1" }but you can't have dep = { version = "1", registry = "foo", git = "..." }This PR fixes so |
|
Team member @epage 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. |
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
|
This seems un-contentious enough to avoid waiting the 10 day FCP period. |
Cargo submodule update 11 commits in a357df4c26fc14514e66aae2a269456b5545c7db..101549dddbd2b08e806f50154e3aa4cb3374cc21 2026-04-03 16:47:15 +0000 to 2026-04-08 12:51:20 +0000 - Never include use extra-filename in build scripts (rust-lang/cargo#16855) - fix(toml): Force script edition warnings on quiet (rust-lang/cargo#16848) - GitHub fast path uses `http_async` (rust-lang/cargo#16847) - feat(manifest): allow git dependency alongside alternate registry (rust-lang/cargo#16810) - fix(auth): add auth scheme hint to token rejected error for alt registries (rust-lang/cargo#16794) - Warn on invalid jobserver file descriptors (rust-lang/cargo#16843) - docs(unstable): List the minimum required MSRV for 'public' field (rust-lang/cargo#16841) - feat(lints): Emit unused_dependencies lint (rust-lang/cargo#16600) - fix(tree): clarify error message when `-i` is used without a package name (rust-lang/cargo#16818) - fix: Typo in target.<cfg>.linker (rust-lang/cargo#16839) - Send Content-Type header with cargo publish requests (rust-lang/cargo#16832) r? ghost
What does this PR try to resolve?
Removes the restriction that prevented combining
gitwithregistry(orregistry-index), bringing alternate registries to parity with crates.io for the multiple locations feature.Previously, any combination of
git + registrywas rejected. Now:git + pathis still always rejectedregistry + registry_indextogether is still rejectedgit + registryis allowed: the git arm(Some(git), None, _, _)handles itAt publishing time, it already stripped all
gitfields, leaving onlyregistry, so it required no changes.Fixes #10875
How to test and review this PR?
Run tests:
registry_and_git_dep_workspublish_with_git_and_registry_depin
alt_registrytest suite, and:git_registryin
cargo_addtest suite.