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

Missing documentation for registry-index in dependency specifying #9807

Open
oxalica opened this issue Aug 19, 2021 · 1 comment
Open

Missing documentation for registry-index in dependency specifying #9807

oxalica opened this issue Aug 19, 2021 · 1 comment
Labels
A-registries Area: registries C-bug Category: bug S-triage Status: This issue is waiting on initial triage.

Comments

@oxalica
Copy link

oxalica commented Aug 19, 2021

Problem

registry-index can be used to directly specify a registry index url for dependencies in Cargo.toml, without need to touch user's config .cargo/config.toml like registry. It's quite useful since everyone can clone and build your crate without the need to pollute their own user config.

Here's a internal test for this feature

registry-index = "{}"

The field is fully functional on stable cargo 1.54.0 but NOT mentioned in cargo reference. Only registry is documented.
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html
https://doc.rust-lang.org/cargo/reference/registries.html

Possible Solution(s)

Add the documentation for the registry-index feature.

Notes

Output of cargo version: cargo 1.54.0 (5ae8d74 2021-06-22)

I actually found this field in the crate cargo_toml, which defines structures of Cargo.toml. And I surprisingly found this undocumented but working-on-stable feature.

@oxalica oxalica added the C-bug Category: bug label Aug 19, 2021
@ehuss
Copy link
Contributor

ehuss commented Aug 20, 2021

FWIW, it was intentionally not documented. There is more context at #4880, but generally that field is an internal detail of Cargo that we don't intend for users to access. Changing that may require a bit more consideration than just changing the documentation.

@ehuss ehuss added the A-registries Area: registries label Aug 20, 2021
@epage epage added the S-triage Status: This issue is waiting on initial triage. label Nov 20, 2024
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 S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

3 participants