Skip to content
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

Ineffective --exclude argument on ./x.py test #83661

Closed
Goirad opened this issue Mar 29, 2021 · 1 comment · Fixed by #83683
Closed

Ineffective --exclude argument on ./x.py test #83661

Goirad opened this issue Mar 29, 2021 · 1 comment · Fixed by #83683
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@Goirad
Copy link
Contributor

Goirad commented Mar 29, 2021

I think this is a sufficiently minimal example:
./x.py test --stage=1 --target=i686-unknown-linux-gnu --no-doc --exclude src/tools/linkchecker

After #80839, I expect the exclude argument to correctly apply to the linkchecker. Instead, when running the above command I get:

Updating only changed submodules
Submodules updated in 0.03 seconds
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
thread 'main' panicked at 'Linkcheck currently does not support builds with different hosts and targets.
You can skip linkcheck with --exclude src/tools/linkchecker', src/bootstrap/test.rs:134:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failed to run: /home/dario/oss/rust/build/bootstrap/debug/bootstrap test --stage=1 --target=i686-unknown-linux-gnu --no-doc --exclude src/tools/linkchecker
Build completed unsuccessfully in 0:00:00

This is on commit 2917eda69decdf813daa94b20dfb2edd3a555963

As the linked commit mentions, adding an --host='' argument indeed sidesteps the issue, but I guess ideally the exlude should be enough.

And with backtrace:

Backtrace

Updating only changed submodules
Submodules updated in 0.02 seconds
    Finished dev [unoptimized + debuginfo] target(s) in 0.21s
thread 'main' panicked at 'Linkcheck currently does not support builds with different hosts and targets.
You can skip linkcheck with --exclude src/tools/linkchecker', src/bootstrap/test.rs:134:13
stack backtrace:
   0: std::panicking::begin_panic
             at /rustc/14b27555a03f4abf9b8d80ea34f59144e2ded5e4/library/std/src/panicking.rs:519:12
   1: <bootstrap::test::Linkcheck as bootstrap::builder::Step>::should_run
             at ./src/bootstrap/test.rs:134:13
   2: bootstrap::builder::StepDescription::run::{{closure}}
             at ./src/bootstrap/builder.rs:185:33
   3: core::iter::adapters::map::map_fold::{{closure}}
             at /rustc/14b27555a03f4abf9b8d80ea34f59144e2ded5e4/library/core/src/iter/adapters/map.rs:80:28
   4: core::iter::traits::iterator::Iterator::fold
             at /rustc/14b27555a03f4abf9b8d80ea34f59144e2ded5e4/library/core/src/iter/traits/iterator.rs:2124:21
   5: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
             at /rustc/14b27555a03f4abf9b8d80ea34f59144e2ded5e4/library/core/src/iter/adapters/map.rs:120:9
   6: core::iter::traits::iterator::Iterator::for_each
             at /rustc/14b27555a03f4abf9b8d80ea34f59144e2ded5e4/library/core/src/iter/traits/iterator.rs:776:9
   7: <alloc::vec::Vec<T,A> as alloc::vec::spec_extend::SpecExtend<T,I>>::spec_extend
             at /rustc/14b27555a03f4abf9b8d80ea34f59144e2ded5e4/library/alloc/src/vec/spec_extend.rs:42:17
   8: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter
             at /rustc/14b27555a03f4abf9b8d80ea34f59144e2ded5e4/library/alloc/src/vec/spec_from_iter_nested.rs:53:9
   9: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
             at /rustc/14b27555a03f4abf9b8d80ea34f59144e2ded5e4/library/alloc/src/vec/spec_from_iter.rs:36:9
  10: <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter
             at /rustc/14b27555a03f4abf9b8d80ea34f59144e2ded5e4/library/alloc/src/vec/mod.rs:2196:9
  11: core::iter::traits::iterator::Iterator::collect
             at /rustc/14b27555a03f4abf9b8d80ea34f59144e2ded5e4/library/core/src/iter/traits/iterator.rs:1765:9
  12: bootstrap::builder::StepDescription::run
             at ./src/bootstrap/builder.rs:185:13
  13: bootstrap::builder::Builder::run_step_descriptions
             at ./src/bootstrap/builder.rs:571:9
  14: bootstrap::builder::Builder::execute_cli
             at ./src/bootstrap/builder.rs:563:9
  15: bootstrap::Build::build
             at ./src/bootstrap/lib.rs:506:17
  16: bootstrap::main
             at ./src/bootstrap/bin/main.rs:33:5
  17: core::ops::function::FnOnce::call_once
             at /rustc/14b27555a03f4abf9b8d80ea34f59144e2ded5e4/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
failed to run: /home/dario/oss/rust/build/bootstrap/debug/bootstrap test --stage=1 --target=i686-unknown-linux-gnu --no-doc --exclude src/tools/linkchecker
Build completed unsuccessfully in 0:00:00

@Goirad Goirad added the C-bug Category: This is a bug. label Mar 29, 2021
@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-testsuite Area: The testsuite used to check the correctness of rustc labels Mar 30, 2021
@tblah
Copy link
Contributor

tblah commented Mar 30, 2021

Thanks for reporting this. I think #83683 should fix it

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Mar 30, 2021
…mulacrum

bootstrap: don't complain about linkcheck if it is excluded

We don't need to complain to the user about linkcheck having different
hosts and targets when it is already excluded.

Resolves rust-lang#83661
@bors bors closed this as completed in 7a587f0 Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants