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

cargo publish -Z sparse-registry going to git api when crate contains a dependency #11263

Closed
AsafZalcman-jfrog opened this issue Oct 20, 2022 · 2 comments · Fixed by #11268
Closed
Labels
A-sparse-registry Area: http sparse registries C-bug Category: bug

Comments

@AsafZalcman-jfrog
Copy link

Problem

In JFrog we have an automation that verifies the cargo sparse support using the nightly image.
since cargo 1.66.0-nightly (b332991 2022-10-13) our tests started to fail, and after investigation, we saw that when we tried to publish a crate that contains a dependency (that exists in the same registry, for example, artifactory), cargo executing index/info/refs request in order to resolve the dependency, instead of index/re/gi/registry_dep as we saw with cargo 1.66.0-nightly (b8f30cb 2022-10-10)

Steps

/usr/local/cargo/config:

[net]
�git-fetch-with-cli = true
[registry]
�default = "artifactory"
[source.artifactory]
  registry = "sparse+http://172.17.0.2:8081/artifactory/api/cargo/cargo-local-notb0ugzus/index/"
[source.crates-io]
�  replace-with = "artifactory"
[registries.artifactory]
 index = "sparse+http://172.17.0.2:8081/artifactory/api/cargo/cargo-local-notb0ugzus/index/"

Cargo.toml file:

[package]
�name = "cargo_test_package"
�version = "0.1.0"
�edition = "2021"
�publish = ["artifactory"]

�[dependencies]
  registry_dep = { version = "0.1.0", registry = "artifactory" }
� regular_dep = "0.1.0"

Possible Solution(s)

No response

Notes

No response

Version

No response

@AsafZalcman-jfrog AsafZalcman-jfrog added the C-bug Category: bug label Oct 20, 2022
@weihanglo weihanglo added the A-sparse-registry Area: http sparse registries label Oct 20, 2022
@Eh2406
Copy link
Contributor

Eh2406 commented Oct 20, 2022

cc @arlosi.

Also were considering stabilizing sparse-registry in #11224 your real world feedback would be deeply appreciated.

@nadav-yo
Copy link

We at JFrog are now constantly test and monitor the nightly builds, so would love to provide additional feedback when needed. also, feel free to reach out to us as well whenever you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sparse-registry Area: http sparse registries C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants