Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Issue 1412733002: C++ bindings: separate out serialization source set, have "mojom" targets optionally use serializat… (Closed)

Created:
5 years, 2 months ago by vardhan
Modified:
5 years, 2 months ago
Reviewers:
jamesr, viettrungluu
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, darin (slow to review), gregsimon, mojo-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

C++ bindings: separate out serialization source set, have "mojom" targets optionally use serialization-only source set R=viettrungluu@chromium.org, jamesr@chromium.org BUG=#419 Committed: https://chromium.googlesource.com/external/mojo/+/5f74f421c1fa8fa691360294d9ada303ccf6de4b

Patch Set 1 #

Patch Set 2 : formatting stuff #

Patch Set 3 : remove unused --cpp_dataonly flag #

Total comments: 11

Patch Set 4 : shrink the dependencies of "serialization_base", remove more traces of --cpp_dataonly #

Patch Set 5 : Always generate _dataonly mojom target. Don't include environment in ':serialization' target #

Patch Set 6 : link sanitizer to examples/serialization (to fix the ASAN build failure) #

Total comments: 17

Patch Set 7 : address comments from previous patch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -120 lines) Patch
M examples/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A examples/serialization/BUILD.gn View 1 2 3 4 5 6 1 chunk +37 lines, -0 lines 0 comments Download
A examples/serialization/main.cc View 1 2 3 4 5 6 1 chunk +29 lines, -0 lines 0 comments Download
A + examples/serialization/serialization.mojom View 1 2 3 4 5 6 1 chunk +7 lines, -5 lines 0 comments Download
M mojo/PRESUBMIT.py View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/BUILD.gn View 1 2 3 4 5 6 4 chunks +46 lines, -30 lines 0 comments Download
M mojo/public/cpp/bindings/interface_request.h View 1 chunk +7 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/lib/array_serialization.h View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/lib/bindings_serialization.h View 1 chunk +7 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/lib/message_header_validator.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A + mojo/public/cpp/bindings/lib/message_validation.h View 1 2 3 3 chunks +3 lines, -19 lines 0 comments Download
A mojo/public/cpp/bindings/lib/message_validation.cc View 1 2 3 1 chunk +41 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/lib/validation_util.h View 1 2 3 2 chunks +0 lines, -16 lines 0 comments Download
M mojo/public/cpp/bindings/lib/validation_util.cc View 1 2 3 2 chunks +0 lines, -28 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M mojo/public/tools/bindings/mojom.gni View 1 2 3 4 5 6 2 chunks +44 lines, -19 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
vardhan
$ gn desc --all --tree out/Debug //examples/serialization .. visibility: * Dependency tree: //examples/serialization:serialization_example //examples/serialization:serialization_mojom //examples/serialization:serialization_mojom__generator ...
5 years, 2 months ago (2015-10-16 18:10:50 UTC) #1
jamesr
Does the code generator produce different things with --cpp_dataonly?
5 years, 2 months ago (2015-10-19 17:34:56 UTC) #2
vardhan
On 2015/10/19 at 17:34:56, jamesr wrote: > Does the code generator produce different things with ...
5 years, 2 months ago (2015-10-19 17:48:38 UTC) #3
jamesr
Hmm, but mojom.gni still forwards a flag. What does that do? Why is a parameter ...
5 years, 2 months ago (2015-10-19 19:37:43 UTC) #4
viettrungluu
https://codereview.chromium.org/1412733002/diff/40001/mojo/public/cpp/bindings/BUILD.gn File mojo/public/cpp/bindings/BUILD.gn (right): https://codereview.chromium.org/1412733002/diff/40001/mojo/public/cpp/bindings/BUILD.gn#newcode7 mojo/public/cpp/bindings/BUILD.gn:7: mojo_sdk_source_set("serialization_base") { This target deserves an explanatory comment. https://codereview.chromium.org/1412733002/diff/40001/mojo/public/cpp/bindings/BUILD.gn#newcode10 ...
5 years, 2 months ago (2015-10-19 19:37:54 UTC) #5
vardhan
On 2015/10/19 at 19:37:43, jamesr wrote: > Hmm, but mojom.gni still forwards a flag. What ...
5 years, 2 months ago (2015-10-19 20:43:57 UTC) #6
vardhan
On 2015/10/19 at 20:43:57, vardhan wrote: > On 2015/10/19 at 19:37:43, jamesr wrote: > > ...
5 years, 2 months ago (2015-10-19 20:47:51 UTC) #7
vardhan
jamesr@: the 'mojom' template currently depends on mojo/public/cpp/bindings:bindings, which depends on a mojo system implementation. ...
5 years, 2 months ago (2015-10-19 23:18:31 UTC) #8
jamesr
On 2015/10/19 at 23:18:31, vardhan wrote: > jamesr@: > the 'mojom' template currently depends on ...
5 years, 2 months ago (2015-10-19 23:24:58 UTC) #9
vardhan
On 2015/10/19 at 23:24:58, jamesr wrote: > On 2015/10/19 at 23:18:31, vardhan wrote: > > ...
5 years, 2 months ago (2015-10-19 23:39:23 UTC) #10
jamesr
Could you always produce the target in the template but have the generator tell you ...
5 years, 2 months ago (2015-10-19 23:43:24 UTC) #11
vardhan
mojom("mymojom"){} template will generate a separate "mymojom_dataonly" target that links in the minimal |:serialization| target. ...
5 years, 2 months ago (2015-10-20 18:45:57 UTC) #12
viettrungluu
Mostly looks good to me, with mostly nits. James should look at the .gni change ...
5 years, 2 months ago (2015-10-20 23:54:37 UTC) #13
jamesr
I think the gni is fine https://codereview.chromium.org/1412733002/diff/100001/mojo/public/tools/bindings/mojom.gni File mojo/public/tools/bindings/mojom.gni (right): https://codereview.chromium.org/1412733002/diff/100001/mojo/public/tools/bindings/mojom.gni#newcode218 mojo/public/tools/bindings/mojom.gni:218: cpp_deps += rebased_mojo_sdk_deps ...
5 years, 2 months ago (2015-10-21 00:24:57 UTC) #14
vardhan
PTAL https://codereview.chromium.org/1412733002/diff/100001/examples/serialization/BUILD.gn File examples/serialization/BUILD.gn (right): https://codereview.chromium.org/1412733002/diff/100001/examples/serialization/BUILD.gn#newcode1 examples/serialization/BUILD.gn:1: # Copyright 2014 The Chromium Authors. All rights ...
5 years, 2 months ago (2015-10-21 19:29:38 UTC) #15
viettrungluu
lgtm
5 years, 2 months ago (2015-10-21 19:31:13 UTC) #16
vardhan
5 years, 2 months ago (2015-10-21 19:38:47 UTC) #17
Message was sent while issue was closed.
Committed patchset #7 (id:120001) manually as
5f74f421c1fa8fa691360294d9ada303ccf6de4b (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698