英文:
Does govendor automatically include transitive dependencies?
问题
假设我通过 govendor add
或 govendor fetch
添加了一个新的依赖项 X。这个依赖项 X 还依赖于 Y。
govendor 会自动拉取这些依赖项吗?还是我需要执行 govendor add Y
。
这个行为在 add
和 fetch
之间有区别吗?
我在这里的任何文档中都找不到相关讨论:https://github.com/kardianos/govendor
或者通过运行 govendor add --help
也找不到相关信息。
英文:
Let's say I add a new dependency X through govendor add
or govendor fetch
. This dependency X has a dependency on Y.
Will govendor automatically pull in those dependencies as well? Or will I have to do govendor add Y
.
Does the behavior differ betweeen add
and fetch
?
I couldn't find this discussed on any of the documentation here: https://github.com/kardianos/govendor
Or by running govendor add --help
答案1
得分: 6
govendor fetch <package_name>
会自动包含传递依赖项。
govendor add <package_name>
则不会。
但是,如果你运行govendor add +external
(不带包名),它将为你的代码依赖的依赖项和传递依赖项提供供应商支持,只要它们在你的GOPATH上签出。
英文:
govendor fetch <package_name>
will automatically include transitive dependencies.
govendor add <package_name>
will not.
However if you run govendor add +external
(with no package name) it will vendor the dependencies and transitive dependencies that your code relies on, as long as they are checked out on your GOPATH.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论