Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Resolve: Be less strict while offline. #6814
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
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.
alexcrichton left a comment
Nice! This seems like a fix we definitely want because the referenced issue is definitely some crazy behavior!
The major purpose of the error message updates was to resolve a situation where you know that serde 1.0.39 is published but when you try to use it Cargo keeps saying it doesn't exist. The "by the way you're offline" is a hint to go find something passing
I think that the error message here clearly indicates that (aka if you hit an error it says you're offline so you can go hunting). There's still more error messages coming out of the resolver because we may not pick up newer versions, but the error messages here in the resolver weren't changed so it'll only show for the more obscure resolver errors rather than the bland "this package wasn't downloaded" situation.
All that to say that I think this is a great fix, thanks @ehuss!