]> git.lizzy.rs Git - rust.git/commit
Auto merge of #74124 - ehuss:fix-doc-dry-run-up-to-date, r=Mark-Simulacrum
authorbors <bors@rust-lang.org>
Wed, 8 Jul 2020 09:47:41 +0000 (09:47 +0000)
committerbors <bors@rust-lang.org>
Wed, 8 Jul 2020 09:47:41 +0000 (09:47 +0000)
commit1d919c9377f4602d991ca1c7ba852e7555943740
treea714da53cd40ce202d31a015144471809085d19b
parent8ac1525e091d3db28e67adcbbd6db1e1deaa37fb
parent561d5acb9e6a968be8532a50611e9aa41e25a001
Auto merge of #74124 - ehuss:fix-doc-dry-run-up-to-date, r=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.