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

Issue 695242 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
please use my google.com address
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

Mojo dependencies on typemaps make componentization harder

Project Member Reported by ftirelo@chromium.org, Feb 22 2017

Issue description

The current GN implementation requires the entire set of GNI/typemap files be pulled at build time. Because of that, pulling mojo to other projects not in Chromium (such as the SRT) requires pulling several directories that will not be used later (chrome/, content/, media/, ui/, and so on).

It'd be great if we could make typemapping a build configuration option.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 23 2017

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

commit f303a2c28ad93a3aeb09469782454b30ac6c9915
Author: rockot <rockot@chromium.org>
Date: Thu Feb 23 02:51:57 2017

Mojo C++ Bindings: Introduce build-time option to disable typemapping

Introduces the GN arg |enable_mojom_typemapping| which defaults to
|true|.

Setting this to |false| is strictly for use in non-Chromium build
configurations, e.g. external projects which wish to use Mojo bindings
and which may not wish to mirror the entire Chromium source tree.

When set to |false|, it avoids a build-time dependency on the global
Chromium and Blink typemap configurations.

BUG= 695242 
R=sammc@chromium.org

Review-Url: https://codereview.chromium.org/2715533004
Cr-Commit-Position: refs/heads/master@{#452359}

[modify] https://crrev.com/f303a2c28ad93a3aeb09469782454b30ac6c9915/mojo/public/tools/bindings/mojom.gni

Comment 2 by roc...@chromium.org, Feb 23 2017

Status: Fixed (was: Untriaged)
People generally like typemapping quite a bit and it is likely that you may eventually want typemapping, just with your own configuration.

For example, if you ever intend to pass URLs over your mojo interfaces, you would benefit from using the mojom and typemap in //url, which lets such message parameters use the GURL type directly and bakes in GURL-defined validation on deserialization.

I think this can be raised as a separate issue if and when it's deemed necessary. Calling this one fixed.

Sign in to add a comment