New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 753219 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature



Sign in to add a comment

Mojo bindings generator should check imports vs deps

Project Member Reported by roc...@chromium.org, Aug 8 2017

Issue description

Typemapping only works properly when mojom targets get their deps right.

We don't currently enforce that mojom target deps are correct, and because of the way the generated source targets work, indirect dependencies are sufficient to allow under-specified direct dependencies to go undetected.

This can result in confusing problems where e.g. certain typemaps are not applied at bindings generation time.

It would be nice if we could have some check either in the bindings generator or a gn check step where we validate the set of imports against the set of deps.
 

Comment 1 by sa...@chromium.org, Nov 23 2017

Cc: slangley@chromium.org sa...@chromium.org

Comment 2 by sa...@chromium.org, Dec 18 2017

Cc: lucmult@chromium.org evem@chromium.org
Owner: oksamyt@chromium.org
Status: Assigned (was: Available)
Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, Mar 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/015487b3149a59a17fd55e90cc82af1f9b551bbe

commit 015487b3149a59a17fd55e90cc82af1f9b551bbe
Author: Oksana Zhuravlova <oksamyt@chromium.org>
Date: Fri Mar 09 06:58:22 2018

Implement a check for import/deps consistency in mojom files

This changes adds a new target to the mojom template which depends on
the parse target and is a dependency for all generation targets. A new
action has been added to the mojom_bindings_generator.py script that
compares the list of sources for all dependencies of a given mojom file
target to the list of imports in this file. If missing dependencies are
found, they are printed and the script exits with an error.
This changes also fixes missing dependencies and not fully-qualified
import statements.

Dependency check has been disabled for //content/common:mojo_bindings
and //content/public/common/interfaces since it caused multiple
definitions linker errors on Windows (they have both direct and indirect
dependencies on specific targets).

Bug:  753219 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_mojo;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win10_chromium_x64_rel_ng
Change-Id: I64613ad14af41f1fc2a77b81ac76507e26f9dfcc
Reviewed-on: https://chromium-review.googlesource.com/947384
Commit-Queue: Oksana Zhuravlova <oksamyt@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542054}
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/ash/public/interfaces/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/chrome/common/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/chrome/common/importer/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/chrome/services/file_util/public/mojom/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/chrome/services/printing/public/mojom/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/chrome/services/util_win/public/mojom/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/chrome/test/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/arc/common/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/arc/common/accessibility_helper.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/arc/common/app.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/arc/common/arc_bridge.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/arc/common/ime.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/arc/common/intent_helper.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/arc/common/notifications.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/arc/common/oemcrypto_daemon.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/arc/common/screen_capture.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/arc/common/video.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/arc/common/video_decode_accelerator.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/arc/common/video_encode_accelerator.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/arc/common/voice_interaction_arc_home.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/arc/common/voice_interaction_framework.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/autofill/content/common/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/pdf/common/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/spellcheck/common/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/components/translate/content/common/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/content/common/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/content/public/common/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/device/usb/public/mojom/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/device/usb/public/mojom/chooser_service.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/mojo/public/interfaces/bindings/tests/echo.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/mojo/public/interfaces/bindings/tests/sample_factory.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/mojo/public/interfaces/bindings/tests/sample_import2.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/mojo/public/interfaces/bindings/tests/sample_service.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/mojo/public/tools/bindings/mojom.gni
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/mojo/public/tools/bindings/mojom_bindings_generator.py
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/audio/public/mojom/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/device/public/mojom/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/device/public/mojom/sensor_provider.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/network/public/mojom/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/network/public/mojom/network_service.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/network/public/mojom/network_service_test.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/network/public/mojom/restricted_cookie_manager.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/network/public/mojom/udp_socket.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/network/public/mojom/url_loader_factory.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/preferences/public/mojom/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/proxy_resolver/public/mojom/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/resource_coordinator/public/mojom/coordination_unit.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/resource_coordinator/public/mojom/coordination_unit_introspector.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/resource_coordinator/public/mojom/coordination_unit_provider.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/resource_coordinator/public/mojom/page_signal.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/shape_detection/public/mojom/facedetection_provider.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/ui/public/interfaces/ime/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/services/viz/privileged/interfaces/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/third_party/WebKit/public/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/third_party/WebKit/public/mojom/BUILD.gn
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/third_party/WebKit/public/platform/modules/installedapp/installed_app_provider.mojom
[modify] https://crrev.com/015487b3149a59a17fd55e90cc82af1f9b551bbe/ui/message_center/public/mojo/BUILD.gn

Status: Fixed (was: Started)

Sign in to add a comment