KKaylee LubickMake Bazel boilerplate presubmit platform dependent
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Make Bazel boilerplate presubmit platform dependent This also adds the boilerplate to a few files using a bespoke script. Change-Id: Ie65d2490ada73e08ae64d1757cc90a8c8eaa9e74 No-Try: true Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1000396 Reviewed-by: Michael Ludwig <michaelludwig@google.com> | 1 年前 | |
Make MODULE.bazel.lock updates easier for autorollers Everytime we updated deps.bzl, the MODULE.bazel.lock file needed to have a proprietary checksum re-calculated (via bazel mod tidy). This is problematic for autorollers, which strive to use find/replace (e.g. old revision with new revision) because that can be achieved w/o needing a full checkout (and are thus faster). I tried a few things to remove the checksum entirely, and eventually drew inspiration from how rules for go work [1], by returning a non-empty extension_metadata [2][3] that contains the reproducible flag. This tells Bazel "my generated rules are hermetic all by themselves" so it doesn't have to track the hash of the input files (neither cpp_modules.bzl nor deps.json). The result is simpler, as we don't have to generate hand-written Starlark code, but can instead just generate JSON data that is later parsed. Autorollers should be able to just keep doing find and replace on deps.json when updating. [1] https://github.com/bazel-contrib/bazel-gazelle/blob/4440fb7e8b6c29b7e0b69a77572bd91ed325398e/internal/bzlmod/go_deps.bzl#L336 [2] https://github.com/bazel-contrib/bazel-gazelle/blob/4440fb7e8b6c29b7e0b69a77572bd91ed325398e/internal/bzlmod/utils.bzl#L122-L137 [3] https://bazel.build/rules/lib/builtins/module_ctx#extension_metadata Change-Id: Ia36412a1d4ebec434bcf9986601d84481b1ee8aa Bug: b/418260494 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/995896 Commit-Queue: Kaylee Lubick <kjlubick@google.com> Reviewed-by: Eric Boren <borenet@google.com> | 1 年前 |