Skip to content

Build caching issue: stage 0 fails in thiserror with "unresolved imports std::any::Demand, std::any::Provider" #114839

@RalfJung

Description

@RalfJung

Error message says it all:

$ ./x.py test ui
Building bootstrap
    Finished dev [unoptimized] target(s) in 0.02s
Building stage0 library artifacts (x86_64-unknown-linux-gnu)
    Finished release [optimized + debuginfo] target(s) in 0.07s
Building compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu)
   Compiling parking_lot_core v0.9.8
   Compiling io-lifetimes v1.0.11
   Compiling parking_lot_core v0.8.6
   Compiling perf-event-open-sys v3.0.0
   Compiling memmap2 v0.2.3
   Compiling getrandom v0.2.10
   Compiling jobserver v0.1.26
   Compiling generic-array v0.14.7
   Compiling stacker v0.1.15
   Compiling indexmap v2.0.0
   Compiling tracing v0.1.37
   Compiling thiserror-core v1.0.38
   Compiling flate2 v1.0.26
   Compiling tinystr v0.7.1
   Compiling thiserror v1.0.40
   Compiling rustc_lexer v0.1.0 (/home/r/src/rust/rustc/compiler/rustc_lexer)
   Compiling type-map v0.4.0
   Compiling itoa v1.0.6
   Compiling self_cell v0.10.2
   Compiling ryu v1.0.13
error[E0432]: unresolved imports `std::any::Demand`, `std::any::Provider`
 --> /home/r/.cargo/registry/src/index.crates.io-6f17d22bba15001f/thiserror-1.0.40/src/provide.rs:1:16
  |
1 | use std::any::{Demand, Provider};
  |                ^^^^^^  ^^^^^^^^ no `Provider` in `any`
  |                |
  |                no `Demand` in `any`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `thiserror` (lib) due to previous error

This is probably related to #113464. It goes away when I rm build/host/stage0-rustc -rf. Looks like the thiserror build script is caching its output too aggressively, so it doesn't notice that it needs to be rerun? Cc @dtolnay

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions