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

时间:2017-10-20 08:41:07

标签: google-app-engine go gcloud

我正在从包含更多项目的GOPATH部署Google App Engine应用程序。出于某种原因,正在编译一个未从我上传的应用程序引用的销售库(github.com/mattn/go-sqlite3),并且失败。

有没有办法从gcloud中排除代码树中不必要的部分?我在gcloud的文档中找不到关于如何做到这一点的任何内容。

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

这似乎最近发生了变化,我没有更改我的应用程序以要求此库,我正在开发一个不会更改任何其他代码的分支。我能想到的唯一另一件事就是我go get google.golang.org/appengine,因为如果出售该图书馆不起作用。但是,我在源代码树中找不到对sqlite3的引用。

$ 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 个答案:

答案 0 :(得分:1)

尝试将skip_files:部分的文件夹添加到app.yaml

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