Support multiple modules on app_intents for applications#2879
Merged
aaronsky merged 12 commits intobazelbuild:mainfrom Mar 7, 2026
Merged
Support multiple modules on app_intents for applications#2879aaronsky merged 12 commits intobazelbuild:mainfrom
app_intents for applications#2879aaronsky merged 12 commits intobazelbuild:mainfrom
Conversation
Contributor
Author
|
any kind of feedbacks are welcome (ideas, approaches, blockers need to solve first, etc...) |
aaronsky
approved these changes
Mar 7, 2026
Contributor
Author
|
Thank you for the review! I resolved conflict and imported changes of latest master 🙇 escpecially:
to/from argument of |
kntkymt
added a commit
to kntkymt/rules_apple
that referenced
this pull request
Mar 28, 2026
…azelbuild#2879)" This reverts commit f92f668.
keith
pushed a commit
that referenced
this pull request
Mar 28, 2026
…2879)" (#2906) # Background This reverts commit f92f668. solves #2901 This issue is a regression introduced by #2879, which added support for multiple dependencies for app_intents. The approach was as follows: 1. Parse each dependency module 2. Merge the generated metadata into a single dummy module's metadata using the `--static-metadata-file-list` option of `appintentmetadataprocessor`, which is intended to propagate dependency metadata (definition of `AppIntents`) to dependents 3. Bundle the result of step 2 into the app However, it turns out that `--static-metadata-file-list` does not propagate AppShortcutsProvider to dependent modules. In other words, the processor only recognizes providers defined in the last (root) module it processes. Since the root module in this approach is a dummy module, providers defined in modules passed to `app_intents` are dropped during step 2. # Approach Let me revert it now and start over thinking about proper approach. Now I’m thinking it would be better to keep the single-module restriction for the app_intents argument. Since the processor essentially expects a single root module for defining `AppShortcutsProvider`, it makes sense for app_intents to specify that root module. Instead, it would be more appropriate to support recursively parsing the metadata of dependency modules from the module passed to app_intents, which would effectively allow handling multiple modules. I might try to work on it when I have a time any other idea, suggestion are welcomed BTW, I'm going to open an another PR for adding test cases regarding `AppShortcutsProvider`, it helps us avoiding such regression in the future. I'm sorry for causing this problem and thanks for reviewers, contributors support 🙇
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
resolve #2878
Approach
As-is
To-be
When using Xcode 26 or later
1.to--static-metadata-file-list.appintentmetadataprocessormerges the metadata files into a single metadata.Note:
appintentmetadataprocessorsupports--static-metadata-file-liststarting with the Xcode 26 toolchain.Otherwise
Keep the current behavior.
Sample
sample project
https://github.com/kntkymt/ios-app-intents-sample/tree/main/bazel-multi-app-intents