rules_xcodeproj
rules_xcodeproj copied to clipboard
Add Generated Files with Package
Related issue: https://github.com/MobileNativeFoundation/rules_xcodeproj/issues/3037
Colocates generated files with its owning package in the Xcode project. Finding and inspecting a module's generated files can be quite difficult today with only the top-level Bazel Generated Files
group when working on a specific library or module.
Some initial questions I have from this v1 implementation:
- Is
--
a fine delimiter for passing along theowner
package for eachFile
? - I'd like to reuse the existing create group callables but noticed we use a stable ID for the special top-level groups. Any weird side effects I might be missing by generating IDs similar to other groups for nested generated files (keeping the same stable ID for the top level special groups)
- One potential edge case is if an owner's group doesn't exist in the project, in theory this will still create the owning group even if there are no source files in the generated project. I imagine this is probably more of an issue with focused projects? I may need to add some sort of preprocessor or filtering to do this check.
- It looks like external repos don't have an
owner
. I think this would still be a helpful feature, we'd just associate any generated files based on the path with the first directory underexternal
if that seems reasonable?
Testing from Integration example