Why does x.py test src/libcore --stage 0
build everything up to the stage2 compiler?
#50367
Labels
C-bug
Category: This is a bug.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Today I worked on libcore. To naive me, libcore should be just like any other library on crates.io. This means I would expect to switch into the directory and execute
cargo test
. Now I know that libcore is not exactly like any other library, but I still expect a few things. Things like "I don't need to build the stage2 compiler to run unit tests".I tried to run this with the following result (I only kept the main steps):
It takes forever and doesn't make a lot of sense to me. I'd say I understand the basics of self hosting compilers, but I fail to understand
x.py
and I haven't found any resources that explain this behavior. Until now, I only worked oncore
orstd
and I always need to wait through long build times which also builds the compiler (multiple times). Also: if I change a thing in libcore, all of those steps are executed again! I don't understand...I already experimented with the
--stage
and--keep-stage
parameters, but apparently they are just broken somehow. Maybe we need a build system working group for all these issues? 😋I know that you all are already trying to improve the compiler documentation a lot (thanks!), but I'm afraid that I think it's still very suboptimal when it comes to the build system (for reference, I read this and this). These long build times and in particular the feeling that everything could be faster "if stupid me would only understand the build system", are not really beneficial to attract (and keep) new contributors. There is only so much laundry one can during builds...
The text was updated successfully, but these errors were encountered: