Skip to content

Using alternative registries names in text output #6691

Closed
@imp

Description

@imp

Now, that alternative registries have been stabilized, they are referenced by the index URL, which is definitely unique. However, it is not necessarily a human-friendly and may be quite long at times.
crates.io, on the other hand, is called just that - "crates.io".

Here is how it shows when running cargo update

$ cargo update
    Updating crates.io index
    Updating `https://gitlab.com/xxx/cargo/crates-index` index

The index URL is listed only in the .cargo/config and not in Cargo.toml, so it may be not readily recognizable by the user and/or linked to the alternative registry in use (especially if a number of different alt registries are in use simultaneously)

I suggest to use the name of the registry instead and fallback to the URL only when the name is None (it is defined as Option<String>)

Metadata

Metadata

Assignees

Labels

A-registriesArea: registriesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`E-mediumExperience: Medium

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions