Do not build tools if user do not want them#71346
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? |
|
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