-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Do not build tools if user do not want them #71346
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
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
575bbcc
to
9296d3b
Compare
@bors r+ Thanks! |
📌 Commit 9296d3b has been approved by |
Rollup of 4 pull requests Successful merges: - rust-lang#69362 (Stabilize most common subset of alloc_layout_extras) - rust-lang#71174 (Check that main/start is not async) - rust-lang#71285 (MIR: use HirId instead of NodeId to avoid cycles while inlining) - rust-lang#71346 (Do not build tools if user do not want them) Failed merges: r? @ghost
I see cargo is getting built, even though I asked only for [build]
extended = true
tools = ["rustfmt"] |
Ok, I suppose that was because |
@tshepang I'm on my mobile right now but I think there was piece of code somewhere that always enables Cargo when |
@tshepang exactly. I don't know whether it's fine to skip Cargo when bulidng other tools though. |
I would rather have a warning, or at least the behavior documented (in config.toml.example), than be surprised. Perhaps I should prepare a PR? |
@tshepang sure but maybe this condition should be changed from Line 562 in 4bfd62a
to
since Cargo won't be installed if it's not present in |
That makes me wonder why cargo is not made part of that |
I have no idea, probably because of this line: Line 584 in 9296d3b
|
@Mark-Simulacrum why is cargo marked as a essential tool? |
We can't not ship a cargo, since essentially that just means a broken nightly (or whatever toolchain). It might be that there's a better way of doing it in the code though, I'm happy to review PRs and such changing the terminology or specific implementation details so long as we keep the property that our dist builders all build cargo and error if they're not able to. |
Fixes #71307