I am really confused about importing the required packages, but all its files were excluded nobuild_files

I have the latest tools installed, app.go

I have the following imports

"github.com/go-martini/martini"
"github.com/martini-contrib/binding"
"github.com/martini-contrib/render"
"github.com/moovweb/gokogiri"
"github.com/moovweb/gokogiri/xml"

      

And in app.yaml

application: app
version: 1
runtime: go
api_version: go1

handlers:
- url: /.*
  script: _go_app

      

I saved external dependencies with a tool godep save

. But when trying to execute the command goapp serve

, the following error occurred

SRSLY-2:app bezigon$ goapp serve
INFO     2015-05-27 09:11:22,645 devappserver2.py:745] Skipping SDK update check.
INFO     2015-05-27 09:11:23,048 api_server.py:190] Starting API server at: http://localhost:57449
INFO     2015-05-27 09:11:23,071 dispatcher.py:192] Starting module "default" running at: http://localhost:8080
INFO     2015-05-27 09:11:23,073 admin_server.py:118] Starting admin server at: http://localhost:8000
ERROR    2015-05-27 09:11:24,772 go_runtime.py:180] Failed to build Go application: (Executed command: /Users/bezigon/google-cloud-sdk/platform/google_appengine/goroot/bin/go-app-builder -app_base /Users/bezigon/go/src/github.com/bezigon/app -arch 6 -dynamic -goroot /Users/bezigon/google-cloud-sdk/platform/google_appengine/goroot -nobuild_files ^^$ -unsafe -gopath /Users/bezigon/go -print_extras_hash Godeps/_workspace/src/github.com/moovweb/gokogiri/html/xpath_test.go Godeps/_workspace/src/github.com/martini-contrib/binding/validate_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/attribute.go Godeps/_workspace/src/github.com/martini-contrib/binding/file_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/document_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xpath/util.go Godeps/_workspace/src/github.com/go-martini/martini/logger.go Godeps/_workspace/src/github.com/martini-contrib/binding/misc_test.go Godeps/_workspace/src/github.com/go-martini/martini/response_writer_test.go Godeps/_workspace/src/github.com/codegangsta/inject/inject_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/text.go Godeps/_workspace/src/github.com/go-martini/martini/go_version.go Godeps/_workspace/src/github.com/go-martini/martini/router_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/nodeset.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xpath/xpath_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xpath/xpath.go Godeps/_workspace/src/github.com/martini-contrib/binding/errors.go Godeps/_workspace/src/github.com/moovweb/gokogiri/mem/mem_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/help/help_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/html/fragment_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/html/node_test.go Godeps/_workspace/src/github.com/martini-contrib/render/render.go Godeps/_workspace/src/github.com/moovweb/gokogiri/help/help.go Godeps/_workspace/src/github.com/moovweb/gokogiri/mem/mem.go Godeps/_workspace/src/github.com/go-martini/martini/recovery.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/document.go Godeps/_workspace/src/github.com/moovweb/gokogiri/html/document.go Godeps/_workspace/src/github.com/moovweb/gokogiri/gokogiri.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/element.go Godeps/_workspace/src/github.com/martini-contrib/binding/errors_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/util/util_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/fragment.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/attribute_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/css/css_test.go Godeps/_workspace/src/github.com/oxtoacart/bpool/bytepool.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/fragment_test.go Godeps/_workspace/src/github.com/martini-contrib/binding/errorhandler_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/utils_test.go Godeps/_workspace/src/github.com/oxtoacart/bpool/bpool.go Godeps/_workspace/src/github.com/moovweb/gokogiri/util/util.go Godeps/_workspace/src/github.com/moovweb/gokogiri/html/utils_test.go Godeps/_workspace/src/github.com/go-martini/martini/response_writer.go Godeps/_workspace/src/github.com/moovweb/gokogiri/css/css.go Godeps/_workspace/src/github.com/go-martini/martini/env.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/search_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/gokogiri_test.go Godeps/_workspace/src/github.com/go-martini/martini/static_test.go Godeps/_workspace/src/github.com/codegangsta/inject/inject.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xpath/expression.go Godeps/_workspace/src/github.com/martini-contrib/binding/form_test.go Godeps/_workspace/src/github.com/go-martini/martini/static.go Godeps/_workspace/src/github.com/go-martini/martini/martini.go Godeps/_workspace/src/github.com/moovweb/gokogiri/html/fragment.go Godeps/_workspace/src/github.com/martini-contrib/binding/bind_test.go app.go Godeps/_workspace/src/github.com/martini-contrib/render/render_test.go Godeps/_workspace/src/github.com/martini-contrib/binding/binding.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/cdata.go Godeps/_workspace/src/github.com/go-martini/martini/martini_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/node_test.go Godeps/_workspace/src/github.com/oxtoacart/bpool/bufferpool.go Godeps/_workspace/src/github.com/martini-contrib/binding/json_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xpath/util_test.go Godeps/_workspace/src/github.com/go-martini/martini/router.go Godeps/_workspace/src/github.com/martini-contrib/binding/common_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/pi.go Godeps/_workspace/src/github.com/go-martini/martini/logger_test.go Godeps/_workspace/src/github.com/go-martini/martini/recovery_test.go Godeps/_workspace/src/github.com/go-martini/martini/return_handler.go Godeps/_workspace/src/github.com/moovweb/gokogiri/help/util_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/html/document_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/html/crash_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/comment.go Godeps/_workspace/src/github.com/martini-contrib/binding/multipart_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/xml/node.go Godeps/_workspace/src/github.com/go-martini/martini/env_test.go Godeps/_workspace/src/github.com/moovweb/gokogiri/html/encoding_test.go)

2015/05/27 12:11:24 go-app-builder: Failed parsing input: package github.com/moovweb/gokogiri/html required, but all its files were excluded by nobuild_files

      

What should I do?

By the way, it looks like https://blog.golang.org/the-app-engine-sdk-and-workspaces-gopath , but I couldn't find an answer.

UPD: I added a test file, check it out https://github.com/bezigon/testcase

+3


source to share


1 answer


The following link has an answer

https://groups.google.com/d/msg/google-appengine-go/mGuMV4tVR0U/A3qaCau7zY4J



In short, the reason is that

"cgo" is not supported on classic App Engine. If you want to build your application, you will need to use Go on Managed VMs ("vm: true" in your app.yaml). See https://cloud.google.com/appengine/docs/go/managed-vms/ for details .

+1


source







All Articles