Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x.py clean does not clean bootstrap anymore #76519

Closed
matthiaskrgr opened this issue Sep 9, 2020 · 3 comments · Fixed by #80574
Closed

x.py clean does not clean bootstrap anymore #76519

matthiaskrgr opened this issue Sep 9, 2020 · 3 comments · Fixed by #80574
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@matthiaskrgr
Copy link
Member

./x.py clean used to clean the compiled artifacts of the bootstrap tool, this no longer seems to be the case.
After running x.py clean, build/bootstrap was not removed.

I also noticed that on a clean build, ./x.py check would build bootstrap twice; first it would be compiler at the beginning, then it would be checked at the very end of the compilation again, is this intended?

Updating only changed submodules
Submodules updated in 0.03 seconds
   Compiling proc-macro2 v1.0.19
   Compiling unicode-xid v0.2.1
   Compiling memchr v2.3.3
   Compiling syn v1.0.38
   Compiling serde_derive v1.0.115
   Compiling libc v0.2.74
   Compiling lazy_static v1.4.0
   Compiling cfg-if v0.1.10
   Compiling log v0.4.11
   Compiling serde v1.0.115
   Compiling autocfg v1.0.0
   Compiling ryu v1.0.5
   Compiling regex-syntax v0.6.18
   Compiling same-file v1.0.6
   Compiling serde_json v1.0.57
   Compiling fnv v1.0.7
   Compiling unicode-width v0.1.8
   Compiling cc v1.0.58
   Compiling itoa v0.4.6
   Compiling build_helper v0.1.0 (/home/matthias/vcs/github/rust/src/build_helper)
   Compiling opener v0.4.1
   Compiling thread_local v1.0.1
   Compiling crossbeam-utils v0.7.2
   Compiling walkdir v2.3.1
   Compiling getopts v0.2.21
   Compiling cmake v0.1.44
   Compiling aho-corasick v0.7.13
   Compiling bstr v0.2.13
   Compiling quote v1.0.7
   Compiling num_cpus v1.13.0
   Compiling filetime v0.2.12
   Compiling time v0.1.43
   Compiling regex v1.3.9
   Compiling globset v0.4.5
   Compiling ignore v0.4.16
   Compiling toml v0.5.6
   Compiling bootstrap v0.0.0 (/home/matthias/vcs/github/rust/src/bootstrap)
    Finished dev [unoptimized + debuginfo] target(s) in 44.28s
Checking std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[...]
    Checking clippy_lints v0.0.212 (/home/matthias/vcs/github/rust/src/tools/clippy/clippy_lints)
    Finished release [optimized] target(s) in 19.51s
Checking bootstrap artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
   Compiling syn v1.0.38
    Checking fnv v1.0.7
    Checking same-file v1.0.6
    Checking cc v1.0.58
    Checking opener v0.4.1
    Checking build_helper v0.1.0 (/home/matthias/vcs/github/rust/src/build_helper)
    Checking ansi_term v0.11.0
    Checking difference v2.0.0
    Checking walkdir v2.3.1
    Checking cmake v0.1.44
    Checking pretty_assertions v0.6.1
    Checking bstr v0.2.13
    Checking time v0.1.43
    Checking globset v0.4.5
    Checking ignore v0.4.16
   Compiling serde_derive v1.0.115
    Checking serde v1.0.115
    Checking serde_json v1.0.57
    Checking toml v0.5.6
    Checking bootstrap v0.0.0 (/home/matthias/vcs/github/rust/src/bootstrap)
    Finished release [optimized] target(s) in 15.75s
Build completed successfully in 0:04:41

Seems to be related to #76423 , cc @Mark-Simulacrum

@matthiaskrgr matthiaskrgr added the C-bug Category: This is a bug. label Sep 9, 2020
@Mark-Simulacrum
Copy link
Member

The double check changed in #76258, intentionally, because I wanted to check bootstrap's cfg(test) annotated bits too. Maybe it should be off by default though; ideally we'd have some sort of "this branch changed bootstrap" to auto-enable that but.. that's hard.

I am unsure why x.py clean stopped removing bootstrap, since the snippet of code seems to still be there:

if self.clean and os.path.exists(build_dir):
shutil.rmtree(build_dir)
. Bisecting that would be helpful.

@RalfJung
Copy link
Member

RalfJung commented Sep 9, 2020

I don't think it ever cleaned bootstrap? I thought that was a feature.^^

@Mark-Simulacrum
Copy link
Member

I don't think it was intentional to not do so, indeed looking at the git blame it seems like we explicitly did want to delete the build system: ac19420

@LeSeulArtichaut LeSeulArtichaut added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Sep 10, 2020
@bors bors closed this as completed in 4890c06 Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants