rules_xcodeproj icon indicating copy to clipboard operation
rules_xcodeproj copied to clipboard

Add Generated Files with Package

Open sebastianv1 opened this issue 8 months ago • 20 comments

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 the owner package for each File?
  • 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 under external if that seems reasonable?

Testing from Integration example

Screenshot 2024-06-24 at 12 03 34 PM ration.xcodeproj

sebastianv1 avatar Jun 24 '24 16:06 sebastianv1