英文:
Why does bazel require me to add dependencies of the library my project is dependent on for Go?
问题
我正在使用 echo 框架进行工作。因此,我的项目直接依赖于 github.com/labstack/echo/v4
。因此,我已将其添加到我的 go.mod
和 WORKSPACE
文件中。然而,bazel构建失败,只有在我添加以下两个依赖项时才能正常工作。
github.com/labstack/gommon<br>
github.com/valyala/fasttemplate
为什么需要这样做,是否有其他方法可以解决这个问题?
英文:
I am working with the echo framework. Hence, my project is directly dependent on github.com/labstack/echo/v4
. Accordingly, I have added it to my go.mod
and WORKSPACE
file. However, bazel build fails and only works if I add the following 2 dependencies.
github.com/labstack/gommon<br>
github.com/valyala/fasttemplate
Why is this required, and is there any way around it?
答案1
得分: 1
这些模块是必需的,因为它们是 echo 模块的依赖项,所以在构建代码时需要它们。请参考 echo 的 go.mod 文件 中列出的依赖项:
[...]
github.com/labstack/gommon v0.3.0
github.com/valyala/fasttemplate v1.2.1
[...]
英文:
These modules are required because they are dependencies of the echo module and therefore required to build the code. See the dependencies listed in echo's go.mod file:
[...]
github.com/labstack/gommon v0.3.0
github.com/valyala/fasttemplate v1.2.1
[...]
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论