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

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

Open
ismailarilik opened this issue Oct 1, 2024 · 4 comments
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

@ismailarilik
Copy link
Contributor

ismailarilik commented Oct 1, 2024

I tried this commands on master branch:

x test compiler/rustc_abi
x test compiler/rustc_borrowck
x test compiler/rustc_interface
x test compiler/rustc_lint
x test compiler/rustc_metadata
x test compiler/rustc_middle
x test compiler/rustc_mir_dataflow
x test compiler/rustc_resolve
x test compiler/rustc_session
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
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 1, 2024
@ismailarilik
Copy link
Contributor Author

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

@GrigorenkoPV
Copy link
Contributor

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 42b9cb1:


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 39e3add:

@lolbinarycat lolbinarycat added A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 2, 2024
@ismailarilik
Copy link
Contributor Author

ismailarilik commented Oct 2, 2024

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

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

@ismailarilik
Copy link
Contributor Author

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

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

No branches or pull requests

4 participants