MobileNativeFoundation / rules_xcodeproj

Bazel rules for generating Xcode projects.
MIT License
502 stars 76 forks source link

Bug: Only the one associated extra file for a target is added to the project #3009

Closed CognitiveDisson closed 2 months ago

CognitiveDisson commented 2 months ago

Description

If you specify multiple associated extra files with one target, only the last one will be presented in the Xcode project. Fo example:

ASSOCIATED_EXTRA_FILES = {
    "//iOSApp/Source:iOSApp": ["//iOSApp:ownership.yaml", "//iOSApp:info.yaml"],
}

The Xcode project will contain info.yaml, but it won't include ownership.yaml.

Reproduction steps

You can reproduce this on example project.

  1. Create the examples/integration/iOSApp/ownership.yaml file.
  2. Export it in examples/integration/iOSApp/BUILD : exports_files(["ownership.yaml", "info.yaml"]).
  3. Add it to the ASSOCIATED_EXTRA_FILES list: "//iOSApp/Source:iOSApp": ["//iOSApp:ownership.yaml", "//iOSApp:info.yaml"],.
  4. Generate a project using the command: bazelisk run --config=cache //:xcodeproj-incremental-bazel-sim_arm64.
  5. Open the generated project: xed Integration.xcodeproj.
  6. Check that the project does not include ownership.yaml.

Expected behavior

All associated extra files presented in the project.

rules_xcodeproj version

516c3dd1f2eff13a3a2077c02a9e5aa914854aba

Xcode version

15.1

Bazel version

7.1

rules_apple version

No response

rules_swift version

No response

Additional information

No response