From 7e311602883ad48dcab963776d2df8ab699b45d5 Mon Sep 17 00:00:00 2001 From: thepudds <20628140+thepudds@users.noreply.github.com> Date: Mon, 31 May 2021 12:45:00 -0400 Subject: [PATCH] travis: temp workaround for 'multiple //go:build comments' error by setting 'go 1.17' directive Workaround dvyukov/go-fuzz#313. cmd/go should in theory pay attention to the version set in the 'go' directive when interpreting //go:build comments, --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8d8e89383..9f8dc047c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -68,8 +68,14 @@ script: - git clone --depth=1 https://github.com/thepudds/go-fuzz-corpus $GOPATH/src/github.com/dvyukov/go-fuzz-corpus - cd $GOPATH/src/github.com/dvyukov/go-fuzz-corpus/ - cd png + # Create a small module to test the png example. + - go mod init github.com/dvyukov/go-fuzz-corpus/png + - go mod tidy + - go get -d github.com/dvyukov/go-fuzz/go-fuzz-dep + # TODO: temp workaround for 'multiple //go:build comments' error (dvyukov/go-fuzz#313) by setting 'go 1.17' directive. + - go mod edit -go=1.17 - ls -l - + # Reduce chances of future surprises due to any caching. - rm -rf fuzz.zip ./freshworkdir