mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-12 20:57:20 +00:00
Rewrite typecheck against x/tools/go/packages
This runs much faster than before. This change removes all of the async status output because all of the compute time is spent inside go/packages, with no opportunity to update the status. Adds testdata code to prove it fails when expected.
This commit is contained in:
@@ -68,7 +68,7 @@ while IFS='' read -r line; do
|
||||
all_packages+=("./$line")
|
||||
done < <( hack/make-rules/helpers/cache_go_dirs.sh "${KUBE_ROOT}/_tmp/all_go_dirs" |
|
||||
grep "^${FOCUS:-.}" |
|
||||
grep -vE "(third_party|generated|clientset_generated|hack|/_)" |
|
||||
grep -vE "(third_party|generated|clientset_generated|hack|testdata|/_)" |
|
||||
grep -vE "$ignore_pattern" )
|
||||
|
||||
failing_packages=()
|
||||
|
@@ -30,10 +30,9 @@ 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.
|
||||
# As of June, 2020 the typecheck tool is written in terms of go/packages, but
|
||||
# that library doesn't work well with multiple modules. Until that is done,
|
||||
# force this tooling to run in a fake GOPATH.
|
||||
ret=0
|
||||
hack/run-in-gopath.sh \
|
||||
go run test/typecheck/main.go "$@" || ret=$?
|
||||
|
Reference in New Issue
Block a user