bazelbuild / rules_apple

Bazel rules to build apps for Apple platforms.
Apache License 2.0
515 stars 271 forks source link

Breakage with Bazel 8.0.0rc3 #2604

Open meteorcloudy opened 1 week ago

meteorcloudy commented 1 week ago

https://buildkite.com/bazel/bcr-bazel-compatibility-test/builds/56#01934ecf-1a69-41b9-a071-448b7cede248

(14:09:46) ERROR: Traceback (most recent call last):
    File "/private/var/tmp/_bazel_buildkite/9b98967bff338192b3559015e74bba67/external/rules_apple+/apple/internal/macos_rules.bzl", line 2386, column 42, in <toplevel>
        providers = [apple_common.AppleExecutableBinary],
Error: 'struct' value has no field or method 'AppleExecutableBinary'
Available attributes: Objc, XcodeProperties, XcodeVersionConfig, apple_host_system_env, apple_platform, apple_toolchain, compilation_support, dotted_version, get_apple_config, get_cpu, get_split_build_configs, get_split_prerequisites, new_objc_provider, platform, platform_type, target_apple_env
(14:09:46) ERROR: Skipping '@rules_apple//examples/macos/CommandLine:ExamplesBuildTest': error loading package '@@rules_apple+//examples/macos/CommandLine': at /private/var/tmp/_bazel_buildkite/9b98967bff338192b3559015e74bba67/external/rules_apple+/apple/macos.bzl:23:5: initialization of module 'apple/internal/macos_rules.bzl' failed
(14:09:46) ERROR: error loading package '@@rules_apple+//examples/macos/CommandLine': at /private/var/tmp/_bazel_buildkite/9b98967bff338192b3559015e74bba67/external/rules_apple+/apple/macos.bzl:23:5: initialization of module 'apple/internal/macos_rules.bzl' failed
(14:09:46) INFO: Elapsed time: 4.618s

Relevant change: https://github.com/bazelbuild/bazel/pull/24273

meteorcloudy commented 1 week ago

/cc @pzembrod

meteorcloudy commented 1 week ago

@pzembrod pointed out the fix is https://github.com/bazelbuild/rules_apple/commit/46535afcec837dcdaf216a3e94dff72e1f14c7a7, but probably need bazel_features to make it also work with Bazel 7

pzembrod commented 1 week ago

Commit 2f3f608 will also be needed; it is this one that needs Bazel 8.