-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
can't build on go1.11-1.11.3 because of "go 1.12" declaration in go.mod #345
Comments
Upgrade your Go 1.11. That error message is a bug and was fixed in a Go 1.11.x point release. |
I'm not sure you understand. This error is happening when attempting to load my golang code into a google function. I have no control over the golang runtime used in the google function |
Thanks, it looks like it's on Go 1.11.5 right now, though that was only updated a few days ago, so might not have hit production yet. Before that, it was on Go 1.11.0. I just sent a change to update it to 1.11.6. |
We're in the process of updating to Go 1.11.5. |
Go 1.11.4 or later is fine per https://tip.golang.org/doc/go1.12#modules |
What were we on before "in the process of updating to Go 1.11.5"? |
"Before that, it was on Go 1.11.0." great, we're on track for 1.11.5 very soon, then, and we should be able to get to 1.11.6 a bit later. |
Sorry, I shouldn't reply to bugs while watching a meeting. 🙄 |
Not to press, but do we have an ETA as to when this will be available for use in GCP? |
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.,:
|
@stewblr I tested and using this version did get my function working. Thank you for your help. |
Glad to hear the temporary fix worked. |
I have the same problem with deployment to Google AppEngine ( Go1.11 runtime ) |
EDIT: This comment below is wrong, please disregard. I misconfigured my local installation. Go 1.11.4+ should handle this situation fine. The Go 1.11 runtime on Google App Engine has been running Go 1.11.5 since March 6, 2019 and should not have the problems described in this thread. There's nothing to fix on the App Engine side for this -- the modules the user is depending on have declared that Go 1.12 is the minimum version supported so therefore it cannot build on Go 1.11. It was the choice of the modules' authors to not allow builds on anything before Go 1.12. Background: Here's an example of someone using Go 1.12 creating their go.mod for the first time:
As you can see,
There are only three options for users impacted by this:
|
@sbuss, that's not accurate. A module declared with "go 1.12" should still try to optimistically build with Go 1.11.x. This was a bug that was fixed in Go 1.11.4. See https://tip.golang.org/doc/go1.12#modules App Engine is using a version of Go 1.11.x predating Go 1.11.4. |
App Engine is using Go 1.11.5 since March 6. |
You're right, I miconfigured the non-default 1.11.6 installation by not setting GOROOT. Setting it makes it work fine. I can't replicate any errors on App Engine. Depending on |
That's not what @broady implied 3 days ago in the comments above, and is not implied by the error messages users were reporting in this thread, all within the past 3 days. |
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: googleapis/google-api-go-client#345
Here the current versions according to runtime.Version:
It's working on App Engine, but not on Cloud Functions. |
see CL 39231 for fix by @jadekler |
Lots of confusion here. Just to be super clear: GAE: currently on 1.11.5 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. |
@broady Thank for clarify |
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
The text was updated successfully, but these errors were encountered: