Godep vendor folder with go vet and godeps.json and stale checkout error. (sorry 2 issues here)

76 visualizações
Pular para a primeira mensagem não lida

lorne....@homes.co.nz

não lida,
2 de mai. de 2016, 17:06:5502/05/2016
para golang-nuts
Hi All

I am a noob with Go and only started a few weeks back.  I have just completed my first API service! Yay!!

I am using Go version 1.5.3 and godep's v60.  I had the GO15VENDOREXPERIMENT set to 1, and when I ran "godep save ./..." created the new folder structure using the "./vendor" folder in the root directory.

I had two issues pop up:
1: When I committed it, our Travis CI script failed due to the GO Vet cmd the script runs checking the contents of the ./vendor folder.  Is there anything options I need to run with go vet in this case?  

Issue number 2 appeared when we did the following:
I deleted the Godeps folder and vendore folder.  Then I set the GO15VENDOREXPERIMENT = 0 and ran "godep save ./.." I got the old "_workspace" folder in the "./Godeps" folder.  
When our travis script ran "go get github.com/onsi/ginkgo" it exit's with a error message displaying "stale checkout."  

As my colleagues run godeps v52/5.2  We have notices that the godeps.json file dependancies differ a lot.  v5.2 seams to record only the root of the dependancy such as:
{
   "ImportPath": "gopkg.in/mgo.v2",
   "Comment": "r2015.12.06-2-g03c9f3e",
   "Rev": "03c9f3ee4c14c8e51ee521a6a7d0425658dd6f64"
}

where as Godep's v60 produces the following:
{
"ImportPath": "gopkg.in/mgo.v2",
"Comment": "r2016.02.04-1-gb6e2fa3",
"Rev": "b6e2fa371e64216a45e61072a96d4e3859f169da"
},
{
"ImportPath": "gopkg.in/mgo.v2/bson",
"Comment": "r2016.02.04-1-gb6e2fa3",
"Rev": "b6e2fa371e64216a45e61072a96d4e3859f169da"
},
{
"ImportPath": "gopkg.in/mgo.v2/internal/sasl",
"Comment": "r2016.02.04-1-gb6e2fa3",
"Rev": "b6e2fa371e64216a45e61072a96d4e3859f169da"
},
{
"ImportPath": "gopkg.in/mgo.v2/internal/scram",
"Comment": "r2016.02.04-1-gb6e2fa3",
"Rev": "b6e2fa371e64216a45e61072a96d4e3859f169da"
}

When I manually removed the extra package dependancies, the TravisCI script completed normally and ran it's "go get..." command without any issues.

 Has anyone com across this issue?


Lorne

Edward Muller

não lida,
5 de mai. de 2016, 17:16:4705/05/2016
para lorne....@homes.co.nz, golang-nuts
On May 2, 2016, at 12:26 PM, lorne....@homes.co.nz wrote:

Hi All

I am a noob with Go and only started a few weeks back.  I have just completed my first API service! Yay!!

I am using Go version 1.5.3 and godep's v60.  I had the GO15VENDOREXPERIMENT set to 1, and when I ran "godep save ./..." created the new folder structure using the "./vendor" folder in the root directory.

I had two issues pop up:
1: When I committed it, our Travis CI script failed due to the GO Vet cmd the script runs checking the contents of the ./vendor folder.  Is there anything options I need to run with go vet in this case?  

If your travis ci script ran `go vet ./…`, it should instead use a package spec that doesn’t include vendor/. `./…` includes vendor.


Issue number 2 appeared when we did the following:
I deleted the Godeps folder and vendore folder.  Then I set the GO15VENDOREXPERIMENT = 0 and ran "godep save ./.." I got the old "_workspace" folder in the "./Godeps" folder.  
When our travis script ran "go get github.com/onsi/ginkgo" it exit's with a error message displaying "stale checkout.”  

Why is your travis script running `go get`? Godeps would have saved your deps into it’s workspace. So either `godep go <cmd>` or a `godep restore; go <cmd>` and everything should work.


As my colleagues run godeps v52/5.2  We have notices that the godeps.json file dependancies differ a lot.  v5.2 seams to record only the root of the dependancy such as:
{
   "ImportPath": "gopkg.in/mgo.v2",
   "Comment": "r2015.12.06-2-g03c9f3e",
   "Rev": "03c9f3ee4c14c8e51ee521a6a7d0425658dd6f64"
}

where as Godep's v60 produces the following:
{
"ImportPath": "gopkg.in/mgo.v2",
"Comment": "r2016.02.04-1-gb6e2fa3",
"Rev": "b6e2fa371e64216a45e61072a96d4e3859f169da"
},
{
"ImportPath": "gopkg.in/mgo.v2/bson",
"Comment": "r2016.02.04-1-gb6e2fa3",
"Rev": "b6e2fa371e64216a45e61072a96d4e3859f169da"
},
{
"ImportPath": "gopkg.in/mgo.v2/internal/sasl",
"Comment": "r2016.02.04-1-gb6e2fa3",
"Rev": "b6e2fa371e64216a45e61072a96d4e3859f169da"
},
{
"ImportPath": "gopkg.in/mgo.v2/internal/scram",
"Comment": "r2016.02.04-1-gb6e2fa3",
"Rev": "b6e2fa371e64216a45e61072a96d4e3859f169da"
}

When I manually removed the extra package dependancies, the TravisCI script completed normally and ran it's "go get..." command without any issues.

Those are not extra across all possible targets.


 Has anyone com across this issue?


Lorne


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem