Skip to content

Fix occasional bootstrap panic in docs. - #74124

Merged
bors merged 1 commit into
rust-lang:masterfrom
ehuss:fix-doc-dry-run-up-to-date
Jul 8, 2020
Merged

Fix occasional bootstrap panic in docs.#74124
bors merged 1 commit into
rust-lang:masterfrom
ehuss:fix-doc-dry-run-up-to-date

Conversation

@ehuss

@ehussehuss commented Jul 7, 2020

Copy link
Copy Markdown
Contributor

I am occasionally running into this panic when running x.py:

thread 'main' panicked at 'source "/Users/eric/Proj/rust/rust/build/x86_64-apple-darwin/md-doc/unstable-book" failed to get metadata: No such file or directory (os error 2)', src/build_helper/lib.rs:173:19

I have not been able to figure out the exact sequence of commands that leads to this error (I tried for quite a while to reproduce it). I think it may involve updating my tree, but I am uncertain. An artificial way to trigger it is to build the documentation, and then delete the md-doc directory manually.

The cause is that bootstrap does a "dry run" before every command, and in this case up_to_date panics because the destination exists (build/x86_64-apple-darwin/doc/unstable-book/index.html ) but the source does not (build/x86_64-apple-darwin/md-doc/unstable-book).

I am uncertain if it is important that the last line builder.run(…) needs to be called during the dry run. This patch seems to fix the issue, though.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @Mark-Simulacrum

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

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 7, 2020
@Mark-Simulacrum

Copy link
Copy Markdown
Member

No, the last line is just command execution and is a no-op during dry run. Thanks!

@bors r+

@bors

bors commented Jul 7, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 561d5ac has been approved by Mark-Simulacrum

@borsbors 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 Jul 7, 2020
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 7, 2020
…=Mark-Simulacrum
Fix occasional bootstrap panic in docs.
I am occasionally running into this panic when running `x.py`:
> thread 'main' panicked at 'source "/Users/eric/Proj/rust/rust/build/x86_64-apple-darwin/md-doc/unstable-book" failed to get metadata: No such file or directory (os error 2)', src/build_helper/lib.rs:173:19
I have not been able to figure out the exact sequence of commands that leads to this error (I tried for quite a while to reproduce it). I think it may involve updating my tree, but I am uncertain. An artificial way to trigger it is to build the documentation, and then delete the `md-doc` directory manually.
The cause is that bootstrap does a "dry run" before every command, and in this case `up_to_date` panics because the destination exists (`build/x86_64-apple-darwin/doc/unstable-book/index.html `) but the source does not (`build/x86_64-apple-darwin/md-doc/unstable-book`).
I am uncertain if it is important that the last line `builder.run(…)` needs to be called during the dry run. This patch seems to fix the issue, though.
@ManishearthManishearth mentioned this pull request Jul 7, 2020
@ehuss

ehuss commented Jul 7, 2020

Copy link
Copy Markdown
ContributorAuthor

@bors rollup

Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 7, 2020
…=Mark-Simulacrum
Fix occasional bootstrap panic in docs.
I am occasionally running into this panic when running `x.py`:
> thread 'main' panicked at 'source "/Users/eric/Proj/rust/rust/build/x86_64-apple-darwin/md-doc/unstable-book" failed to get metadata: No such file or directory (os error 2)', src/build_helper/lib.rs:173:19
I have not been able to figure out the exact sequence of commands that leads to this error (I tried for quite a while to reproduce it). I think it may involve updating my tree, but I am uncertain. An artificial way to trigger it is to build the documentation, and then delete the `md-doc` directory manually.
The cause is that bootstrap does a "dry run" before every command, and in this case `up_to_date` panics because the destination exists (`build/x86_64-apple-darwin/doc/unstable-book/index.html `) but the source does not (`build/x86_64-apple-darwin/md-doc/unstable-book`).
I am uncertain if it is important that the last line `builder.run(…)` needs to be called during the dry run. This patch seems to fix the issue, though.
@ManishearthManishearth mentioned this pull request Jul 7, 2020
@bors

bors commented Jul 8, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 561d5ac with merge 1d919c9...

@bors

bors commented Jul 8, 2020

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions, checks-azure
Approved by: Mark-Simulacrum
Pushing 1d919c9 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Jul 8, 2020
@bors
bors merged commit 1d919c9 into rust-lang:masterJul 8, 2020
@cuvipercuviper added this to the 1.46 milestone May 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: 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.

5 participants

@ehuss@rust-highfive@Mark-Simulacrum@bors@cuviper