Add apple_support 0.11.0#63
Conversation
2b855f9 to
d8b97c4
Compare
To be clear, even if the MODULE.bazel is upstreamed, we still need to check it into the BCR, because this will allow us to do dependency resolution without downloading and unpacking the whole source archive. |
d8b97c4 to
c545a90
Compare
c545a90 to
79a7e6c
Compare
aaaa671 to
c1e663d
Compare
dc3ef7d to
3f484ba
Compare
| - '@apple_support//lib/...' | ||
|
|
||
| bcr_test_module: | ||
| module_path: "test" |
There was a problem hiding this comment.
still surprised by this, and I assume this would break things in more complex repos wiht inter dependencies on absolute labels outside of the tests directory? 🤔
There was a problem hiding this comment.
You are right, this isn't working correctly right now. Because the "test" directory needs to have a WORKSPACE file and work as a separate Bazel project which depends on the target module. I replied more here: bazelbuild/apple_support#100 (comment)
| run_test_module: | ||
| name: "Run test module" | ||
| platform: ${{ platform }} | ||
| build_targets: |
There was a problem hiding this comment.
should this not be test_targets or something? maybe one of the other identifiers is magic instead?
There was a problem hiding this comment.
Good catch. I copy/pasted from protobuf, so I assume that's a bug?
There was a problem hiding this comment.
Oh, the protobuf examples directory doesn't contain any tests, just build targets, which is also useful to verify if protobuf works correctly. That's why we have build_targets here.
There was a problem hiding this comment.
I changed it to test_targets for us.
There was a problem hiding this comment.
See bazelbuild/apple_support#100 (comment), without a WORKSPACE under test directory, you're actually running the tests from main module instead of a test module.
d7896aa to
558cf01
Compare
558cf01 to
509edf7
Compare
|
To fix the test failure, you'll have to also fix here: https://github.com/bazelbuild/apple_support/blob/master/lib/apple_support.bzl#L163 |
|
/cc @Wyverald IIUC, |
|
Yes -- even without bzlmod, a repo-relative label there should work. In fact I believe it doesn't even need to be a Label(...) call; a bare string "//tools:xcode_path_wrapper" would work. |
This would be very useful to know with certainty: Does |
Yes, so |
Label strings passed to the `default` argument of `attr.label()` are resolved to a `Label` immediately relative to the call site of `attr.label()`, so wrapping the argument with `Label(...)` is entirely redundant. More context at: bazelbuild/bazel-central-registry#63 (comment)
377b1ae to
edf5cff
Compare
| index bd7c50b..33c9cbb 100644 | ||
| --- a/lib/apple_support.bzl | ||
| +++ b/lib/apple_support.bzl | ||
| @@ -160,7 +160,7 @@ def _action_required_attrs(): |
There was a problem hiding this comment.
Can you remove def _action_required_attrs():?
aba3e62 to
d21a8bb
Compare
d21a8bb to
fbab00b
Compare
| """Definition of a test rule to test apple_support.""" | ||
|
|
||
| load( | ||
| - "@build_bazel_apple_support//lib:apple_support.bzl", |
There was a problem hiding this comment.
The whole patch file will be upstreamed, right?
This is my first PR to this project and I'm still trying to get my head around all the tooling, so feedback is welcome.
This PR specifically adds
apple_supportfor the release0.11.0. I'm also about to open a PR to the same repo which adds aMODULE.bazelso that future releases won't need to have the same file checked-in into the registry.