MobileNativeFoundation / rules_xcodeproj

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

Bug: Xcode Previews fail to find transitive frameworks when using `--define=apple.experimental.tree_artifact_outputs=0` #2641

Open brentleyjones opened 9 months ago

brentleyjones commented 9 months ago

Description

We don't unarchive transitive frameworks when copying them over to SwiftUIPreviewsFrameworks. This is an issue when using --define=apple.experimental.tree_artifact_outputs=0.

Reproduction steps

In examples/integration (which currently sets --define=apple.experimental.tree_artifact_outputs=0) try to use the UI Xcode Preview.

Expected behavior

We shouldn't unarchive artifacts in copy_outputs.sh. Instead we should generate an unarchiving action, and depend on that instead in the output groups. Then, regardless of what apple.experimental.tree_artifact_outputs is set to, we will always have a tree artifact.

rules_xcodeproj version

1.11.0

Xcode version

15.0

Bazel version

6.4.0rc1

rules_apple version

No response

rules_swift version

No response

Additional information

No response

brentleyjones commented 3 months ago

As of #2779:

The last thing needed is adding these products to an output group for Xcode previews, otherwise unfocused frameworks aren’t extracted.