-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Unify tools building #41639
Unify tools building #41639
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Currently the RLS dependencies are fucked up, and I have opened rust-lang/rls#285 to adapt the current state. I'm too lazy to hand-rewrite |
src/bootstrap/compile.rs
Outdated
// so we don't set this variable during stage0 where llvm-config is | ||
// missing | ||
// We also only build the runtimes when --enable-sanitizers (or its | ||
// config.toml equivalent) is used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's with all these spacing changes and reformatting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used rustfmt, but seems it screwed up something else. Will remove.
According to the build results, this saves up to 300 seconds. Not sure if this worth the out-of-tree lockfile maintenance cost. |
Review points:
|
By the way, this could be a little bit even faster by swapping the build order of rls and cargo. In that way, it should have more parallelism since rls includes the cargo build and more crates are built in one pass. |
Thanks for the PR! I think this is the lowest hanging fruit of speeding up the dist builders right now and this is also an issue that must be resolved before the RLS hits stable. The downsides here are unfortunate, namely disregarding the lock files in the rls/cargo repositories. Unfortunately though I don't see another way of doing this. I discussed this strategy with @brson and @nrc yesterday and we're comfortable having a separate lock file in-tree for the Cargo/RLS binaries that we ship. Could this actually, though, move Cargo/RLS into the global rustc workspace? That way all their dependencies will get vendored as usual and should be buildable from source tarballs as well. |
I have no idea what will happen if we moved them into global workspace. The thing I most fear is that it mixes things up with the compiler build. As an alternative approach, can we run cargo vendor separatedly for this directory? |
The end goal is to have everything in one workspace, and I don't believe many issues will arise. Mind trying it out? |
Old branch backed up, let's see what will happen now. |
@alexcrichton the well known submodule delayed manifest problem is here, how should I deal with that? |
Something's wrong. No idea. |
@alexcrichton Is there a chance you could help diagnose the failure above? |
@alexcrichton I recommend to roll back to the original implementation (backed up as a branch, and can be merged with resolving
|
It's worth being clear up front that rustbuild with respect to crates.io is pretty precarious right now, and builds like this are showing how it's really starting to stress many underlying assumptions. I'm basically just saying that this is not going to be an easy integration do "do right," and there's likely tons of little surprises along the way like this. Unfortunately I don't know why that error is showing up. The only difference here is a change in workspace, but today we're already compiling rustc-serialize a bunch of times. For example the compiler currently links to rustc-serialize 0.3.23 and so does the rls, so why the linking error only shows up with this PR and not currently on master is confusing to me. In general we want to make these all one workspace to have one location that we're managing dependencies, not a whole bunch. The linkage problem here sounds like either a bug in the compiler or a bug in the setup, I'm not sure which. These tools are intended to be compiled with rustc as well for a full distribution, so we want them in the same workspace. I had forgotten about the submodule problem, yes, but I think we'll just need to bite the bullet and move git submodule management into |
☔ The latest upstream changes (presumably #41846) made this pull request unmergeable. Please resolve the merge conflicts. |
788f1c4
to
5ff5c48
Compare
As we can't wait for the maintainer.
43f1cd4
to
182a4ff
Compare
Ready to roll. |
@ishitatsuyuki did you want to update the git logic to be line-for-line equivalent to the current manifestation in rustbuild and update the logic later in a future PR? (discussion here) |
I don't want to do line-by-line translation personally (due to I having not so much time these days). I'm aware that this probably still has some flaw not found in review, but it's working for most of my local usecases and I consider it OK. |
Ok I think I agree with @aidanhs that we don't want to land this until it's the same as before. The submodule logic has been careful crafted over a long time, so without a reason to change it I don't think we should. If you're busy though I can push up the relevant logic. |
I understand. I will create a line2line version tomorrow. |
Basically just translate what's done on master in Rust to Python here.
@bors: r+ Ah no worries, I went ahead and did so |
📌 Commit db69d89 has been approved by |
@bors: p=1 (fixes breakage on master related to submodules) |
Unify tools building Close #41601 Time saving for up to 10 minutes. Cargo is now only compiled once. Downsides: - Out of tree Cargo.lock maintenance - Cargo.toml `[replace]` version maintenance
I just published an update for Racer relaxing dependencies. 2.0.7 on crates.io |
💔 Test failed - status-travis |
I suspect this is a spurious failure since we timed out, so retrying. @bors retry |
…ichton Unify tools building Close rust-lang#41601 Time saving for up to 10 minutes. Cargo is now only compiled once. Downsides: - Out of tree Cargo.lock maintenance - Cargo.toml `[replace]` version maintenance
Unify tools building Close #41601 Time saving for up to 10 minutes. Cargo is now only compiled once. Downsides: - Out of tree Cargo.lock maintenance - Cargo.toml `[replace]` version maintenance
☀️ Test successful - status-appveyor, status-travis |
🎊 Thanks again for working on this @ishitatsuyuki! |
Close #41601
Time saving for up to 10 minutes. Cargo is now only compiled once.
Downsides:
[replace]
version maintenance