-
Notifications
You must be signed in to change notification settings - Fork 94
Support rules_apple 3.x.x #773
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
Conversation
jerrymarino
commented
Sep 29, 2023
- update rules_ios to use rules_apple 3.x.x
- Adding support for rules_apple version 3. I have added a simple starlark split transition to pass existing tests that failed in the original update.
- Add explict rules_apple API wrapper. Eventually all uses and hacks to make rules_apple work can flow through here.
- Add CI job for rules_apple 2 - ( default is now 3 )
4081e23 to
8558602
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I paused mid review as I wanted to clarify one thing first. What is the problem we're solving by adding all this additional handling for old versions? What is preventing us from simply moving on to Bazel 6 + rules_apple 3.x at HEAD?
I assume the intent is to support older versions for a longer period of time in case someone needs it. Why not do what other rule sets are doing then and (1) define the latest versions as "minimum" or "current" and (2) agree on a process to update older releases of rules_ios with critical bug fixes if necessary?
Not against the backwards-compatibility changes but wanted to understand if we absolutely need it to be implemented this way or not? Have you considered alternatives like mentioned above?
Maintaining two Bazel versions and two rules_apple versions at HEAD will increase maintenance cost for all of us and from a readability perspective there's def some overhead being added here for maintainers to have to understand what the split is doing exactly and why they can't just use known provider names in favor of the new_{SomeProvider} pattern.
cc @jszumski @luispadron you have more context than us on this. Does the above makes sense? Are we missing alternative approaches here and have we considered pros & cons of each?
c32f697 to
69e63f0
Compare
69e63f0 to
9b0fe3f
Compare
|
@thiagohmcruz I've pushed the latest updates based on what we discussed offline. For now, we've determined to continue to support the older versions on HEAD and will have to re-evaluate at a later day |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments, I still don't understand why we gate the rules_apple version based on the Bazel version.
.github/workflows/tests.yml
Outdated
| path: bazel-testlogs | ||
|
|
||
| lts_ios_integration_tests: | ||
| bazel_lts_ios_integration_tests: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO the name here is confusing, if it's going to change in this PR could we add bazel5 to the name instead of LTS.
LTS applies to multiple bazel versions including 6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm open to suggestions - what do you think a better name for it would be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think adding bazel5 like i said would make it clear this specifically is a bazel5 job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on being more explicit on the naming here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok sounds good to me - this is a good improvement in the github UI
| - uses: actions/checkout@v3 | ||
| - name: Preflight Env | ||
| run: .github/workflows/preflight_env.sh | ||
| run: .github/workflows/preflight_env.sh --no-bzlmod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bzlmod support was merged with 6.1.2, why should this be disabled here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please find in in the proceeding comment that it uses 6.1.2 and rules_apple 2 - where bzlmod is hardcoded to use 3.0.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha so it doesnt work yet with rules_apple 3. I guess I got confused because we're essentially using Bazel 6.1.2 to mean rules_apple 2.
Not for this PR, but in the future I wonder if specifying these Bazel version + rules_apple versions wouldn't be better in a specific WORKSPACE for that specific test. Some repos do this with their integration tests and it allows them to test the different bazel version / rule versions they support without setting one version/feature for all their tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I'd still explicitly say in that comment why that implies --no-bzlmod is needed. The same way it's confusing during review it will be once we're changing this in the future.
Saw what @luispadron is talking about in other repos too and also like the idea. Wondering if we should create "Feature Request" templates for issues in rules_ios to track things like this 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it basically exists because people aren't using bzlmod on 5 and 6 so it's good to have some coverage of both ways to test this. Though, we could bump to a later version but needs more consideration.
Also, the way it's configured now get's us a larger matrix of bzlmod vs non bzlmod across a few versions. Though bzlmod support works on all the versions in the repo 5.4.1, 6.x.x we'd still like like the coverage to we don't break it - but probably not testing 100% of permutations
luispadron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we keep using the release versions, same for rules_swift.
luispadron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, I'm confused why rules_apple version 2 is used in any of these checks. Don't we just need to check is this rules_apple 3? and use the appropriate provider methods?
We agreed to support 2.x.x on HEAD offline as a team as it's what we use in some key use case |
rules_ios/.github/workflows/tests.yml Line 15 in 9b0fe3f
I wasn't part of that specific discussion but my understanding is ya'll agreed on not dropping Bazel 5 tests from the repository. This seems to add another CI requirement that rules_apple 2 is also supported with this specific Bazel 6.1.x configuration. |
9b0fe3f to
dcc51f6
Compare
Yes, it does have to to support rules_apple 2 is because we will use this version and have to support it for us. We can move the bazel version forward from 6.1.2 but will require more followups to the testing infra and it doesn't impact anything beyond our testing infra. |
dcc51f6 to
ced7520
Compare
c875233 to
df24c71
Compare
1. update rules_ios to use rules_apple 3.x.x 2. Adding support for rules_apple version 3. I have added a simple starlark split transition to pass existing tests that failed in the original update. 3. Add explict rules_apple API wrapper. Eventually all uses and hacks to make rules_apple work can flow through here. 4. Add CI job for rules_apple 2 - ( default is now 3 )
…nternal targets.
df24c71 to
71f5031
Compare
71f5031 to
2abd5bc
Compare
2abd5bc to
7efdb03
Compare
|
I'm not sure this was fully baked, I still see a bunch of linker warnings in the log: |
|
@jszumski thanks for raising it! It's possible that we might need to tackle some followups or other improvements to it in general - I'm happy to review a PR to tackle it. We did this in a way that you can still use rules_apple 2.x.x and may have smaller incremental improvements to 3.x.x. now that this landed 🚀 |
|
Also perhaps starlark validation of versions may be useful here outside of linker errors in general |
|
Somewhat false alarm, that warning has been present in |