Skip to content
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

regression with multiple registries error #11524

Closed
ehuss opened this issue Dec 30, 2022 · 1 comment
Closed

regression with multiple registries error #11524

ehuss opened this issue Dec 30, 2022 · 1 comment
Labels
A-registries Area: registries C-bug Category: bug regression-from-stable-to-beta Regression in beta that previously worked in stable.

Comments

@ehuss
Copy link
Contributor

ehuss commented Dec 30, 2022

Problem

@dasbard reported that they were using an alias for a registry where two registry definitions had the same index. Starting with #10592, this is now not allowed. I don't think we anticipated users having such a configuration, so we should consider if we can avoid this regression. This results in the error:

error: multiple registries are configured with the same index url 'registry+https://…': bar, foo

Steps

Set up a configuration with two registries with the same value:

[registries.foo]
index = "https://github.com/rust-lang/crates.io-index.git"

[registries.bar]
index = "https://github.com/rust-lang/crates.io-index.git"

Possible Solution(s)

@arlosi Do you have any ideas if we can avoid an error in this situation?

Notes

No response

Version

cargo 1.68.0-nightly (70898e522 2022-12-05)
release: 1.68.0-nightly
commit-hash: 70898e522116f6c23971e2a554b2dc85fd4c84cd
commit-date: 2022-12-05
host: x86_64-apple-darwin
libgit2: 1.5.0 (sys:0.15.0 vendored)
libcurl: 7.79.1 (sys:0.4.59+curl-7.86.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
os: Mac OS 12.6.0 [64-bit]
@ehuss ehuss added C-bug Category: bug A-registries Area: registries regression-from-stable-to-beta Regression in beta that previously worked in stable. labels Dec 30, 2022
@ehuss
Copy link
Contributor Author

ehuss commented Jan 3, 2023

We discussed this at today's team meeting, and have decided to close this as wont-fix for now. This was an intentional change as part of RFC 3139 to deal with avoiding ambiguous credentials. It may be possible to allow this situation if the configs are completely identical, but we would prefer to avoid that to keep things simple and to avoid potential confusion. We're still open to some possible workaround like that if we receive more reports of this being a problem.

I have opened #11531 to make a note of this, and will also tie into the upstream release notes when they get posted.

@ehuss ehuss closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2023
bors added a commit that referenced this issue Jan 3, 2023
Add note to release notes about rejecting multiple registries.

This adds a note to the changelog about a change in stable behavior as part of the implementation of RFC 3139.

cc #11524
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-registries Area: registries C-bug Category: bug regression-from-stable-to-beta Regression in beta that previously worked in stable.
Projects
None yet
Development

No branches or pull requests

1 participant