MobileNativeFoundation / rules_xcodeproj

Bazel rules for generating Xcode projects.
MIT License
502 stars 76 forks source link

Add xcschemes.autogeneration_config #3027

Closed thiagohmcruz closed 1 month ago

thiagohmcruz commented 1 month ago

Resolves #3013

The proposal is to introduce a xcschemes.autogeneration_config macro to allow consumers to configure scheme auto-generation. I'm addressing my particular use case of wanting to exclude certain schemes based on patterns in their names but I'm open to discuss other configurations/exclusion patterns folks might want to add here.

In order to test this note how running (from examples/integration) bazel run //:xcodeproj-incremental-bazel-sim_arm64 generates a project that does not contain the undesired schemes UndesiredScheme_Swift and UnwantedScheme_Swift even though the respective targets do exist.

thiagohmcruz commented 1 month ago

This looks useful, thanks! What other configuration options do you see in the future?

@luispadron I think other exclude_patterns could be useful but maybe we should add more as the need arises? We could exclude based on other scheme attributes too.

Besides that, scheme auto-generation might need other customizations in the future not related to exclusion patterns and for that we can add more attributes the macro. But again, instead of over engineering it now I'd rather improve this API as the need arises from consumers. Thoughts?

thiagohmcruz commented 1 month ago

Trying to understand this CI failure. Have you ever seen this?

cannot load '@@bazel_skylib~//lib:modules.bzl': no such file

cc @brentleyjones

brentleyjones commented 1 month ago

Looks like some issue with Bazel HEAD, which we will need to fix outside of this PR.