Skip to content

Make build_crate use root_out_dir as its temp. #29353

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

Merged
merged 2 commits into from
Jun 5, 2025

Conversation

szilardszaloki
Copy link
Collaborator

@@ -36,6 +36,8 @@ template("build_crate") {
# --frozen (--locked + --offline)
# when running `cargo build`.
args = [
"--temp_dir_path",
rebase_path(root_out_dir),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would either use target_out_dir here or give it some path within root_out_dir. This also needs to be in the outputs list to ensure that there are no conflicts with outputs from other targets.

I also noticed below that there are unlisted inputs here like Cargo.toml and .cargo/config.toml and I'm a bit concerned that other artifacts are left in target_dir that are not listed as outputs and may therefore also conflict. I don't think it's a good idea to have any of these outputs in the root out dir for exactly this reason.

Copy link
Collaborator

@bridiver bridiver Jun 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also it should generate a depfile with --emit=dep-info
https://gn.googlesource.com/gn/+/main/docs/reference.md#var_depfile

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@szilardszaloki szilardszaloki force-pushed the szilard/46505-build_crate-temp-dir branch from 113c3d6 to 568a52a Compare June 4, 2025 23:14
@szilardszaloki szilardszaloki merged commit 6e743db into master Jun 5, 2025
18 checks passed
@szilardszaloki szilardszaloki deleted the szilard/46505-build_crate-temp-dir branch June 5, 2025 20:21
@github-actions github-actions bot added this to the 1.81.x - Nightly milestone Jun 5, 2025
@brave-builds
Copy link
Collaborator

Released in v1.81.56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo (via build_crate) cannot create temp dir — sporadic
3 participants