-
Notifications
You must be signed in to change notification settings - Fork 86
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
Bug: duplicate targets in project when a rules_ios apple_framework depends on a package from rules_swift_package_manager #3086
Comments
cc @luispadron wondering if Cash hit anything similar while working on SPM stuff? |
We haven't gotten that far into testing SPM + rules_ios yet. I'm out this week but can help look more next. Just to confirm, we can repro this with rules_iOS and rules_spm (not using the fork y'all have)? |
Correct, we can repro using the setup Jonathan shared above using the examples in the repo and the upstream rules. |
cc @brentleyjones I'd appreciate any insight here 🙇 |
I can repro the same issue when a
Still ramping up on the codebase, but that's what I've figured out so far. |
This seems like a rules_ios bug then? The new On the rules_xcodeproj side I think we can solve this by making sure that if a dep is handled upstream, that we don't deal with it again for merging. I believe it used to do this, so something about generating and handling the |
Thanks for taking a look at this.
Very possibly a
It is in
By "handled upstream", do you mean included in the project as a target? I'll dig into why the |
I mean that |
Ah, rules_xcodeproj does actually consider I don't have full context on why |
Hmm, seems like we shouldn't with the new merging logic. |
Shouldn't remove it, or shouldn't consider |
Shouldn’t consider it. |
I think this might be related to #3094 which i just opened (forget about this one). I added a reproducible example in that issue though |
Description
I'm trying to migrate a project to depend on external swift dependencies via
rules_swift_package_manager
. When arules_ios
apple_framework
depends on a target generated byrules_swift_package_manager
, it appears that the target merging logic fails to unify theapple_framework
's underlying bazel targets.Reproduction steps
I have a reproducer using the rules_ios example in this branch: https://github.com/jschear/rules_xcodeproj/tree/js/rules_swift_package_manager_rules_ios_example
cd examples/rules_ios
andbazel run //:xcodeproj-incremental
MixedAnswer
is present as both a library and static framework, andMixedAnswer_objc
is present as a library.Expected behavior
MixedAnswer
is only present as a static framework (which happens onmain
)rules_xcodeproj version
44b6f04
Xcode version
15.4
Bazel version
7.1.1
rules_apple version
3.2.1
rules_swift version
1.16.0
Additional information
No response
The text was updated successfully, but these errors were encountered: