Stream: t-compiler/help

Topic: Running doctests in libcore


Russell Cohen (May 07 2020 at 19:32, on Zulip):

I'm trying to run the libcore tests with:

./x.py test src/libcore --stage 0

The regular tests run fine, but then it errors with:

Doc-tests core
error: the `-Z unstable-options` flag must also be passed to enable the flag `crate-version`

error: test failed, to rerun pass '--doc'

command did not execute successfully: "/home/russell/code/rust/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "8" "--release" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/home/russell/code/rust/rust/src/libtest/Cargo.toml" "--doc" "-p" "core" "--" "--quiet"
bjorn3 (May 07 2020 at 19:34, on Zulip):

RUSTFLAGS_BOOTSTRAP=-Zunstable-options ./x.py test src/libcore --stage 0 should work. It will likely cause a recompilation of everything though.

bjorn3 (May 07 2020 at 19:34, on Zulip):

You could also add -Zunstable-options here: https://github.com/rust-lang/rust/blob/0a675c5e02e6ecfda7d4e04aabd23a9935e0c4bf/src/bootstrap/builder.rs#L805

Russell Cohen (May 07 2020 at 19:47, on Zulip):

thanks, works!

Russell Cohen (May 07 2020 at 19:57, on Zulip):

hmmmm, actually not. it worked, but then I changed branches and it stopped working. I cleaned and ran it again and it still isn't working (same error)

bjorn3 (May 07 2020 at 20:00, on Zulip):

If you chose the edit builder.rs route, did you re-apply the changes after you switched?

bjorn3 (May 07 2020 at 20:00, on Zulip):

Otherwise I don't know

Russell Cohen (May 07 2020 at 20:01, on Zulip):

Ah, I just rebased on master and it works now

Last update: Sep 27 2020 at 14:15UTC