Bazel查询以列出目标的所有依赖关系以及依赖项的版本
寻找一种方法,以获取目标依赖项的所有外部依赖项列表(在构建文件中定义)。
bazel Query“ Kind(规则,deps(// foo:target))” - 输出=软件包
仅返回依赖项列表。
有没有办法记录依赖关系:构建过程中的版本?
looking for a way to get list of all external dependencies along with the version (defined in build file) of the dependencies for the target.
bazel query "kind(rule, deps(//foo:target))" --output=package
only returns list of dependencies.
is there a way to log dependency:version during the build?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能取决于您正在使用的Bazel Python规则的版本,但是我们使用类似的查询,因此以获取具有其名称和版本的格式的
deps
。 :本质上是文件名和软件包。有一点狂欢,我基本上可以得到您
产生看起来像的输出的东西
This might depend on the version of the bazel python rules you're using, but we use a query like so just to get deps in the format that have their name and version
This produces output that contains lines like
The bit after the
:
is essentially the filename and the package. With a bit of bash I can get basically what you're afterWhich produces output that looks like