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

Make x doc --open work on every book #108394

Merged
merged 1 commit into from
Mar 1, 2023
Merged

Conversation

pietroalbini
Copy link
Member

Before this PR, the --open flag had to be configured explicitly for every book, and most of them didn't configure it, resulting in the flag silently failing in all but two books.

In this PR, the code to check for the --open flag is in the underlying RustbookSrc step rather than all the individual steps. This is done by passing the parent step as a field of RustbookSrc, so that we can check for the correct step in maybe_open_in_browser.

This was part of a larger change that in the end wasn't worth it. Still, I think it could be useful as-is.

@rustbot
Copy link
Collaborator

rustbot commented Feb 23, 2023

r? @ozkanonur

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 23, 2023
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan
Copy link
Member

Seems we have an error in CI pipeline

@rustbot author

@rustbot rustbot 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 Feb 23, 2023
@pietroalbini
Copy link
Member Author

@bors review

@pietroalbini
Copy link
Member Author

@rustbot review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 1, 2023
@onur-ozkan
Copy link
Member

onur-ozkan commented Mar 1, 2023

When x doc --open is executed, multiple times docs will be opened sequentially during the compilation. Which means most of the links will be broken(until finishing the compilation). Should we keep it that way? I am not sure if this is an expected behaviour.

@pietroalbini
Copy link
Member Author

That is the current behavior for the books that already support --open.

Copy link
Member

@onur-ozkan onur-ozkan left a comment

Choose a reason for hiding this comment

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

That is the current behavior for the books that already support --open.

LGTM then, sorry for the noise.

I think it would be nicer to open the doc once for all after the compilation. I will check what I can do for this.

@onur-ozkan
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 1, 2023

📌 Commit 317be61 has been approved by ozkanonur

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 Mar 1, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 1, 2023
Rollup of 7 pull requests

Successful merges:

 - rust-lang#108143 (rustdoc: search by macro when query ends with `!`)
 - rust-lang#108394 (Make `x doc --open` work on every book)
 - rust-lang#108427 (Recover from for-else and while-else)
 - rust-lang#108462 (Fix `VecDeque::append` capacity overflow for ZSTs)
 - rust-lang#108568 (Make associated_item_def_ids for traits use an unstable option to also return associated types for RPITITs)
 - rust-lang#108604 (Add regression test for rust-lang#107280)
 - rust-lang#108605 (Add regression test for rust-lang#105821)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 38461f8 into rust-lang:master Mar 1, 2023
@rustbot rustbot added this to the 1.69.0 milestone Mar 1, 2023
@pietroalbini pietroalbini deleted the pa-open branch March 2, 2023 13:11
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. 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