Mojo bindings: need a way to break circular dependency of mojoms |
||||
Issue descriptionCurrently we don't allow two mojoms to import each other. We don't support forward declaration of types either. That is annoying in some cases. The following is one example: https://code.google.com/p/chromium/codesearch#chromium/src/services/shell/public/interfaces/connector.mojom&l=74 This file defines the following struct: struct ClientProcessConnection { // Provides the shell the ability to bind a ShellClient from the client // process to the instance it creates. handle<message_pipe> shell_client; // Allows the client process launcher to tell the shell the PID of the process // it created (the pid isn't supplied directly here as the process may not // have been launched by the time Connect() is called.) handle<message_pipe> pid_receiver_request; }; It uses raw handle<message_pipe> in order to avoid importing the mojom files containing those interfaces because that would result in circular dependencies. We need to either: (1) allow circular imports in mojoms, but generate code that still compiles (no circular #include, etc.) (2) introduce syntax for forward declaration
,
Jan 18 2017
,
Oct 17
,
Nov 14
Issue 904137 has been merged into this issue.
,
Nov 14
Definitely still valid, and I was disappointed by this again recently. Leaving at P2 as one of the nicer-to-have feature requests in the backlog. |
||||
►
Sign in to add a comment |
||||
Comment 1 by yzshen@chromium.org
, Jan 9 2017