Where does bazel store fetched packages?

Viewed 41

In my WORKSPACE file I have defined a http_archive like

http_archive(
    name = "awscli_zip",
    urls = [
        "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-{version}.zip".format(version = awscli_version)
    ],
    sha256 = awscli_sha256,
    build_file = "//third_party:BUILD.awscli",
)

When I am now running bazel clean && bazel fetch @awscli_zip//... it fetches 1 package as seen here:

INFO: All external dependencies fetched successfully.
Loading: 1 packages loaded

When I am looking into the directory where the WORKSPACE file is located, usually bazel provides multiple bazel-* files where I can inspect the last build/test. I would assume that bazel also stores fetched packages there. Unfortunately no such directories are created.

So where exactly does bazel store fetched packages if not in the bazel output directories?

1 Answers

See $(bazel info output_base)/external.

(The "convenience symlinks", as the bazel-* symlinks in the workspace root as are known, are only created on build or test commands.)

Related