I just updated google-cloud-sdk, and now dev_appserver is using goroot 1.6 instead of 1.8 so a bunch of stuff is not being recognised. Have looked all over the place, how do I tell dev_appserver to use goroot 1.8 instead of 1.6 ? It seems incredibly trivial.
1条回答 默认 最新
doubi7306 2017-10-11 18:12关注The Go App Engine SDK uses 1.6, there is no way to run a higher Go version in App Engine. Their systems are finely tuned to work with a specific version and subset of features. A large production environment like App Engine has to go through an enormous amount of R&D to push new SDK versions. You just have to wait for new versions to trickle out and use what is available.
That said, if you really need to use a newer version of Go, you can always spin up a Compute Engine server, but you lose all the convenience of the standard or flex environments like auto scaling.
EDIT: As of June 27, 2017 they have enabled Go 1.8 as BETA in the SDK. See info in the release notes here: https://cloud.google.com/appengine/docs/standard/go/release-notes
June 27, 2017
Go runtime notes
Updated Go SDK to version 1.9.55 Enable the Go 1.8 beta This release adds beta support for go1.8. To use Go 1.8, set api_version: go1.8 in your app.yaml configuration file. You must also use App Engine SDK, not Cloud SDK. To download the App Engine SDK, go to the Downloads page and at the bottom of the page, expand the Or, you can download the original App Engine SDK for Go section.
But notice that even as of Oct 3, 2017 they still call 1.8 beta.
October 3, 2017
Updated Go SDK to 1.9.59 Fixed bug in dev_appserver.py which used incorrect build constraints for the Go 1.8 beta.
EDIT2: After a little tinkering, don't be alarmed if
goapp versionstill prints1.6.4, it defaults to this. You have to be in the directory with theapp.yamlwithapi_version: go1.8or it won't show. Thegoappin the base directory is a script that parses theapp.yamlto determine which version to use.解决 无用评论 打赏 举报