如何使用Google App Engine进行出售工作? [英] How do I make vendoring work with Google App Engine?

查看:126
本文介绍了如何使用Google App Engine进行出售工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图向现有的App Engine项目介绍Go vendoring(将依赖项存储在名为 vendor 的文件夹中)。我已经将所有依赖关系存储在供应商文件夹中(使用Godep作为帮助),它看起来正确,但是在本地运行应用程序时出现以下错误:

go-app-builder:解析输入失败:软件包golang.org/x/net/context从多个位置导入:/Users/erik/go/src/github.com/xyz/abc/vendor /golang.org/x/net/context和/Users/erik/go/src/golang.org/x/net/context



我相信这两个位置应该解析到相同的位置,因为Go应用程序应首先在供应商文件夹中查找。有没有办法让Appengine明白两个依赖关系是相同的?解决方案

我设法使用govendor来解决这个错误,而不是Godeps。根本原因似乎是Godeps没有正确解决自己的售货引用的售价引用。



Su-Au Hwang提供的答案也是正确的 - 您必须将app.yaml与源代码分开。


I am trying to introduce Go vendoring (storing dependencies in a folder called vendor) to an existing App Engine project. I have stored all dependencies in the vendor folder (using Godep as a helper) and it looks right, but running the application locally I get the following error:

go-app-builder: Failed parsing input: package "golang.org/x/net/context" is imported from multiple locations: "/Users/erik/go/src/github.com/xyz/abc/vendor/golang.org/x/net/context" and "/Users/erik/go/src/golang.org/x/net/context"

I believe the two locations should resolve to the same location, as Go applications should look in the vendor folder first. Is there a way to make Appengine understand that both dependencies are the same?

解决方案

I managed to resolve this error using govendor instead of Godeps. The root cause appears to have been that vendored references with their own vendored references was not resolved correctly by Godeps.

The answer provided by Su-Au Hwang is also correct - you do have to keep app.yaml separate from your source.

这篇关于如何使用Google App Engine进行出售工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆