Skip to content

fix(deps): resolve crates.io dependencies to the crates.io index - #62

Open
BaptisteCentreon wants to merge 1 commit into
pulp:mainfrom
BaptisteCentreon:fix-crates-io-index
Open

BaptisteCentreon wants to merge 1 commit into
pulp:mainfrom
BaptisteCentreon:fix-crates-io-index

Conversation

@BaptisteCentreon

Copy link
Copy Markdown

When a crate is published, its dependencies come from the Cargo.toml inside the .crate tarball. For a crates.io dependency, that Cargo.toml has no registry key at all.

The old code wrote registry: null for a bare-string dependency and read a non-existent registry key for the table form. The index spec requires a non-crates.io registry to translate null into the crates.io index URL, otherwise cargo resolves those dependencies against the local registry and the build fails.

This change writes the crates.io index URL for bare-string dependencies, and reads registry-index (the packaged key that holds an index URL) for the table form, falling back to the crates.io index URL when it is absent.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant