-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
make bazel not follow the infinite symlink in _output/local/go #71524
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ixdy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
658d8a7
to
cad43dd
Compare
Otherwise, calling make followed by bazel might fail, requiring one to run make clean first. Additionally, add comments explaining why we must do this.
cad43dd
to
e3fac76
Compare
/sig release I've added comments explaining why we're doing this, too. |
# Using bazel with a recursive target (e.g. bazel test ...) will abort due to | ||
# the symlink loop created in this function, so create this special file which | ||
# tells bazel not to follow the symlink. | ||
touch "${go_pkg_basedir}/DONT_FOLLOW_SYMLINKS_WHEN_TRAVERSING_THIS_DIRECTORY_VIA_A_RECURSIVE_TARGET_PATTERN" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upstream doc here: https://docs.bazel.build/versions/master/guide.html#target-patterns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/hold
/retest |
/retest |
/retest |
What type of PR is this?
/kind cleanup
What this PR does / why we need it: without this,
bazel
sometimes fails after runningmake
, since it trips over the the infinite symlink in_output/local/go/src/k8s.io/kubernetes
.Bazel has a new
.bazelignore
file, but it doesn't work for symlink loops, and furthermore it seems to make things even worse, somehow conflicting with theexclude
in theall-srcs
filegroup in the rootBUILD.bazel
file.Does this PR introduce a user-facing change?:
/assign @BenTheElder