-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Don't fail early if try_run
returns an error
#113214
Conversation
04a6550
to
c9b5516
Compare
try_run
returns an error
going to be busy the next two weeks r? bootstrap note that i haven't actually confirmed |
☔ The latest upstream changes (presumably #113256) made this pull request unmergeable. Please resolve the merge conflicts. |
c9b5516
to
70f25e5
Compare
I don't see this PR making any difference on the behaviour. -- I don't think I check that by simply executing the ui tests with and without |
@ozkanonur it only affects the behavior between different Steps, not within a single compiletest invocation. try running both UI and rustdoc-ui. |
Oh, my bad!
Same, I break one of the test in rustdoc and then run here is the result ~/devspace/.other/rust-dist/general $ ~/devspace/ozkanonur/rust/x test rustdoc rustdoc-gui --no-fail-fast
Building bootstrap
Finished dev [unoptimized] target(s) in 0.02s
warning: creating symbolic link `/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/ci-rustc-sysroot/lib/rustlib/rustc-src/rust` to `/home/nimda/devspace/ozkanonur/rust` failed with File exists (os error 17)
warning: creating symbolic link `/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/rustc-src/rust` to `/home/nimda/devspace/ozkanonur/rust` failed with File exists (os error 17)
Creating a sysroot for stage2 compiler (use `rustup toolchain link 'name' build/host/stage2`)
Building stage0 library artifacts (x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.07s
Building stage0 tool compiletest (x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.07s
Building tool rustdoc (stage1 -> stage2, x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.08s
Testing stage2 compiletest suite=rustdoc mode=rustdoc (x86_64-unknown-linux-gnu)
warning: `tidy` is not installed; diffs will not be generated
running 637 tests
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 88/637
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 176/637
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 264/637
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 352/637
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 440/637
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 528/637
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii 616/637
iiiiiiiiiiiiii......F
failures:
---- [rustdoc] tests/rustdoc/primitive/no_std.rs stdout ----
error: htmldocck failed!
status: exit status: 1
command: "/bin/python3" "/home/nimda/devspace/ozkanonur/rust/src/etc/htmldocck.py" "/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/test/rustdoc/primitive/no_std" "/home/nimda/devspace/ozkanonur/rust/tests/rustdoc/primitive/no_std.rs"
stdout: none
--- stderr -------------------------------
6: @has check failed
`XPATH PATTERN` did not match
// @has no_std/fn.foo.html '//a/[@href="{{channel}}/core/primitive.u5.html"]' 'primitive link'
Encountered 1 errors
------------------------------------------
failures:
[rustdoc] tests/rustdoc/primitive/no_std.rs
test result: FAILED. 6 passed; 1 failed; 630 ignored; 0 measured; 0 filtered out; finished in 163.09ms
Some tests failed in compiletest suite=rustdoc mode=rustdoc host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
Building stage0 tool rustdoc-gui-test (x86_64-unknown-linux-gnu)
Finished release [optimized] target(s) in 0.07s
Finished dev [unoptimized + debuginfo] target(s) in 0.03s
Finished dev [unoptimized + debuginfo] target(s) in 0.03s
Finished dev [unoptimized + debuginfo] target(s) in 0.28s
Finished dev [unoptimized + debuginfo] target(s) in 0.03s
Finished dev [unoptimized + debuginfo] target(s) in 0.06s
Finished dev [unoptimized + debuginfo] target(s) in 0.03s
Finished dev [unoptimized + debuginfo] target(s) in 0.03s
Finished dev [unoptimized + debuginfo] target(s) in 0.09s
Running 107 rustdoc-gui (24 concurrently) ...
.......... (10/107)
.......... (20/107)
.......... (30/107)
.......... (40/107)
.......... (50/107)
.......... (60/107)
.......... (70/107)
.......... (80/107)
.......... (90/107)
.......... (100/107)
....... (107/107)
finished in 11.978 seconds
1 command(s) did not execute successfully:
- BOOTSTRAP_CARGO="/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" DOC_RUST_LANG_ORG_CHANNEL="https://doc.rust-lang.org/nightly" LD_LIBRARY_PATH="/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/stage0/lib" RUSTC="/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/stage0/bin/rustc" RUSTC_BOOTSTRAP="1" RUSTC_FORCE_RUSTC_VERSION="compiletest" RUST_TEST_THREADS="24" RUST_TEST_TMPDIR="/home/nimda/devspace/.other/rust-dist/general/build/tmp" "/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--rustdoc-path" "/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/home/nimda/devspace/ozkanonur/rust/tests/rustdoc" "--build-base" "/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/test/rustdoc" "--sysroot-base" "/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/stage2" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--suite" "rustdoc" "--mode" "rustdoc" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" "--nodejs" "/bin/node" "--npm" "/bin/npm" "--optimize-tests" "--host-rustcflags" "-Crpath" "--host-rustcflags" "-Cdebuginfo=0" "--host-rustcflags" "-Lnative=/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath" "--target-rustcflags" "-Cdebuginfo=0" "--target-rustcflags" "-Lnative=/home/nimda/devspace/.other/rust-dist/general/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--python" "/bin/python3" "--json" "--llvm-version" "16.0.5-rust-1.72.0-nightly" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets
analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwarflinkerparallel dwp engine executionengine extensions filecheck frontendhlsl frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interfacestub interpreter ipo irprinter irreader jitlink libdriver lineeditor linker loongarch loongarchasmparser loongarchcodegen loongarchdesc loongarchdisassembler loongarchinfo lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo mc
mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts objcopy object objectyaml option orcjit orcshared orctargetprocess passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvtargetmca runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target targetparser textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsdriver windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xray" "--cc" "" "--cxx" "" "--cflags" "" "--cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/local/tmp/work" "--android-cross-path" "" "--channel" "dev"
Build completed unsuccessfully in 0:00:12
~/devspace/.other/rust-dist/general $
|
hmm. looking at the code those Steps don't use |
Right, I forgot -- Shouldn't we update this too? |
fwiw i am reconsidering whether |
Agree. This could cause problems with future PRs because it's very easy to break Do you have time to handle that change? You can pass it to me if you don't have enough time. @GuillaumeGomez |
That makes me sad to not rely on the type system to prevent the issue we encountered but yes, I can put back a boolean. |
the function you modified wasn't even in bootstrap, it was in build_helper. build_helper uses it very differently. |
70f25e5
to
91f9aa5
Compare
I think the same rationale should be applied: it's easy to forget to check a |
|
The problem in |
there are two different try_run functions. you should revert the change to the one in bootstrap but keep the change to the one in build_helper. |
Maybe rename that one to |
91f9aa5
to
27e5a8e
Compare
I only reverted the change in |
27e5a8e
to
1b7df36
Compare
1b7df36
to
98336f8
Compare
jyn514 provided a nice explanation for this: if the state is stored in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
Just so you know, there is another try_run
with Result
in the bootstrap code.
Line 336 in d8899c5
try_run(cmd: &mut Command) -> Result<(), ()>, |
It doesn't cause any specific issues like the ones you fixed in this pull request. I wanted to bring it to your attention so that you're aware of it in case you want to update it as well.
The PR already looks good to me, r=me whether or not you make changes to that function.
This one doesn't store a state so I didn't update it. If I'm wrong we can always fix in a follow-up. ;) Thanks to both of you for the reviews! @bors r=ozkanonur,jyn514 rollup |
⌛ Testing commit 98336f8 with merge 420abeba7674df8f37dbafe0a18d3b8e93eda61a... |
💥 Test timed out |
@bors retry |
☀️ Test successful - checks-actions |
Finished benchmarking commit (1e6db34): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 657.774s -> 657.557s (-0.03%) |
Fixes #113208.
Follow-up of #112962.
r? @jyn514