-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Empty directories inside tree artifacts are not tracked #15901
Comments
@tjgq What do you think of #15789 (comment)? I could work on this, I always felt like #15276 wasn't as clean as it could have been due to this missing. |
@fmeum Yes, I think you are correct and we either have to extend the definition of |
My previous comment was a little too optimistic. I do think there are use cases where accurate tracking of tree artifact contents is required, and this probably goes beyond empty subdirectories (for example, it's also impossible for a tree artifact to contain a symlink since we always dereference them; see #15454). But this would be a feature request, not a bug. I'm reassigning this to the core team because I feel that's where a decision to implement belongs. (I'm not asking for a decision to be made at this time, though.) |
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale. |
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: