rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
97.31k stars 12.58k forks source link

`x test compiler/rustc_borrowck` fails and complains about undeclared `rayon` crate #131093

Open ismailarilik opened 1 day ago

ismailarilik commented 1 day ago

I tried this commands on master branch:

x test compiler/rustc_abi
x test compiler/rustc_borrowck
x test compiler/rustc_metadata
x test compiler/rustc_middle
x test compiler/rustc_resolve
x test compiler/rustc_span
x check compiler/rustc_span

I expected to see this happen: All tests passed

Instead, this happened:

error[E0433]: failed to resolve: use of undeclared crate or module `rayon`
   --> compiler/rustc_data_structures/src/sync/parallel.rs:173:9
    |
173 |     use rayon::iter::{FromParallelIterator, IntoPa...
    |         ^^^^^ use of undeclared crate or module `rayon`

error[E0433]: failed to resolve: use of undeclared crate or module `rayon`
   --> compiler/rustc_data_structures/src/sync/parallel.rs:145:21
    |
145 |         OP: FnOnce(&rayon::Scope<'scope>) -> R + D...
    |                     ^^^^^ use of undeclared crate or module `rayon`

error[E0433]: failed to resolve: use of undeclared crate or module `rayon`
   --> compiler/rustc_data_structures/src/sync/parallel.rs:149:9
    |
149 |         rayon::scope(|s| FromDyn::from(op.into_inn...
    |         ^^^^^ use of undeclared crate or module `rayon`

error[E0433]: failed to resolve: use of undeclared crate or module `rayon`
   --> compiler/rustc_data_structures/src/sync/parallel.rs:162:17
    |
162 |                 rayon::join(
    |                 ^^^^^ use of undeclared crate or module `rayon`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `rustc_data_structures` (lib) due to 4 previous errors

There might be other x test or x check cases.

x test and x check is passing.

Meta

rustc +stage1 --version --verbose:

on --verbose
rustc 1.83.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.83.0-dev
LLVM version: 19.1.0
ismailarilik commented 1 day ago

Update: It is also happening with x test compiler/rustc_middle and x test compiler/rustc_resolve commands.

GrigorenkoPV commented 1 day ago

Update: It is also happening with x test compiler/rustc_middle and x test compiler/rustc_resolve commands.

And ./x check compiler/rustc_span too.

This first regressed from passing just fine to producing

error: none of the selected packages contains these features: llvm, rustc_use_parallel_compiler

in 42b9cb1cb508045541a62178835e5884a14dac7b:


Later it changed to

error[E0433]: failed to resolve: use of undeclared crate or module `rayon`
   --> compiler/rustc_data_structures/src/sync/parallel.rs:173:9
    |
173 |     use rayon::iter::{FromParallelIterator, IntoParallelIterator, ParallelIterator};
    |         ^^^^^ use of undeclared crate or module `rayon`

error[E0433]: failed to resolve: use of undeclared crate or module `rayon`
   --> compiler/rustc_data_structures/src/sync/parallel.rs:145:21
    |
145 |         OP: FnOnce(&rayon::Scope<'scope>) -> R + DynSend,
    |                     ^^^^^ use of undeclared crate or module `rayon`

error[E0433]: failed to resolve: use of undeclared crate or module `rayon`
   --> compiler/rustc_data_structures/src/sync/parallel.rs:149:9
    |
149 |         rayon::scope(|s| FromDyn::from(op.into_inner()(s))).into_inner()
    |         ^^^^^ use of undeclared crate or module `rayon`

error[E0433]: failed to resolve: use of undeclared crate or module `rayon`
   --> compiler/rustc_data_structures/src/sync/parallel.rs:162:17
    |
162 |                 rayon::join(
    |                 ^^^^^ use of undeclared crate or module `rayon`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `rustc_data_structures` (lib) due to 4 previous errors
Build completed unsuccessfully in 0:00:38

in 39e3adda53a01a90056392c1d75308a48a40024b:

ismailarilik commented 1 day ago

There should also be tests to prevent this regression happening again.

I am actually planning to look at this but not nowadays.

ismailarilik commented 1 day ago

I just confirmed that x test compiler/rustc_metadata gives the same output. I will update description to include newly-discovered problematic commands.