Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

go vet fails during make test #864

Closed
obourdon opened this issue Apr 19, 2016 · 3 comments
Closed

go vet fails during make test #864

obourdon opened this issue Apr 19, 2016 · 3 comments

Comments

@obourdon
Copy link
Contributor

On Ubuntu 14.04.4 amd64 minimal netboot ISO installation

Environment

GOPATH=/home/user/WKS/snap-build
GOROOT=/home/user/GO/go-1.6.1
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/user/GO/go-1.6.1/bin:/home/user/WKS/snap-build/bin

Got go binary archive from official web site and extracted it

$ mkdir -p ~/GO
$ cd ~/GO
$ wget https://storage.googleapis.com/golang/go1.6.1.linux-amd64.tar.gz
$ tar zxf go1.6.1.linux-amd64.tar.gz
$ mv go go-1.6.1
$ type go
go is hashed (/home/user/GO/go-1.6.1/bin/go)

$ go version
go version go1.6.1 linux/amd64

Ran the following commands:

$ go get github.com/intelsdi-x/snap
$ go get github.com/tools/godep
$ make

$ make test
export SNAP_PATH=pwd/build; bash -c "./scripts/test.sh"
Getting GoConvey if not found
Getting goimports if not found
Getting cover if not found
gofmt
goimports
go vet
control/config.go:82: github.com/vrischmann/jsonutil.Duration composite literal uses unkeyed fields
control/control_test.go:1013: github.com/vrischmann/jsonutil.Duration composite literal uses unkeyed fields
exit status 1
snapd.go:617: github.com/vrischmann/jsonutil.Duration composite literal uses unkeyed fields
exit status 1
make: *** [test] Error 1

Latest commit in /home/user/WKS/snap-build/src/github.com/intelsdi-x/snap master branch is:

commit 388e91d
Merge: 8f2a67a 2d02134
Author: Matt Brender mjbrender@gmail.com
Date: Tue Apr 19 08:29:05 2016 -0700

Merge pull request #859 from mjbrender/master

Clearer README introduction, added image and blog links
@obourdon
Copy link
Contributor Author

Forgot to mention that I also tried with latest go 1.5 and 1.4 but it led to the same error

I also tried to change some of the import statements by changing
mport { ... "x" ... }
into
import { ... . "x" ...}
(adding a . in front but it led to another error
Thanks for your help

@geauxvirtual
Copy link
Contributor

Thanks for reporting this. We've seen this issue before, but it seems to vary from environment to environment. For instance, our Travis-CI tests have yet to report these errors on any Golang version we've tested (Go 1.4.x in the past, Go 1.5.3 and Go 1.6.1 currently), yet we can produce these errors on a variety of other platforms.

This error is stemming from a package we import into the project that seems to be using unkeyed fields. We'll investigate if a newer version of this pkg exists with this fix in place, or possibly look to reimplement this functionality in a different way that will allow go vet to pass.

geauxvirtual added a commit that referenced this issue Apr 21, 2016
Fix #864: Disable running go vet until consistent output can be achieved
@geauxvirtual
Copy link
Contributor

We are disabling running of go vet in our test.sh script until we can get a more predictable output from the tool on our code base. The merged PR #865 includes a thorough explanation of why we are disabling it for the time being.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants