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

Fix errors in cargo fetch usage guide #10398

Merged
merged 1 commit into from
Feb 22, 2022
Merged

Fix errors in cargo fetch usage guide #10398

merged 1 commit into from
Feb 22, 2022

Conversation

piggynl
Copy link
Contributor

@piggynl piggynl commented Feb 17, 2022

This is a recreation of #9785.

  1. By the doc, 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.

@rust-highfive
Copy link

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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 17, 2022
@weihanglo
Copy link
Member

Would it be better to use #if helper to avoid duplicate? Like #9189 did.

@piggynl
Copy link
Contributor Author

piggynl commented Feb 17, 2022

I noticed in cargo tree there is also a paragraph copied from the template.

{{#option "`--target` _triple_" }}
Filter dependencies matching the given target-triple. The default is the host
platform. Use the value `all` to include *all* targets.
{{/option}}

So, should I add 3 flags for:

  1. Change "The default is the host platform." to "The default is for {{actionverb}} for all architecture."
  2. Add a sentence "Use the value all to include all targets."
  3. Hide the paragraph "Note that specifying this flag makes Cargo run in a different mode..."

respectively?

@alexcrichton
Copy link
Member

I agree with @weihanglo that using #if to keep the --target docs in one spot is probably a good idea, otherwise seems good to me though!

@weihanglo
Copy link
Member

So, should I add 3 flags for:

1. Change "The default is the host platform." to "The default is for {{actionverb}} for all architecture."

2. Add a sentence "Use the value `all` to include _all_ targets."

3. Hide the paragraph "Note that specifying this flag makes Cargo run in a different mode..."

respectively?

I feel like cargo-tree diverges from the common one to some extent, so I vote for keeping cargo-tree as is.

Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! All look good now. Thanks!

@alexcrichton
Copy link
Member

@bors: r=weihanglo

@bors
Copy link
Contributor

bors commented Feb 22, 2022

📌 Commit 08734a6 has been approved by weihanglo

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 22, 2022
@bors
Copy link
Contributor

bors commented Feb 22, 2022

⌛ Testing commit 08734a6 with merge c974e35...

@bors
Copy link
Contributor

bors commented Feb 22, 2022

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing c974e35 to master...

@bors bors merged commit c974e35 into rust-lang:master Feb 22, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 23, 2022
Update cargo

8 commits in ea2a21c994ca1e4d4c49412827b3cf4dcb158b1d..d6cdde584a1f15ea086bae922e20fd27f7165431
2022-02-15 04:24:07 +0000 to 2022-02-22 19:55:51 +0000
- Add common profile validation. (rust-lang/cargo#10411)
- Add -Z check-cfg-features to enable compile-time checking of features (rust-lang/cargo#10408)
- Remove invalid target-specific dependency example. (rust-lang/cargo#10401)
- Fix errors in `cargo fetch` usage guide (rust-lang/cargo#10398)
- Fix some broken doc links. (rust-lang/cargo#10404)
- Implement "artifact dependencies" (RFC-3028) (rust-lang/cargo#9992)
- Print executable name on cargo test --no-run rust-lang/cargo#2 (rust-lang/cargo#10346)
- Avoid new deprecation warnings from clap 3.1.0 (rust-lang/cargo#10396)
@ehuss ehuss added this to the 1.61.0 milestone Feb 24, 2022
@piggynl piggynl deleted the cargo-doc-fixes-1 branch April 2, 2022 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants