Getting stale protobuf source code when using bazel

Viewed 59

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 Answers

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
Related