You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and built it with a cargo cache starting from scratch:
CARGO_HOME=/tmp/cargohome cargo build
and waited for everything to be downloaded.
I can see that the cargo git repo is cloned and the respective git commit checked out:
$ cd /tmp/cargohome/git
$ fd --max-depth 2
checkouts
checkouts/cargo-e7ff1db891893a9e
db
db/cargo-e7ff1db891893a9e
Next I tried to rebuild the dummy package from scratch without net connections.
Surprisingly that worked without -Z offline but with -Z offline made it fail:
error: no matching package named `core-foundation` found
location searched: registry `https://github.com/rust-lang/crates.io-index`
required by package `cargo v0.30.0 (https://github.com/rust-lang/cargo?rev=9311f6d439e09da3ab918397a425be57da13f04a#9311f6d4)`
... which is depended on by `a v0.1.0 (file:///tmp/a)`
As a reminder, you're using offline mode (-Z offline) which can sometimes cause surprising resolution failures, if this error is too confusing you may with to retry without the offline flag.
Everything needed was already stored in the cache though.
The text was updated successfully, but these errors were encountered:
Resolve: Be less strict while offline.
When offline, the resolver was requiring everything to be downloaded, even dependencies that are not used. This changes it so that the resolver can still resolve unavailable dependencies when offline. This pushes the failure to a later stage of Cargo where it attempts to download the dependency. This makes `-Z offline` work for target-cfg or optional dependencies that are not being used.
Fixes#6014.
This changes the error message significantly for the "unavailable" case (see test diff). I personally think the new error message is clearer, although it is shorter and provides less information. The old error message seemed large and scary, and was a little hard for me to grok. However, I'd be willing to look at tweaking the error behavior if not everyone agrees.
cargo 1.30.0-nightly (b917e3524 2018-09-09)
I
cargo new
ed a dummy project with cargo as git rependencyand built it with a cargo cache starting from scratch:
and waited for everything to be downloaded.
I can see that the cargo git repo is cloned and the respective git commit checked out:
Next I tried to rebuild the dummy package from scratch without net connections.
Surprisingly that worked without
-Z offline
but with-Z offline
made it fail:Everything needed was already stored in the cache though.
The text was updated successfully, but these errors were encountered: