Closed lamcw closed 3 months ago
@jsharpe is there any plan to drop support for Bazel 5.4.0? package_relative_label
is not supported until 6.1.0 https://github.com/bazelbuild/bazel/pull/17435
As per the LTS schedule - https://bazel.build/release we'll continue to support 5.4.1 until Jan 2025. Are you able to use bazel-contrib/bazel_features to detect support for package_relative_label and conditionally use it?
Are you able to use bazel-contrib/bazel_features to detect support for package_relative_label and conditionally use it?
bazel_features
does not support detecting package_relative_label
-- instead I am using a hasattr
guard to make sure it exists before invoking on it. Please take a look 🙏
With
--enable_bzlmod
,native.repository_name
returns the apparent repo name (e.g.@foo~
) instead of the canonical repo name. This can be a problem in therunnable_binary
macro (esp. genrule targets) asrlocationpath
may not be able to "see"srcs
that are already listed, when some other modules depend on therunnable_binary
target.Instead,
package_relative_label
should be used in therunnable_binary
macro such that Bazel correctly converts thefilegroup
label in the context of the package currently being initialized.