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

Create a ComboIndexCache from registry name? #60

Closed
MarijnS95 opened this issue May 3, 2024 · 1 comment · Fixed by #61
Closed

Create a ComboIndexCache from registry name? #60

MarijnS95 opened this issue May 3, 2024 · 1 comment · Fixed by #61
Labels
enhancement New feature or request

Comments

@MarijnS95
Copy link

In case of a publishing tool like cargo smart-release --registry xxx, individual crates via the [package] publish = ["xxx"] attribute, or [registry] default = "xxx" in .cargo/config.toml, users specify a registry by name which resolve to a registry defined via env vars or in the .cargo/config.toml [regitries] table.

Since this crate already seems to have some support to parse .cargo/config.toml (and follows precedence order), would it be possible to get constructors for ComboIndexCache (and/or one of the IndexLocation/IndexUrl types) with the name of a registry, and automatically piece together the URL from that?

As a side-quest, note also that the existing [source] replace-with functionality can also point to such named [registries].

Note that this request, together with many more issues, was first asked at the crate tame-index was hard-forked from: frewsxcv/rust-crates-index#168. Most of the issues described there seem to have already been addressed here, which is why I'm investigating whether tame-index could be a sensible replacement for rust-crates-index.

@MarijnS95
Copy link
Author

Thanks for the very quick solution @Jake-Shadle! I'll queue this up to replace rust-crates-index in cargo-smart-release with tame-index as that's exactly where I'll need this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant