-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: platform_transition_filegroup #55
Conversation
@@ -96,7 +90,37 @@ bzl_library( | |||
|
|||
bzl_library( | |||
name = "diff_test", | |||
srcs = ["diff_test.bzl"], | |||
srcs = ["diff_test.bzl"], # keep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this comment for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without it, running Gazelle in this repo removes the file.
Gazelle seems to have some (new?) heuristics for avoiding "test code" being included, so files ending with "_test.bzl" are a problem. I had to totally revert the changes Gazelle makes to the lib/private/BUILD.bazel file where it removes a bunch...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM structurally, but not familiar with transitions so maybe @gregmagolan should also review.
I'll try this at rh for my use case today |
Hmm. rules_docker transition outputs multiple platforms: https://github.com/bazelbuild/rules_docker/blob/master/container/image.bzl#L787
|
Should this support multiple platforms with |
I guess it could support a list of |
I'm sure either. Wonder why the rules_docker transition returns multiple |
Sorted it out for the rules_docker transition use case. This won't be useful there as the transition of just the target_platform is insufficient so I'll need to land a similar rule in rules_docker that uses the transitions there which transitions the target_platform and a few other settings:
|
Lifted from https://github.com/aspect-build/gcc-toolchain/pull/8/files
See also https://github.com/fmeum/rules_meta/blob/main/meta/internal/meta.bzl#L4