bazel-lib icon indicating copy to clipboard operation
bazel-lib copied to clipboard

refactor: Minor compatibility fixes

Open EdSchouten opened this issue 10 months ago • 1 comments

I am writing an experimental analysis tool that is capable of parsing BUILD/.bzl files. In the process I ran into some minor issues processing some of the code in bazel-lib. In many cases I obviously fixed up my tool, but I was left with some breakages where I think it makes sense to alter bazel-lib instead, because the Bazel documentation indicates that the feature at hand is deprecated. Merging such changes prevent potential breakages in the future.

EdSchouten avatar Feb 05 '25 10:02 EdSchouten

Friendly ping!

EdSchouten avatar Feb 23 '25 19:02 EdSchouten

Hm, we still support Bazel 6 in bazel-lib 2.x, and CI failure there is

ERROR: /home/runner/work/bazel-lib/bazel-lib/e2e/smoke/BUILD.bazel:97:10: While resolving toolchains for target //:bats: invalid registered toolchain '@bsd_tar_toolchains//:darwin_amd64_toolchain': error loading package '@bsd_tar_toolchains//': at /home/runner/.cache/bazel/_bazel_runner/68984a6c613740a8d824f7719855966f/external/platforms/host/constraints.bzl:1:6: Unable to find package for @host_platform//:constraints.bzl: The repository '@host_platform' could not be resolved: Repository '@host_platform' is not defined.

Maybe we still need @local_config_platform? Perhaps it can be conditional based on something in @bazel_features

alexeagle avatar Mar 04 '25 01:03 alexeagle

@EdSchouten we're playing with https://github.com/google/triage-party today. It says I should ask you to merge - even though I should probably do the work myself :)

alexeagle avatar Apr 11 '25 18:04 alexeagle

Alternatively I'm considering a 3.0 of bazel-lib (including the module rename from aspect_bazel_lib) so maybe we drop Bazel 6 support

alexeagle avatar May 26 '25 22:05 alexeagle