使用bazel时获取陈旧的protobuf源代码

huangapple go评论78阅读模式
英文:

Getting stale protobuf source code when using bazel

问题

我是你的中文翻译助手,以下是翻译好的内容:

我对Bazel还不熟悉,正在处理一个大型项目。我注意到我的工作目录(.cache/bazel/...)中的protobuf .h文件已经过时了。
我一直在试图找出Bazel从哪里下载源代码。我可以缩小范围,当调用bazel fetch @com_github_golang_protobuf//...时,会创建external/com_google_protobuf/文件夹。
我还没有找到更多细节,也不知道该去哪里找。
非常感谢你能提供任何帮助。
这是WORKSPACE代码的一部分:

go_repository(
    name = "com_github_golang_protobuf",
    importpath = "github.com/golang/protobuf",
    sha256 = "xxxxx",
    strip_prefix = "protobuf-yyyyy",
    urls = ["INTERNAL_WEBSITE_URL"],
)
英文:

I'm new to bazel and working on a big project. I noticed that the protobuf .h files in my working directory (.cache/bazel/...) are stale.
Have been trying to find where bazel is downloading the source code. I could narrow it down that when bazel fetch @com_github_golang_protobuf//... is invoked, the folder for external/com_google_protobuf/ is created
I haven't been able to find out more details and don't know where to look.
Appreciate any help you can offer.
Here is a snippet of the WORKSPACE code:

go_repository(
    name = "com_github_golang_protobuf",
    importpath = "github.com/golang/protobuf",
    sha256 = "xxxxx",
    strip_prefix = "protobuf-yyyyy",
    urls = ["INTERNAL_WEBSITE_URL"],
)

答案1

得分: 1

获取的存储库被存储在输出基目录中。

外部依赖项都会下载到输出基目录下的external子目录中。对于本地存储库,会在那里创建一个符号链接,而不是创建一个新目录。您可以通过运行以下命令查看external目录:

ls $(bazel info output_base)/external
英文:

Fetched repositories are stored in the output base

External dependencies are all downloaded to a directory under the subdirectory external in the output base. In case of a local repository, a symlink is created there instead of creating a new directory. You can see the external directory by running

ls $(bazel info output_base)/external

huangapple
  • 本文由 发表于 2022年5月26日 04:19:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/72383725.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定