From b84bc49656b3a78d96e03587f6542589fcb155fe Mon Sep 17 00:00:00 2001 From: Prashant Varanasi Date: Sun, 28 Apr 2019 21:11:46 -0700 Subject: [PATCH 1/4] Add Go 1.12 for Travis Note: We're keeping 1.10 and using it for linting as the lint Makefile rules have to change for 1.12 support (can't use go tool vet). --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d586200e4..166610b57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ sudo: false go: - 1.10.x - 1.11.x + - 1.12.x go_import_path: go.uber.org/zap env: global: From 07431f5c3c407fc4a3798e93be84fc23fca66610 Mon Sep 17 00:00:00 2001 From: Prashant Varanasi Date: Mon, 29 Apr 2019 11:01:50 -0700 Subject: [PATCH 2/4] Lint on 1.12 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ef7893b3b..d94f851b6 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ PKG_FILES ?= *.go zapcore benchmarks buffer zapgrpc zaptest zaptest/observer int # stable release. GO_VERSION := $(shell go version | cut -d " " -f 3) GO_MINOR_VERSION := $(word 2,$(subst ., ,$(GO_VERSION))) -LINTABLE_MINOR_VERSIONS := 10 +LINTABLE_MINOR_VERSIONS := 12 ifneq ($(filter $(LINTABLE_MINOR_VERSIONS),$(GO_MINOR_VERSION)),) SHOULD_LINT := true endif @@ -45,7 +45,7 @@ ifdef SHOULD_LINT @echo "Installing test dependencies for vet..." @go test -i $(PKGS) @echo "Checking vet..." - @$(foreach dir,$(PKG_FILES),go tool vet $(VET_RULES) $(dir) 2>&1 | tee -a lint.log;) + @go vet $(VET_RULES) ./... 2>&1 | tee -a lint.log @echo "Checking lint..." @$(foreach dir,$(PKGS),golint $(dir) 2>&1 | tee -a lint.log;) @echo "Checking for unresolved FIXMEs..." From 014dd388fb1c945fa31f116f6abe0e10ad793898 Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Mon, 29 Apr 2019 12:20:22 -0700 Subject: [PATCH 3/4] Remove go 1.10 Co-Authored-By: prashantv --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 166610b57..ada5ebdcc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: go sudo: false go: - - 1.10.x - 1.11.x - 1.12.x go_import_path: go.uber.org/zap From faaa4da9a0b050446d293cfa4822d60052dec48c Mon Sep 17 00:00:00 2001 From: Prashant Varanasi Date: Mon, 29 Apr 2019 12:22:53 -0700 Subject: [PATCH 4/4] Use PKGS instead of ./... --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d94f851b6..073e9aa91 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ ifdef SHOULD_LINT @echo "Installing test dependencies for vet..." @go test -i $(PKGS) @echo "Checking vet..." - @go vet $(VET_RULES) ./... 2>&1 | tee -a lint.log + @go vet $(VET_RULES) $(PKGS) 2>&1 | tee -a lint.log @echo "Checking lint..." @$(foreach dir,$(PKGS),golint $(dir) 2>&1 | tee -a lint.log;) @echo "Checking for unresolved FIXMEs..."