commit | 6052ad65e4185f19944e5138e9b70f6a4eaf9e76 | [log] [tgz] |
---|---|---|
author | Jordan Mele <SiliconSoldier@outlook.com.au> | Wed Aug 14 01:33:02 2024 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Wed Aug 14 01:35:28 2024 -0700 |
tree | 072e3b88dc85f712f201a6511ecb27be34c9be72 | |
parent | b03dfeb2689401e4db658c8cce79209add80d42f [diff] |
Make `get_default_canonical_id` public When `repository_ctx.download` or `repository_ctx.download_and_extract` are not given an explicit `canonical_id` the default behaviour can lead to some counterintuitive results (e.g. URL changed but old asset restored from cache due to unchanged checksum). This PR seeks to bring greater attention to `canonical_id` in these low level API (relative to `http_archive` which uses `get_default_canonical_id` by default). URLs are usually the most appropriate `canonical_id` choice, so `get_default_canonical_id` has been added to the public API and sample usage added to documentation. Related to #22652 ## TODO I need some pointers to make these happen. - [x] Add `get_default_canonical_id` to the Bazel docs (I believe there are other `load`ed API that is missing from docs in one way or another). - [x] Confirm examples render correctly in docs. Closes #22742. PiperOrigin-RevId: 662822225 Change-Id: I1617aa16a62da2d8dff2034fef8ca19aecd33d58
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
To report a security issue, please email security@bazel.build with a description of the issue, the steps you took to create the issue, affected versions, and, if known, mitigations for the issue. Our vulnerability management team will respond within 3 working days of your email. If the issue is confirmed as a vulnerability, we will open a Security Advisory. This project follows a 90 day disclosure timeline.
See CONTRIBUTING.md