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 fetch --offline documentation directs user to use cargo fetch --offline #13232

Closed
larswirzenius opened this issue Jan 1, 2024 · 2 comments · Fixed by #13364
Closed
Assignees
Labels
A-cli-help Area: built-in command-line help C-enhancement Category: enhancement P-low Priority: Low S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review

Comments

@larswirzenius
Copy link

larswirzenius commented Jan 1, 2024

Problem

The documentation for cargo fetch --offline (the manual page) includes the words "See the cargo-fetch(1) command to download dependencies before going offline."

This seems needlessly self-recursive. In fact, I'm not sure why cargo fetch offers an offline mode, but maybe it's useful in some case.

Steps

No response

Possible Solution(s)

Drop the sentence directing the user to cargo fetch --offline from the description of cargo fetch --offline. I realize this is boilerplate shared with all cargo subcommands that have an --offline option, and I don't know if the template system used allows a way to exclude parts for specific commands.

Notes

This is really not a big issue. I'd be happy for you to ignore this until all other issues have been resolved.

Version

cargo 1.75.0 (1d8b05cdd 2023-11-20)
release: 1.75.0
commit-hash: 1d8b05cdd1287c64467306cf3ca2c8ac60c11eb0
commit-date: 2023-11-20
host: x86_64-unknown-linux-gnu
libgit2: 1.7.1 (sys:0.18.1 vendored)
libcurl: 8.4.0-DEV (sys:0.4.68+curl-8.4.0 vendored ssl:OpenSSL/1.1.1u)
ssl: OpenSSL 1.1.1u  30 May 2023
os: Debian 12 (bookworm) [64-bit]
@larswirzenius larswirzenius added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Jan 1, 2024
@larswirzenius larswirzenius changed the title cargo fetch --ofline documnetation directs user to use cargo fetch --offline cargo fetch --offline documnetation directs user to use cargo fetch --offline Jan 1, 2024
@larswirzenius larswirzenius changed the title cargo fetch --offline documnetation directs user to use cargo fetch --offline cargo fetch --offline documentation directs user to use cargo fetch --offline Jan 1, 2024
@weihanglo weihanglo added C-enhancement Category: enhancement S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review A-cli-help Area: built-in command-line help P-low Priority: Low and removed C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Jan 1, 2024
@weihanglo
Copy link
Member

Thanks for the report. The template language is handlebars, and it supports conditional templating.

For each command there should be a command variable available, so guess we can check if it is fetch and exclude the self-referential part.

{{~*set command="fetch"}}

Though I am unsure if it is worth the complexity to have an additional condition there. Seems no harm to me to have self-referential, so tag P-low but feel free if pick up and fix it.

@linyihai
Copy link
Contributor

linyihai commented Jan 18, 2024

@rustbot claim

it seems an another document issue, I'd like to take a shot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli-help Area: built-in command-line help C-enhancement Category: enhancement P-low Priority: Low S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants