rules_apple transitions #1811
-
Hi, I expect that in an ideal world, if the cache has been populated for libraries, building applications should make use of the cache artifacts(libraries) and if cache is populated for application targets, then building libraries should make use of the cache artifacts as well.(as apps depend on libraries, so if they all share the same transition, this should be possible). A.)
B.)
C.) again
Notice now we get two configured targets for the same cquery. Any idea what might be going on here?
one has an empty apple_split_cpu but the other has |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes your assumption that this is all due to transition differences is the case. And with the path bazel is currently going, it will always be the case for this type of library target. I think the reason this is surprising is because with *: As we've migrated more and more things out of bazel itself, the And with I think this is a weird quirk in bazel's rule designs, especially when you "know" that one specific library can only ever be built for 1 configuration. I imagine we could provide some abstractions here, like I think your best short term option is to treat libraries like implementation details, tag them with You could attempt to mirror the transition from rules_apple and bazel and have your own |
Beta Was this translation helpful? Give feedback.
Yes your assumption that this is all due to transition differences is the case. And with the path bazel is currently going, it will always be the case for this type of library target.
I think the reason this is surprising is because with
objc_library
you might(*) be able get them to use the same config, until the transition is removed from that as well bazelbuild/bazel#16870*: As we've migrated more and more things out of bazel itself, the
objc_library
transition implementation is here while rules_apple rules use this one, so technically those can drift between your rules version and bazel version, resulting in the same issue. This wasn't the case until some of the apple logic moved out …