mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
Make verify-typecheck not depend on GOPATH
This script fails if not under a GOPATH because we use go/types, which is not modules aware.
This commit is contained in:
parent
a2f26075c8
commit
15df3d6042
@ -30,8 +30,13 @@ cd "${KUBE_ROOT}"
|
||||
|
||||
make --no-print-directory -C "${KUBE_ROOT}" generated_files
|
||||
|
||||
# As of June, 2020 the typecheck tool is written in terms of go/types, but that
|
||||
# library doesn't work well with modules. Guidance is to rewrite tools against
|
||||
# golang.org/x/tools/go/packages. Until that is done, force this tooling to
|
||||
# run in a fake GOPATH.
|
||||
ret=0
|
||||
go run test/typecheck/main.go "$@" || ret=$?
|
||||
hack/run-in-gopath.sh \
|
||||
go run test/typecheck/main.go "$@" || ret=$?
|
||||
if [[ $ret -ne 0 ]]; then
|
||||
echo "!!! Type Check has failed. This may cause cross platform build failures." >&2
|
||||
echo "!!! Please see https://git.k8s.io/kubernetes/test/typecheck for more information." >&2
|
||||
|
Loading…
Reference in New Issue
Block a user