.github/workflows: skip vettools for Go 1.18 and 1.19

There is an issue in golang.org/x/tools@v0.12.0. See golang/go#62519
for the details.

As a temporary solution, just skip using vettools for Go 1.18 and 1.19.
This commit is contained in:
Hajime Hoshi 2023-10-04 13:27:04 +09:00
parent 0af42e6620
commit cc999a4c5b

View File

@ -66,6 +66,9 @@ jobs:
go list ./... | grep -v -x -F -f .github/workflows/govetblock.txt | xargs go vet go list ./... | grep -v -x -F -f .github/workflows/govetblock.txt | xargs go vet
- name: go vet (vettool) - name: go vet (vettool)
# Stop vettools for old Go versions. Apparently this is an issue in golang.org/x/tools (golang/go#62519)
# TODO: Update golang.org/x/tools and remove this restriction.
if: ${{ !startsWith(matrix.go, '1.18.') && !startsWith(matrix.go, '1.19.') }}
run: | run: |
go install ./internal/vettools go install ./internal/vettools
go vet -vettool=$(which vettools)${{ runner.os == 'Windows' && '.exe' || '' }} -v ./... go vet -vettool=$(which vettools)${{ runner.os == 'Windows' && '.exe' || '' }} -v ./...