Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
be6ce4ac
Unverified
Commit
be6ce4ac
authored
Nov 30, 2018
by
k8s-ci-robot
Committed by
GitHub
Nov 30, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #71524 from ixdy/bazel-_output-local-go
make bazel not follow the infinite symlink in _output/local/go
parents
dda9637f
e3fac769
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
golang.sh
hack/lib/golang.sh
+9
-1
No files found.
hack/lib/golang.sh
View file @
be6ce4ac
...
@@ -354,7 +354,15 @@ kube::golang::create_gopath_tree() {
...
@@ -354,7 +354,15 @@ kube::golang::create_gopath_tree() {
ln
-snf
"
${
KUBE_ROOT
}
"
"
${
go_pkg_dir
}
"
ln
-snf
"
${
KUBE_ROOT
}
"
"
${
go_pkg_dir
}
"
fi
fi
cat
>
"
${
KUBE_GOPATH
}
/BUILD"
<<
EOF
# 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"
# Additionally, the //:package-srcs glob recursively includes all
# subdirectories, and similarly fails due to the symlink loop. By creating a
# BUILD.bazel file, we effectively create a dummy package, which stops the
# glob from descending further into the tree and hitting the loop.
cat
>
"
${
KUBE_GOPATH
}
/BUILD.bazel"
<<
EOF
# This dummy BUILD file prevents Bazel from trying to descend through the
# This dummy BUILD file prevents Bazel from trying to descend through the
# infinite loop created by the symlink at
# infinite loop created by the symlink at
#
${
go_pkg_dir
}
#
${
go_pkg_dir
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment