-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix errors in cargo fetch
usage guide
#9785
Conversation
Running just `cargo build` after a `cargo fetch` *will* recheck the dependencies via the network. Running fetch onnly perpares the way for these other modes to be used withouth needing the network, it doesn't force subsequent commands to not use the network.
The description section above this has the actual behaviour correctly called out: > If `--target` is not specified, then all target dependencies are fetched. The options text appears to have been copied from `cargo build` where it is valid, but the defaults for `cargo fetch` are different.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. Please see the contribution instructions for more information. |
Thanks for the PR! I think the original is correct in regards to not accessing the network. Can you say more about why you think it is not the case? As for the |
Glad to see some good come out of our discussion, @alerque 😉 |
I'm going to close due to inactivity, but feel free to follow up if you think the documentation can be clarified. |
Fix errors in `cargo fetch` usage guide This is a recreation of #9785. 1. By [the doc](https://doc.rust-lang.org/cargo/commands/cargo-build.html#manifest-options), `cargo build` will always access the network unless `--frozen` or `--offline` is present. Instead, `cargo fetch` will fetch dependencies, and which will allow running subsequent Cargo commands in offline mode. 2. A general template was used for `--target` that is not appropriate for `cargo fetch`.
@ehuss I don not believe this should have been closed, the documentation is still wrong on this point. |
@alerque This was closed due to inactivity. Did you see the comment above at #9785 (comment)? The |
While working on distro packaging guidelines for Rust software in Arch Linux with another team member (hey @grawlinson) we ran into a disagreement about when and how
cargo fetch
should be used. After a little bit of clamor it became apparent that one of us was working from fiddling around and testing and the other by reading the documentation. It's unfortunate but in this case the docs seem to be wrong.See commit messages for further details.