Symlink forest should respect .bazelignore #16842
Labels
help wanted
Someone outside the Bazel team could own this
P2
We'll consider working on this in future. (Assignee optional)
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: bug
Description of the bug:
The symlink forest does not respect the
.bazelignore
file, this was unexpected behavior, and in my situation led to non hermetic builds that poised a shared build cache.In our case it was the
node_modules
folder that is moved from being referenced using the now deprecated/removedmanaged_directories
feature (#15463)It is ignored since we do not want Bazel to be able to depend on this folder even by accident, but since it is linked in it still can happen.
This does not fix hermitic problems for local/worker builds but it does remove one source.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
clone the demo repo here and run
./demo.sh
.Note that the genrule can access the content of the
ignored_directory
even though it is in the.bazelignnore
https://github.com/KrauseStefan/bazel_issue_16842_demo/tree/main
Which operating system are you running Bazel on?
WSL / Native Windows
What is the output of
bazel info release
?release 5.3.2
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
I tracked down the place where the symlinks are created, ignorering top level folders would have been easy but I realise that this would complicate the code a bit, so the question is also would you be interested in the
.ignorebazel
to be respected in context of the Symlink forest?SymlinkForest.java:127
Extra context
Obviously a build cache can be poised any an almost infinite number of way when we update it from local developers machines with the local/worker strategy that is also why the cache is a dev only cache, CI has its own and uses the sandbox strateg.
There are some politics that prevent us from using the same cache as CI even if read-only.
Essentially a tradeoff between speed and hermicity.
I was very much in doubt if this should be a bug or a feature request, but decided on bug since this is mostly about unexpected behavior.
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: