dongxin1999 2017-10-20 08:41
浏览 39
已采纳

gcloud app deploy尝试编译不需要的文件,我可以排除树的一部分吗?

I am deploying a Google App Engine app from a GOPATH that contains more projects. For some reason, a vendored library (github.com/mattn/go-sqlite3) that is not referenced from the application that I am uploading is being compiled, and fails.

Is there a way to exclude the unnecessary parts of the code tree from gcloud? I can't find anything in the documentation for gcloud on how to do that.

Updating service [default]...
.......failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Deployment contains files that cannot be compiled: Compile failed:
2017/10/20 01:30:38 go-app-builder: build timing: 12×compile (2.234s total), 0×link (0s total)
2017/10/20 01:30:38 go-app-builder: failed running compile: exit status 2

github.com/mattn/go-sqlite3/sqlite3_go18.go:18: undefined: SQLiteConn
github.com/mattn/go-sqlite3/sqlite3_go18.go:26: undefined: SQLiteConn
github.com/mattn/go-sqlite3/sqlite3_go18.go:27: undefined: namedValue
github.com/mattn/go-sqlite3/sqlite3_go18.go:29: undefined: namedValue
github.com/mattn/go-sqlite3/sqlite3_go18.go:35: undefined: SQLiteConn
github.com/mattn/go-sqlite3/sqlite3_go18.go:36: undefined: namedValue
github.com/mattn/go-sqlite3/sqlite3_go18.go:44: undefined: SQLiteConn
github.com/mattn/go-sqlite3/sqlite3_go18.go:49: undefined: SQLiteConn
github.com/mattn/go-sqlite3/sqlite3_go18.go:54: undefined: SQLiteStmt
github.com/mattn/go-sqlite3/sqlite3_go18.go:63: undefined: SQLiteStmt
github.com/mattn/go-sqlite3/sqlite3_go18.go:36: too many errors

This seems to have changed recently, I haven't changed my app to require this library, and I am working on a branch that does not change any other code. The only other thing I can think of is that I do go get google.golang.org/appengine since that library doesn't work if vendored. I can't find any references to sqlite3 in its source tree either, however.

$ gcloud --version
Google Cloud SDK 175.0.0
alpha 2017.10.09
app-engine-go 
app-engine-python 1.9.61
beta 2017.10.09
bq 2.0.27
cloud-datastore-emulator 1.2.1
core 2017.10.09
gsutil 4.27
  • 写回答

1条回答 默认 最新

  • doww38701 2017-10-20 08:51
    关注

    Try to add the folder to skip_files: section into app.yaml

    https://cloud.google.com/appengine/docs/standard/go/config/appref

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题