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

feat(doc): Print the generated docs links #12859

Merged
merged 1 commit into from
Oct 27, 2023
Merged

Conversation

epage
Copy link
Contributor

@epage epage commented Oct 19, 2023

I've wanted something like this myself. I dislike using --open because I tend to move up to re-run my cargo doc run but then have to edit it to remove --open.
Also makes it annoying when opening docs when cargo doc is wrapped by a tool like make.

This was previously attempted in #5592:

Fixes #5562

I've wanted something like this myself.  I dislike using `--open`
because I tend to move up to re-run my `cargo doc` run but then have to
edit it to remove `--open`.
Also makes it annoying when opening docs when `cargo doc` is wrapped by
a tool like `make`.

This was previously attempted in rust-lang#5592:
- Unlike the request in rust-lang#5562, this aligns with rust-lang#5592 in always printing
  rather than using a flag as this seems generally useful
- Unlike rust-lang#5592, this prints as an alternative to "Opening" to keep
  things light
- Unlike rust-lang#5592, this prints afterwards as the link is only valid then

Fixes rust-lang#5562
@rustbot
Copy link
Collaborator

rustbot commented Oct 19, 2023

r? @weihanglo

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-testing-cargo-itself Area: cargo's tests Command-doc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 19, 2023
@epage epage force-pushed the doc-open branch 4 times, most recently from 8ce21bc to 1dac61e Compare October 20, 2023 02:59
@epage epage marked this pull request as draft October 20, 2023 03:08
@epage epage force-pushed the doc-open branch 2 times, most recently from 958406c to 9261a81 Compare October 23, 2023 20:43
@epage epage marked this pull request as ready for review October 23, 2023 21:23
@epage epage force-pushed the doc-open branch 2 times, most recently from ee1f132 to 293f225 Compare October 27, 2023 17:09
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.

@epage
Copy link
Contributor Author

epage commented Oct 27, 2023

We'd also want to do that for --timings.

How about we do that in a follow up?

@epage
Copy link
Contributor Author

epage commented Oct 27, 2023

Yeah, reading that further, seems like we should have a dedicated issue for planning and implementing it

@weihanglo
Copy link
Member

Fair. Thank you

@bors r+

@bors
Copy link
Contributor

bors commented Oct 27, 2023

📌 Commit 293f225 has been approved by weihanglo

It is now in the queue for this repository.

@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 Oct 27, 2023
@bors
Copy link
Contributor

bors commented Oct 27, 2023

⌛ Testing commit 293f225 with merge 708383d...

@bors
Copy link
Contributor

bors commented Oct 27, 2023

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

@bors bors merged commit 708383d into rust-lang:master Oct 27, 2023
20 checks passed
@epage epage deleted the doc-open branch October 27, 2023 23:28
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 28, 2023
Update cargo

8 commits in df3509237935f9418351b77803df7bc05c009b3d..708383d620e183a9ece69b8fe930c411d83dee27
2023-10-24 23:09:01 +0000 to 2023-10-27 21:09:26 +0000
- feat(doc): Print the generated docs links (rust-lang/cargo#12859)
- feat(toml): Allow version-less manifests (rust-lang/cargo#12786)
- Remove outdated option to `-Zcheck-cfg` warnings (rust-lang/cargo#12884)
- Remove duplicate binaries during install (rust-lang/cargo#12868)
- refactor(shell): Write at once rather than in fragments (rust-lang/cargo#12880)
- docs(ref): Link to docs.rs metadata table (rust-lang/cargo#12879)
- docs(contrib): Describe how to add a new package (rust-lang/cargo#12878)
- move up looking at index summary enum (rust-lang/cargo#12749)

r? ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing-cargo-itself Area: cargo's tests Command-doc 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.

Add command line option to print URL/path/link to generated documentation
5 participants