Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

error when comparing with devel #452

Closed
gyuho opened this issue Apr 7, 2016 · 4 comments
Closed

error when comparing with devel #452

gyuho opened this issue Apr 7, 2016 · 4 comments

Comments

@gyuho
Copy link

gyuho commented Apr 7, 2016

$ godep restore
godep: WARNING: Go version (devel) & $GO15VENDOREXPERIMENT= wants to enable the vendor experiment, but disabling because a Godep workspace (Godeps/_workspace) exists
godep: Error comparing go1.7 to devel

https://travis-ci.org/coreos/etcd-play/jobs/121345461

I think godep fails when it tries to compare go1.7 with devel?

Please let me know if I can provide more information.

Thanks!

@freeformz
Copy link

Ugh. I'm not sure how to ask the go command if it's go1.7 or not while it's in "devel" mode.

@freeformz
Copy link

I could at this point just assume that anything that reports "devel" is go1.7 though.

@freeformz
Copy link

The go tool uses a build.Context.ReleaseTags slice and go1.7 has been added in devel. To take a "guess" at this I could compile/run this code with the current go version and take the left most element of the array. This is likely to work, until the go team changes the order of this slice for any random reason.

package main

import (
  "fmt"
  "go/build"
)

func main() {
  fmt.Println(build.Default.ReleaseTags[len(build.Default.ReleaseTags)-1])
}

That's super fragile, but so is having to say deal with what the definition of "devel" is.

Thoughts?

@freeformz
Copy link

I could also parse the date returned by version in the devel case and hard code in the dates the tree was opened. This may then break every major cycle though.

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