Skip to content

Add flag to open docs: x.py doc --open #72453

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

Merged
merged 2 commits into from
May 23, 2020
Merged

Add flag to open docs: x.py doc --open #72453

merged 2 commits into from
May 23, 2020

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented May 22, 2020

This aligns with Cargo's flag cargo doc --open.

Tested with:

   # opens doc/index.html
x.py doc --stage 0 --open
x.py doc --stage 0 --open src/doc

   # opens doc/book/index.html
x.py doc --stage 0 --open src/doc/book

   # opens doc/std/index.html
x.py doc --stage 0 --open src/libstd

   # opens doc/proc_macro/index.html
x.py doc --stage 0 --open src/libproc_macro

   # opens both
x.py doc --stage 0 --open src/libstd src/libproc_macro

@rust-highfive
Copy link
Contributor

r? @Mark-Simulacrum

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 22, 2020
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

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

Just this week I tried to use this and was surprised it didn't exist :)

Tested with:

       # opens doc/index.html
    x.py doc --stage 0 --open
    x.py doc --stage 0 --open src/doc

       # opens doc/book/index.html
    x.py doc --stage 0 --open src/doc/book

       # opens doc/std/index.html
    x.py doc --stage 0 --open src/libstd

       # opens doc/proc_macro/index.html
    x.py doc --stage 0 --open src/libproc_macro

       # opens both
    x.py doc --stage 0 --open src/libstd src/libproc_macro
@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 22, 2020
On my machine, an error looks like:

    Finished release [optimized] target(s) in 0.29s
    Opening doc /git/rust/build/x86_64-unknown-linux-gnu/doc/std/index.html
    command 'xdg-open (internal)' did not execute successfully; exit code: 4
    command stderr:
    gio: file:///git/rust/build/x86_64-unknown-linux-gnu/doc/std/index.html: Error when getting information for file “/git/rust/build/x86_64-unknown-linux-gnu/doc/std/index.html”: No such file or directory

    Build completed successfully in 0:00:08
@Mark-Simulacrum
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Collaborator

bors commented May 22, 2020

📌 Commit 07b1de4 has been approved by Mark-Simulacrum

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 22, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request May 23, 2020
Rollup of 7 pull requests

Successful merges:

 - rust-lang#71289 (Allow using `Self::` in doc)
 - rust-lang#72375 (Improve E0599 explanation)
 - rust-lang#72385 (Add some teams to prioritization exclude_labels)
 - rust-lang#72395 (Allow rust-highfive to label issues it creates.)
 - rust-lang#72453 (Add flag to open docs:  x.py doc --open)
 - rust-lang#72459 (Add core::future::IntoFuture)
 - rust-lang#72461 (Clean up E0600 explanation)

Failed merges:

r? @ghost
@bors bors merged commit 3083ce7 into rust-lang:master May 23, 2020
@dtolnay dtolnay deleted the open branch May 23, 2020 21:26
@dtolnay dtolnay added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants