以下のようなエラーがでる。
ERROR: (gcloud.app.deploy) Error Response: [9] Deployment contains files that cannot be compiled: Compile failed:
2017/12/05 23:43:37 go-app-builder: Failed parsing input: package "github.com/Michael-Inc/carapp-server/vendor/google.golang.org/appengine/file" cannot import internal package "google.golang.org/appengine/internal"
src/cmd/go-app-builder/parser.go で以下のように import を処理している。
for path := range imports {
pkg, ok := app.PackageIndex[path]
if !ok {
// A file declared an import we don't know.
// It could be a package from the standard library.
if findInternal(path) {
return nil, fmt.Errorf("package %q cannot import internal package %q", p.ImportPath, path)
}
continue
}
p.Dependencies = append(p.Dependencies, pkg)
}
findInternal
は以下のとおり。
func findInternal(path string) bool {
return strings.HasSuffix(path, "/internal") ||
strings.HasPrefix(path, "internal/") ||
strings.Contains(path, "/internal/") ||
path == "internal"
}
internal
という名前だとエラーにされてしまう。
まだ解決されていない模様 https://issuetracker.google.com/issues/38449183