Skip to content
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

Ensure depfile's parent directory is created before running an action. #2492

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

digit-google
Copy link
Contributor

For most actions, the depfile will be in the same directory as one of its outputs, and their parent directory will be created by Ninja before running the command. However, this is not always the case.

In particular, the GN build tool is changing its Ninja build plan generation logic, switching from using stamp files to phony targets, after issue #478 was fixed in Ninja. For additionnal context see https://gn-review.googlesource.com/c/gn/+/11380.

The newly generated build plans trigger this condition more frequently, which results in flaky build failures for large GN-based projects such as Fuchsia.

This patch ensures the depfile's parent directory is always created before the command is launched to get rid of the issue entirely.

For most actions, the depfile will be in the same directory as one
of its outputs, and their  parent directory will be created by Ninja
before running the command. However, this is not always the case.

In particular, the GN build tool is changing its Ninja build plan
generation logic, switching from using stamp files to phony targets,
after issue ninja-build#478 was fixed in Ninja. For additionnal context
see https://gn-review.googlesource.com/c/gn/+/11380.

The newly generated build plans trigger this condition more frequently,
which results in flaky build failures for large GN-based projects such
as Fuchsia.

This patch ensures the depfile's parent directory is always created
before the command is launched to get rid of the issue entirely.
@nico nico merged commit fe83433 into ninja-build:master Sep 10, 2024
11 checks passed
@digit-google digit-google deleted the create-depfile-directory branch September 19, 2024 16:02
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.

2 participants