Skip to content

Can't document compiler crates with --stage 0 #79980

Closed

Description

When I try to run ./x.py doc with compiler-docs = true in config.toml, I get several errors. I started discussing this on Zulip. I am trying this on latest master and a clean build/ directory.

First I got errors related to -Znormalize-docs. #79954 fixed those.
Then I got a 'Unable to resolve external crate proc_macro2' panic. #79984 fixed that.

Finally I got this (even after clearing build/):

error[E0460]: found possibly newer version of crate `std` which `synstructure` depends on
 --> compiler/rustc_macros/src/lib.rs:5:5
  |
5 | use synstructure::decl_derive;
  |     ^^^^^^^^^^^^
  |
  = note: perhaps that crate needs to be recompiled?
  = note: the following crate versions were found:
          crate `std`: /home/nadrieril/wip/forks/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd
-2624c88e637295f4.rlib
          crate `std`: /home/nadrieril/wip/forks/rust/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd
-2624c88e637295f4.so
          crate `synstructure`: /home/nadrieril/wip/forks/rust/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps/libsynstructure-3b73f5ee64fee340.rmeta

error: aborting due to previous error

error: could not document `rustc_macros`

And at that point I thought I'd open an issue because I have no idea what's happening.
EDIT: that error is the same as was found in #74976, which seemed to have vanished spontaneously(?).

EDIT: here's my config.toml without the comments:

changelog-seen = 2
[llvm]
download-ci-llvm = true
assertions = true
[build]
compiler-docs = true
[rust]
debug-logging = true
debuginfo-level-rustc = 1
incremental = true
deny-warnings = false

EDIT: tried with incremental = false and got the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions