From 8f3cbc923a051eb39ceca54b0954b1c34bcf025e Mon Sep 17 00:00:00 2001 From: Benjamin Elder Date: Sun, 7 Mar 2021 13:11:29 -0800 Subject: [PATCH] drop bazel logic from hack/lib/golang.sh --- hack/lib/golang.sh | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index 746c600dffb..97ae45a8281 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -458,20 +458,6 @@ kube::golang::create_gopath_tree() { if [[ ! -e "${go_pkg_dir}" || "$(readlink "${go_pkg_dir}")" != "${KUBE_ROOT}" ]]; then ln -snf "${KUBE_ROOT}" "${go_pkg_dir}" fi - - # 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" <