Skip to content
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

Proposal - Move the Xcode project rules into a separate repository #756

Open
luispadron opened this issue Aug 24, 2023 · 6 comments
Open

Comments

@luispadron
Copy link
Collaborator

rules_ios currently supports two different ways for generating and building Bazel projects in Xcode.

These rules add a fair amount of complexity and their tests have been a source of confusion in several PRs. I.e. updating the fixtures, bzlmod support, requiring use of Intel/Rosetta to ensure fixtures are the same as CI.

Should we instead separate the repositories such that rules_ios contains the Apple bundling rules and rules_ios_xcodeproj contains the legacy & xchammer Xcode rules?

IMO this fixes a few issues:

  • Users who don't use rules_ios for Xcode project generation no longer need to understand or maintain these rules.
  • Maintainers/contributors to the Xcode rules now have a tested repository where they can dictate the versions used for rules_ios & it's dependencies.
  • Maintainers/contributors to rules_ios who do not use or have worked on the Xcode rules can better focus on improving the existing iOS rules.
@luispadron
Copy link
Collaborator Author

@thiagohmcruz @jerrymarino Thoughts?

@thiagohmcruz
Copy link
Contributor

I can see the benefits of splitting things up this way, one concern is how would CI work? IMO It's very useful to know right away (in a PR) that a change to the rules broke the Xcode project generator so I assume one (potentially minor?) downside is that the dependency inversion here implies that rules_ios_xcodeproj would have to manage its dependency on rules_ios SHAs and vet changes independently correct (similar to what rules_xcodeproj does today)?

Re XCHammer I added most things here when I was experimenting with it. If anything XCHammer/xcbuildkit is blocking things we should simply delete the code since (1) we were the only ones using it as an experimental thing that was not supposed to break any main flow and (2) we can always blame and bring back if anyone wants to continue the XCHammer work.

@luispadron
Copy link
Collaborator Author

luispadron commented Oct 30, 2023

I can see the benefits of splitting things up this way, one concern is how would CI work?

The goal here would be so that folks in this repo do not have to worry about it. It should be something the users of the legacy generator care about. If newer rules_iOS breaks something for legacy generator the maintainers of the legacy generator would be responsible for fixing it vs. right now that cost is on everyone.

@thiagohmcruz
Copy link
Contributor

I'm mostly thinking of users of rules_ios that are also relying on the legacy generator (we are the main consumers I think but I don't think if we're the only ones?).

If the generator breaks the cost is on everyone today because the legacy generator is part of the repo and the intent is to provide a set of rules and an Xcode generator that work together. But, I understand that the proposal here is exactly to break that dependency.

To us it would be less of a problem soon since we're migrating to rules_xcodeproj but my concern is about "legacy generator maintainers" not having CI vetting that the legacy generator continues to work until someone bumps rules_ios there or someone reports an issue (ideally we would catch these things earlier).

I'm not against the proposal, I just want us all to understand the trade-offs as maintainers and wanted to brain dump what is on my mind.

If we knew how many folks rely on it it would be a lot easier to make a call 😔. I wonder how other OSS repos solve for that without being creepy and collecting data they shouldn't 🤔 (surveys I guess?).

@luispadron
Copy link
Collaborator Author

Yeah it would be useful to understand how many users are using these rules first for sure.

@jerrymarino
Copy link
Contributor

jerrymarino commented Oct 30, 2023

The built in generator is what we currently use, ( AFAIK other folks using rules_ios ) and it does make it easier having it in tree for us. If we move off of it, it might be an argument in favor of removing it: when folks use either xchammer or rules_xcodeproj to generate projects. At the EOD these rules are pretty interchangeable to generate the pbxproj.

These rules add a fair amount of complexity and their tests have been a source of confusion in several PRs. I.e. updating the fixtures, bzlmod support, requiring use of Intel/Rosetta to ensure fixtures are the same as CI.

Is there an issue with running ./tests/xcodeproj-tests.sh --update ? We use the script quite often to bump the fixtures and have seen large adoption of rules_ios with this generator. I also wonder how we can improve the situation by moving to another repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants