feat: Remove Go Typecheck Tools Implement GitHub Actions Based Typecheck for OpenIM (#2140)

* feat: remove go typecheck tools

* feat: add actions go  typecheck tools

* Update verify-typecheck.sh
This commit is contained in:
Xinwei Xiong
2024-03-25 12:27:40 +08:00
committed by GitHub
parent f6ab243d2f
commit 71f62080f3
15 changed files with 19 additions and 547 deletions
+3 -10
View File
@@ -16,26 +16,19 @@
# This script does a fast type check of script srnetes code for all platforms.
# Usage: `scripts/verify-typecheck.sh`.
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
source "${OPENIM_ROOT}/scripts/lib/init.sh"
openim::golang::verify_go_version
cd "${OPENIM_ROOT}"
# 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
TYPECHECK_SERIAL="${TYPECHECK_SERIAL:-false}"
scripts/run-in-gopath.sh \
go run test/typecheck/typecheck.go "$@" "--serial=$TYPECHECK_SERIAL" || ret=$?
make tools.verify.typecheck
${OPENIM_ROOT}/_output/tools/typecheck "$@" "--serial=$TYPECHECK_SERIAL" || ret=$?
if [[ $ret -ne 0 ]]; then
openim::log::error "Type Check has failed. This may cause cross platform build failures." >&2
openim::log::error "Please see https://github.com/openimsdk/open-im-server/tree/main/test/typecheck for more information." >&2
openim::log::error "Please see https://github.com/kubecub/typecheck for more information." >&2
exit 1
fi