Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not build go 1.11 #59

Closed
cep21 opened this issue Jul 31, 2019 · 7 comments
Closed

Does not build go 1.11 #59

cep21 opened this issue Jul 31, 2019 · 7 comments

Comments

@cep21
Copy link

cep21 commented Jul 31, 2019

Hi,

Your go.mod file prevents golang-lru from building on go 1.11. Is 1.12 a strict requirement of the library? If not, can the go.mod file be modified to allow other go versions at least to go 1.11?

Thanks!

@jefferai
Copy link
Member

What error are you seeing? What specific go version?

@cep21
Copy link
Author

cep21 commented Jul 31, 2019

You have go 1.12 in your mod file.

$ make build
486go build -mod=readonly ./...
487go build github.com/hashicorp/golang-lru/simplelru: module requires Go 1.12
488make: *** [build] Error 1

@cep21
Copy link
Author

cep21 commented Jul 31, 2019

This is go 1.11

@jefferai
Copy link
Member

What specific go version? It builds just fine for me using go 1.11.12.

@cep21
Copy link
Author

cep21 commented Jul 31, 2019

Did you use it as a dependency or the module directly? Try it as a dependency.

https://travis-ci.org/cep21/cwopencensusexporter/builds/565712108
https://travis-ci.org/cep21/cwopencensusexporter/jobs/565712110

@jefferai
Copy link
Member

This works fine with 1.11.12:

$ cat go.mod 
module lrutest

require github.com/hashicorp/golang-lru v0.5.3

$ cat main.go 
package main

import lru "github.com/hashicorp/golang-lru/simplelru"

func main() {
        lru.NewLRU(128, nil)
}

$ go1.11.12 build

@jefferai
Copy link
Member

I believe this is because your Travis build is using go1.11.0. This will almost certainly not work as its module support is highly broken. Please update your Travis config to the latest 1.11.x version of Go (currently 1.11.12).

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

No branches or pull requests

2 participants