Mojo bindings deps check doesn't seem to allow transitive dependencies. |
||||
Issue descriptionIn https://chromium-review.googlesource.com/c/chromium/src/+/963088/2/third_party/WebKit/public/mojom/BUILD.gn I had to add a dependency on //services/network/public/mojom:data_pipe_interfaces from my mojom target to get the mojo bindings deps check to shut up, even though I already depend on //services/network/public/mojom (which itself has mojom::data_pipe_interfaces in its public_deps). Since the whole point of public_deps is that you don't have to redeclare these transitive dependencies, this seems broken.
,
Mar 16 2018
So are you saying mojom public_deps are no longer public_deps and instead should be considered non-public deps?
,
Mar 16 2018
And not sure why you wouldn't be able to do so? Presumably your deps verification target of target X depends on the deps verification targets of all its dependencies. So the deps verification targets could just output a list of all their dependencies somehow, and then you'd read those back in for the deps verification target that depends on it?
,
Mar 17 2018
We use invoker.deps to get the list of a given target's direct dependencies. Marijn, do you happen to know if there is a way to get each of the deps's deps? I will study the GN documentation to find out.
,
Mar 19 2018
I'm not aware of GN exposing the full public_deps tree to a target, but it shouldn't be too hard to get that behavior anyway? Simply have each deps verification target produce a list of all its transitive deps, and make deps verification targets depend on the deps verification targets of their dependencies (if that's not already the case), so they can read in the transitive deps of their dependencies and use that to verify things (and output their own transitive deps)?
,
Aug 3
This bug has an owner, thus, it's been triaged. Changing status to "assigned".
,
Oct 11
I believe hit this same issue when adding a blink/public/mojom:mojom_modules target that depends on mojom_core. The new mojom_modules target depends on mojom_core so it should indirectly depend on everything mojom_core depends on. However, the build fails until I declare those things as direct dependencies.
,
Oct 12
,
Oct 17
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/674715b72139e149101ca70fcf812d43a68f447f commit 674715b72139e149101ca70fcf812d43a68f447f Author: Oksana Zhuravlova <oksamyt@chromium.org> Date: Wed Oct 17 22:49:24 2018 Allow transitive dependencies for mojom targets Bug: 822804 Change-Id: I188fcfad992c7508125bc1ca7d196bb086687f44 Reviewed-on: https://chromium-review.googlesource.com/c/1281886 Reviewed-by: Ken Rockot <rockot@google.com> Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org> Cr-Commit-Position: refs/heads/master@{#600580} [modify] https://crrev.com/674715b72139e149101ca70fcf812d43a68f447f/mojo/public/tools/bindings/mojom.gni [modify] https://crrev.com/674715b72139e149101ca70fcf812d43a68f447f/mojo/public/tools/bindings/mojom_bindings_generator.py
,
Oct 17
|
||||
►
Sign in to add a comment |
||||
Comment 1 by roc...@chromium.org
, Mar 16 2018