bazelbuild / rules_apple

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

Update needed to apple_support.run() to support corresponding change in rules_apple 1.17.1 #2557

Closed francine-blanc closed 1 week ago

francine-blanc commented 1 month ago

The _run() function in build_bazel_apple_support/lib/apple_support.bzl has been updated here in version 1.17.1 so that only keyword arguments, and not positional arguments, are acceptable.

the apple_support.run() function in build_bazel_rules_apple/apple.dtrace.bzl however still expects ctx as a positional argument, seen here.

Now with the above change, this function no longer works as intended, leading to errors such as the following:

ERROR: /example/project/subfolder/BUILD.bazel:50:50: in dtrace_compile rule //project/subfolder:some_target 
     Traceback (most recent call last):
        File "/..../external/build_bazel_rules_apple/apple/dtrace.bzl", line 50, column 26, in _dtrace_compile_impl
            apple_support.run(
        File "/..../external/build_bazel_apple_support/lib/apple_support.bzl", line 282, column 5, in _run
            def _run(
     Error: _run() does not accept positional arguments, but got 1

So, it looks like rules_apple needs to be updated to support the change in the most recent version of the apple_support repo.

xiemotongye commented 3 weeks ago

I have the same issue. Downgrade apple_support to 1.15.1 can fix is error. Looks like rules_apple needs to be updated.