Make the error messaging for cargo install aware of build.build-dir#16623
Make the error messaging for cargo install aware of build.build-dir#16623epage merged 2 commits intorust-lang:masterfrom
cargo install aware of build.build-dir#16623Conversation
|
r? @ehuss rustbot has assigned @ehuss. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
The changes look good to me. Would you mind restructuring the commits to be atomic as requested in the contributor guide. Ideally, you add the |
``` error: could not compile `issue-16622` (bin "issue-16622") due to 1 previous error error: failed to compile `issue-16622 v0.0.0 ([…]/issue_16622)`, intermediate artifacts can be found at `[…]/issue_16622/target`. To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path. ``` currently points to the target directory. However, intermediate artifacts are stored in the directory configured by `build.build-dir`, so the message should be updated to point to that path and corresponding environment variable instead.
19e72db to
1b525a2
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@ranger-ross, thank you for your review! I addressed your comment and made the commits atomic/self-sufficient. |
Update cargo submodule 8 commits in 0c9e687d237ff04b53ccb67b4ce63e9483789e88..ce69df6f72a3b6a2b5c722ba68ddef255344b31c 2026-02-11 05:58:30 +0000 to 2026-02-12 12:39:45 +0000 - fix: apply `host.runner` only when `host-config` enabled (rust-lang/cargo#16631) - fix(cli): Improve bad manifest error (rust-lang/cargo#16630) - fix: Adjust casing of error message (rust-lang/cargo#16625) - Enable triagebot new `[view-all-comments-link]` feature (rust-lang/cargo#16629) - test(help): snapshot cargo help tests (rust-lang/cargo#16626) - Suggest a `workspace.members` entry even from outside the workspace root (rust-lang/cargo#16616) - Reorganize build unit directory layout for new build-dir layout (rust-lang/cargo#16542) - Make the error messaging for `cargo install` aware of `build.build-dir` (rust-lang/cargo#16623)
Update cargo submodule 8 commits in 0c9e687d237ff04b53ccb67b4ce63e9483789e88..ce69df6f72a3b6a2b5c722ba68ddef255344b31c 2026-02-11 05:58:30 +0000 to 2026-02-12 12:39:45 +0000 - fix: apply `host.runner` only when `host-config` enabled (rust-lang/cargo#16631) - fix(cli): Improve bad manifest error (rust-lang/cargo#16630) - fix: Adjust casing of error message (rust-lang/cargo#16625) - Enable triagebot new `[view-all-comments-link]` feature (rust-lang/cargo#16629) - test(help): snapshot cargo help tests (rust-lang/cargo#16626) - Suggest a `workspace.members` entry even from outside the workspace root (rust-lang/cargo#16616) - Reorganize build unit directory layout for new build-dir layout (rust-lang/cargo#16542) - Make the error messaging for `cargo install` aware of `build.build-dir` (rust-lang/cargo#16623)
When
cargo installfails to compile a binary, it produces the following error output:which currently points to the target directory when discussing intermediate artifacts that can be reused in future reattempts.
However, intermediate artifacts are stored in the directory determined by
build.build-dir, so the message should be updated to point to that path and corresponding environment variable instead.Closes #16622.