Revert "Support multiple modules on app_intents for applications (#2879)"#2906
Merged
keith merged 1 commit intobazelbuild:mainfrom Mar 28, 2026
Merged
Conversation
…azelbuild#2879)" This reverts commit f92f668.
keith
approved these changes
Mar 28, 2026
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
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:
--static-metadata-file-listoption ofappintentmetadataprocessor, which is intended to propagate dependency metadata (definition ofAppIntents) to dependentsHowever, it turns out that
--static-metadata-file-listdoes 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_intentsare 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 🙇