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

Questions regarding registry-index. #6499

Closed
ehuss opened this issue Dec 30, 2018 · 6 comments
Closed

Questions regarding registry-index. #6499

ehuss opened this issue Dec 30, 2018 · 6 comments

Comments

@ehuss
Copy link
Contributor

ehuss commented Dec 30, 2018

The ability to specify an alternate registry via URL with registry-index in a dependency was added in #4957. I had some questions about this:

  • Should this be documented?
  • Why was it chosen to use a different key instead of reusing the registry field as suggested in the RFC?
  • How is it supposed to work? cargo publish doesn't seem to handle it properly. There are almost no tests for it.

cc @sfackler

@sfackler
Copy link
Member

registry is elaborated into registry-index by cargo package so that the published crate doesn't depend on what the user decided the name of the registry should be. It's basically an implementation detail and shouldn't be used by people directly.

@sfackler
Copy link
Member

The linked issue goes into more detail: #4880

@ehuss
Copy link
Contributor Author

ehuss commented Dec 30, 2018

When is that rewritten registry-index used? AFAICT, Cargo always uses the index data for dependencies, and ignores the Cargo.toml in the crate file.

@sfackler
Copy link
Member

#4880 (comment)

@sfackler
Copy link
Member

The registry name is resolved to a URL at manifest parse time. We definitely parse the manifest, or there'd be no reason to go through all the effort of canonicalizing it in the first place.

@ehuss
Copy link
Contributor Author

ehuss commented Dec 31, 2018

Ah, yea, I understand now. I'm working on a PR at #6500, and I updated it with some fixes related to this. If you have some time to look at it and provide feedback, I'd appreciate it.

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

No branches or pull requests

2 participants