Closed ra1028 closed 1 year ago
I wasn't able to quickly reproduce this. I'll keep trying. A reproduction project would help.
The bazel version might be at play. There are some label string changes we are doing now. Can you upgrade to Bazel 6.0 and try again? Also, are you using bzlmod?
I reproduced it with that old Bazel version. We don't technically support the rolling releases between LTS releases, but I'll see if I can fix this regardless.
Looks like it's broken in Bazel 5 as well. Fix incoming.
Thanks!
@brentleyjones
I noticed that target focusing in rules_xcodeproj 1.3.3 behaves differently than in 1.3.0.
My usage of target focusing is to filter out targets other than ios_framework
in Xcode. It's a workaround to get SwiftUI previews working as described here.
With 1.3.0, if Xcode contained only ios_framework, the corresponding files were listed in the Compile Sources
of the corresponding Xcode target, but in 1.3.3, only _CompileStub_.m
appears, and Xcode doesn't show source files in the file tree anymore.
Interesting, can you open up a new issue, ideally with a small repro? I'll get this fixed.
I believe this commit might be the break: https://github.com/MobileNativeFoundation/rules_xcodeproj/commit/ed31d6916858f3099ba1a95750f5309913370a8d
That change is wrong because we want to merge unfocused targets.
I believe we have logic as well to focus targets that we merge, which goes along with this.
cc: @mattrobmattrob
I believe this commit might be the break: https://github.com/MobileNativeFoundation/rules_xcodeproj/commit/ed31d6916858f3099ba1a95750f5309913370a8d
Feel free to revert, @brentleyjones. I'm away from the computer for a couple of days.
I will. And when you get back feel free to put another change in that does what you intended while still accounting for this case :+1:.
@ra1028 Can you confirm that https://github.com/MobileNativeFoundation/rules_xcodeproj/pull/1923 fixes this for you?
@brentleyjones Thanks. I'll check it later on. Would you still like me to open up a new issue for it?
No, that's fine.
What happened?
This error was introduced after version 1.3.1 and doesn't occur in 1.3.0. All targets specified in the
focused_targets
are certainly transitive dependencies of the targets listed intop_level_targets
, but project generation fails with the following error.Reproduction steps
top_level_targets
.focused_targets
.Expected behavior
Successfully generate a focused project.
rules_xcodeproj version
1.3.2 or 1.3.1
Bazel version
6.0.0-pre.20220804.3
rules_apple version
d04edf4136b4818662d7126582ec257aee372339
rules_swift version
6153a848f747e90248a8673869c49631f1323ff3
Additional information
No response