google-api-go-client: can't build on go1.11-1.11.3 because of "go 1.12" declaration in go.mod
Upgrading to go 1.12 broke compatibility with google functions, which only supports 1.11. I get the following error trying to deploy a golang google function using this library (which is, in turn used by google’s bigquery library. I’m going to try to downgrade to an earlier version
Deployment failure:
Build failed: go: finding cloud.google.com/go/bigquery latest
go: finding cloud.google.com/go/functions/metadata latest
go: finding cloud.google.com/go v0.37.1
go: downloading cloud.google.com/go v0.37.1
go: finding github.com/googleapis/gax-go/v2 v2.0.4
go: finding github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024
go: finding golang.org/x/tools v0.0.0-20190312170243-e65039ee4138
go: finding golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421
go: finding golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6
go: finding google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19
go: finding golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f
go: finding google.golang.org/api v0.2.0
go: finding golang.org/x/build v0.0.0-20190314133821-5284462c4bec
go: finding golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e
go: finding google.golang.org/appengine v1.4.0
go: finding golang.org/x/net v0.0.0-20190213061140-3a22650c66bd
go: finding golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961
go: finding golang.org/x/tools v0.0.0-20190226205152-f727befe758c
go: finding golang.org/x/net v0.0.0-20190311183353-d8887717615a
go: finding golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: finding golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
go: downloading google.golang.org/api v0.2.0
go: downloading google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19
go: downloading github.com/googleapis/gax-go v2.0.0+incompatible
go: downloading github.com/hashicorp/golang-lru v0.5.0
go: downloading github.com/googleapis/gax-go/v2 v2.0.4
go: downloading golang.org/x/net v0.0.0-20190311183353-d8887717615a
go: downloading golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
go: downloading golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421
go build google.golang.org/api/googleapi/internal/uritemplates: module requires Go 1.12
go build google.golang.org/api/iterator: module requires Go 1.12
go build google.golang.org/api/internal: module requires Go 1.12
go build google.golang.org/api/googleapi/transport: module requires Go 1.12
go build google.golang.org/api/transport/http/internal/propagation: module requires Go 1.12
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 24 (12 by maintainers)
Commits related to this issue
- lock cloud.google.com/go@v0.37.0 for campatibility with Go 1.12 latest 0.37.1 module required Go 1.12 Go 1.11.4 or later should work fine but cloud functions is on Go 1.11.0 now. ref: https://github... — committed to loivis/pavium-api by deleted user 5 years ago
- Do Travis build on Go v1.11.x See https://github.com/googleapis/google-api-go-client/issues/345#issuecomment-475725152 — committed to reload/dnsimple-punktum-dk-ds-upload by arnested 5 years ago
- Do build on Go v1.11.x See https://github.com/googleapis/google-api-go-client/issues/345#issuecomment-475725152 — committed to reload/dnsimple-punktum-dk-ds-upload by arnested 5 years ago
Hi Brent,
I can’t give a fixed timeline as it depends on some releases landing. This should hopefully make it into the next release. In the meantime, you could depend on an older version of the libs, e.g.,:
Lots of confusion here. Just to be super clear:
GAE: currently on 1.11.5 GCF: currently on 1.11.0, soon 1.11.5 or 1.11.6
This module: soon to remove “go 1.12” line from go.mod (see CL 39231)
Other modules: hopefully the same.
GCF users: until the builder is updated to 1.11.5+ (soon), pin yourself to v0.37 of cloud.google.com/go, and/or v0.1.0 of google.golang.org/api.
I have the same problem with deployment to Google AppEngine ( Go1.11 runtime ) The workaround works but I hope it gets fixed.
Sorry, I shouldn’t reply to bugs while watching a meeting. 🙄
Go 1.11.4 or later is fine per https://tip.golang.org/doc/go1.12#modules
Not to press, but do we have an ETA as to when this will be available for use in GCP?