Skip to content

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

Closed
@Nadrieril

Description

@Nadrieril
Member

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

Activity

added
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
on Dec 12, 2020
jyn514

jyn514 commented on Dec 13, 2020

@jyn514
Member

@Mark-Simulacrum and I think this is the same root cause as #74976 (comment): --target is getting passed to rustdoc but not to rustc, so they use different sysroots. I don't know how to fix this :(

added a commit that references this issue on Dec 13, 2020

Rollup merge of rust-lang#79984 - Nadrieril:remove-unused-dep, r=jyn514

424e44a
changed the title [-]Can't document compiler crates[/-] [+]Can't document compiler crates with --stage 0[/+] on Dec 13, 2020
camelid

camelid commented on Dec 29, 2020

@camelid
Member

Noting that it seems #79540 should fix this! See the discussion on Zulip.

jyn514

jyn514 commented on Dec 29, 2020

@jyn514
Member

@camelid well, it will still be broken if you don't have download-stage1 turned on. So I think that part might be worth tracking.

JakobDegen

JakobDegen commented on Mar 24, 2022

@JakobDegen
Contributor

Has anything changed since this was last looked at to make this easier to fix? I'm running into this issue

added 2 commits that reference this issue on Apr 5, 2022

Rollup merge of rust-lang#95449 - jyn514:doc-stage-0, r=ehuss

27fb711

Rollup merge of rust-lang#95449 - jyn514:doc-stage-0, r=ehuss

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

Metadata

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

      Participants

      @Nadrieril@jyn514@camelid@JakobDegen

      Issue actions

        Can't document compiler crates with --stage 0 · Issue #79980 · rust-lang/rust