Skip to content

Fix occasional bootstrap panic in docs. #74124

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jul 8, 2020

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Jul 7, 2020

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
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 Jul 7, 2020
@Mark-Simulacrum
Copy link
Member

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

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 7, 2020

📌 Commit 561d5ac 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-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.
@ehuss
Copy link
Contributor Author

ehuss commented Jul 7, 2020

@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.
@bors
Copy link
Collaborator

bors commented Jul 8, 2020

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

@bors
Copy link
Collaborator

bors commented Jul 8, 2020

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 8, 2020
@bors bors merged commit 1d919c9 into rust-lang:master Jul 8, 2020
@cuviper cuviper added this to the 1.46 milestone May 2, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

5 participants