Skip to content

x doc std unconditionally recompiles the standard library each time #103785

Description

@jyn514

I tried this:

x doc --stage 0 std
x doc --stage 0 std

I expected to see this happen: The second invocation takes essentially no time.

Instead, this happened: The docs were completely rebuilt.

The problem is that we remove the docs between each invocation:

rust/src/bootstrap/doc.rs

Lines 613 to 615 in c2b0cc1

if out_dir.exists() {
builder.remove_dir(&out_dir);
}

@LukeMathWalker this is a regression from #101799 - do you think you'll have time to follow up? I think we can either add a stamp file to avoid rebuilding, or find some other way to avoid removing the whole directory - maybe we can only remove/copy the .json files, rather than everything?

Meta

HEAD is branched from 77e57db.

Activity

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

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.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