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

Add rules_ios example depending on swift_library #3093

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

luispadron
Copy link
Contributor

Adds an example to the rules_ios fixture for showcasing a target merging bug.

Reproducing the issue:

  1. cd examples/rules_ios
  2. bazel run //:xcodeproj-incremental
  3. xed rules_ios.xcodeproj
  4. Select the LibTwo_Scheme target
  5. Attempt to build the target
  6. Observe the failure:
/path/_CompileStub_.m Build input file cannot be found: '/path/_CompileStub_.m'.
Did you forget to declare this file as an output of a script phase or custom build rule which produces it?

This is happening because in the LibTwo_Scheme the target selected is LibTwo (Static Framework) when it should be LibTwo (Library) which builds fine. This only happens when swift_library is directly used as a deps of the apple_framework target. Target merging fails here and you end up with two LibTwo targets in the generated Xcode project.

Adds an example to the rules_ios fixture for showcasing a target merging bug.

Reproducing the issue:

1. `cd examples/rules_ios`
2. `bazel run //:xcodeproj-incremental`
3. `xed rules_ios.xcodeproj`
4. Select the `LibTwo_Scheme` target
5. Attempt to build the target
6. Observe the failure:

  ```
  /path/_CompileStub_.m Build input file cannot be found: '/path/_CompileStub_.m'.
  Did you forget to declare this file as an output of a script phase or custom build rule which produces it?
  ```

This is happening because in the `LibTwo_Scheme` the target selected is `LibTwo (Static Framework)` when it should be `LibTwo (Library)` which builds fine.
This only happens when `swift_library` is directly used as a `deps` of the `apple_framework` target. Target merging fails here and you end up with two `LibTwo` targets in the generated Xcode project.
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

Successfully merging this pull request may close these issues.

1 participant