Empty directories inside tree artifacts are not tracked #15901
Labels
P3
We're not considering working on this, but happy to review a PR. (No assignee)
team-Core
Skyframe, bazel query, BEP, options parsing, bazelrc
team-Remote-Exec
Issues and PRs for the Execution (Remote) team
type: feature request
Description of the bug:
Skyframe doesn't track the existence of empty directories inside a tree artifact. As a result, if a tree artifact with an empty directory is produced and the empty directory is manually deleted, rebuilding doesn't recreate the empty directory. Likewise, changing a rule implementation to produce an empty directory when it previously didn't doesn't invalidate the build results.
I believe the root cause is that we model a
TreeArtifactValue
(the SkyValue representing the contents of a tree artifact) as a collection ofTreeFileArtifacts
, one per regular file inside the tree artifact, ignoring empty directories.What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Workspace:
Then run:
Which operating system are you running Bazel on?
Linux, MacOS
What is the output of
bazel info release
?development version
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.Built @ 6f0913e (near current head)
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?Have you found anything relevant by searching the web?
N/A
Any other information, logs, or outputs that you want to share?
N/A
The text was updated successfully, but these errors were encountered: