Skip to content

regression with multiple registries error #11524

Closed as not planned
Closed as not planned
@ehuss

Description

@ehuss

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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions