-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
jyn514 commentedon Oct 28, 2020
@varkor can you give an example of code that succeeds for check but fails for build?
varkor commentedon Oct 28, 2020
I edited some code in
compiler/rustc_middle/src/infer/canonical.rs
. This had a type-checking error in it, butx.py check library/std
succeeded. When I ranx.py check
(without specifying a path), it emitted an error as expected.x.py build library/std
emitted an error with the path specified.jyn514 commentedon Jan 1, 2021
@varkor I think this is actually related to staging:
x.py build library/std
builds the stage0 compiler artifacts before building stage1 libstd with the newly built compiler.x.py check
always uses stage 0, sox.py check library/std
doesn't build the compiler.varkor commentedon Jan 1, 2021
@jyn514:
x.py check
(without the path) emitted the correct error. Does this mean thecheck
stage is affected by the path?jyn514 commentedon Jan 1, 2021
@varkor yes, the same as build. If you run
x.py check compiler/rustc
for example, that won't check rustdoc.varkor commentedon Jan 1, 2021
@jyn514: are you saying that
x.py check library/std
will literally only checklibrary/std
, using the definitions from the stage0 artefacts, without taking account of the current compiler changes (i.e. those which would be built for stage1)?jyn514 commentedon Jan 1, 2021
@varkor yes:
x.py check library/std
is roughly analogous toRUSTFLAGS=--profile=check x.py build --stage 0 library/std
. There's not currently a way to check with stage1, although I'd like to add one: #46955 (comment)[-]`x.py check library/std` does not work analogously to `x.py build library/std`[/-][+]`x.py check library/std` always uses stage 0[/+]varkor commentedon Jan 1, 2021
Okay, I see. I don't necessarily think there needs to be an option to change the stage: it should just match whatever
build
does (though this will also take some work to implement).jyn514 commentedon Jan 1, 2021
@varkor well, if it matches
build
then you'd have to build the entire compiler before checking the stage 1 standard library, which would double or triple the time. So I don't think stage 1 should be the default.jyn514 commentedon Jan 1, 2021
(continued on Zulip so there's lower latency: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200)
jyn514 commentedon Jan 1, 2021
We decided the best approach is to warn on
x.py check library/std
if you haveprofile = "compiler"
set (and recommendx.py check
instead).[-]`x.py check library/std` always uses stage 0[/-][+]Warn when checking `library/std` when `profile = "compiler"`[/+]jyn514 commentedon Jan 1, 2021
I changed the title since #46955 already tracks --stage 1 support for
x.py check
.x.py check --stage 1
#80952jyn514 commentedon Feb 3, 2023
This would be helped by my proposal in https://jyn.dev/2023/01/12/Bootstrapping-Rust-in-2023.html.