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

Issue 2058023004: Clean up Mojo C API dependent targets (Closed)

Created:
4 years, 6 months ago by Ken Rockot(use gerrit already)
Modified:
4 years, 6 months ago
CC:
Aaron Boodman, abarth-chromium, alokp+watch_chromium.org, ben+mojo_chromium.org, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin (slow to review), dglazkov+blink, feature-media-reviews_chromium.org, haraken, kalyank, piman+watch_chromium.org, posciak+watch_chromium.org, qsr+mojo_chromium.org, rjkroege, sadrul, tfarina, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Clean up Mojo C API dependent targets Wipes out references to mojo/public/c/system:for_component and :for_shared_library which are now unnecessary. mojo/public/cpp/bindings and mojo/public/cpp/sysetm now carry mojo/public/c/system as a public_deps and there's no longer a need for targets to explicitly link against it or its variants. This renders the dependencies much easier to understand since they reflect what's seen in the code. Also opportunistically cleans up deps/public_deps on many affected targets since a lot of these were wrong. BUG=612500 TBR=ben@chromium.org for mus, mash, mojo, toplevel, ui TBR=dpranke@chromium.org for blink gn changes TBR=charliea@chromium.org Committed: https://crrev.com/b9e3b77377382c73b6af8614dccc902a79843380 Cr-Commit-Position: refs/heads/master@{#399273}

Patch Set 1 #

Total comments: 3

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -91 lines) Patch
M chrome/browser/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download
M components/mus/common/BUILD.gn View 1 chunk +3 lines, -2 lines 0 comments Download
M components/mus/public/cpp/BUILD.gn View 1 chunk +10 lines, -12 lines 0 comments Download
M components/mus/public/cpp/surfaces/BUILD.gn View 1 chunk +5 lines, -7 lines 0 comments Download
M mash/example/window_type_launcher/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download
M media/gpu/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M media/mojo/common/BUILD.gn View 1 chunk +2 lines, -1 line 0 comments Download
M media/mojo/services/BUILD.gn View 1 3 chunks +24 lines, -16 lines 0 comments Download
M mojo/common/BUILD.gn View 2 chunks +6 lines, -5 lines 0 comments Download
M mojo/converters/blink/BUILD.gn View 1 chunk +4 lines, -2 lines 0 comments Download
M mojo/message_pump/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M mojo/public/c/system/BUILD.gn View 1 chunk +0 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/modules/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 chunk +0 lines, -4 lines 0 comments Download
M tools/battor_agent/BUILD.gn View 3 chunks +1 line, -2 lines 0 comments Download
M ui/display/mojo/BUILD.gn View 1 chunk +0 lines, -5 lines 0 comments Download
M ui/display/mojo/DEPS View 1 chunk +0 lines, -1 line 0 comments Download
M ui/platform_window/mojo/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/mus/BUILD.gn View 3 chunks +0 lines, -13 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 22 (8 generated)
Ken Rockot(use gerrit already)
Xiaohan, mind taking a look for media?
4 years, 6 months ago (2016-06-10 19:48:07 UTC) #5
xhwang
rs lgtm with a question https://codereview.chromium.org/2058023004/diff/1/media/mojo/services/BUILD.gn File media/mojo/services/BUILD.gn (right): https://codereview.chromium.org/2058023004/diff/1/media/mojo/services/BUILD.gn#newcode75 media/mojo/services/BUILD.gn:75: public_deps = [ why ...
4 years, 6 months ago (2016-06-10 19:49:56 UTC) #6
Ben Goodger (Google)
lgtm
4 years, 6 months ago (2016-06-10 19:50:59 UTC) #7
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2058023004/diff/1/media/mojo/services/BUILD.gn File media/mojo/services/BUILD.gn (right): https://codereview.chromium.org/2058023004/diff/1/media/mojo/services/BUILD.gn#newcode75 media/mojo/services/BUILD.gn:75: public_deps = [ On 2016/06/10 at 19:49:56, xhwang wrote: ...
4 years, 6 months ago (2016-06-10 20:00:41 UTC) #8
xhwang
https://codereview.chromium.org/2058023004/diff/1/media/mojo/services/BUILD.gn File media/mojo/services/BUILD.gn (right): https://codereview.chromium.org/2058023004/diff/1/media/mojo/services/BUILD.gn#newcode75 media/mojo/services/BUILD.gn:75: public_deps = [ On 2016/06/10 20:00:41, Ken Rockot wrote: ...
4 years, 6 months ago (2016-06-10 20:05:52 UTC) #9
Ken Rockot(use gerrit already)
On 2016/06/10 at 20:05:52, xhwang wrote: > https://codereview.chromium.org/2058023004/diff/1/media/mojo/services/BUILD.gn > File media/mojo/services/BUILD.gn (right): > > https://codereview.chromium.org/2058023004/diff/1/media/mojo/services/BUILD.gn#newcode75 ...
4 years, 6 months ago (2016-06-10 20:21:56 UTC) #10
Ken Rockot(use gerrit already)
On 2016/06/10 at 20:05:52, xhwang wrote: > https://codereview.chromium.org/2058023004/diff/1/media/mojo/services/BUILD.gn > File media/mojo/services/BUILD.gn (right): > > https://codereview.chromium.org/2058023004/diff/1/media/mojo/services/BUILD.gn#newcode75 ...
4 years, 6 months ago (2016-06-10 20:23:36 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2058023004/20001
4 years, 6 months ago (2016-06-10 20:44:51 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 6 months ago (2016-06-10 21:34:29 UTC) #15
commit-bot: I haz the power
CQ bit was unchecked
4 years, 6 months ago (2016-06-10 21:34:31 UTC) #16
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/b9e3b77377382c73b6af8614dccc902a79843380 Cr-Commit-Position: refs/heads/master@{#399273}
4 years, 6 months ago (2016-06-10 21:37:13 UTC) #18
xhwang
On 2016/06/10 20:21:56, Ken Rockot wrote: > On 2016/06/10 at 20:05:52, xhwang wrote: > > ...
4 years, 6 months ago (2016-06-10 21:42:21 UTC) #19
Ken Rockot(use gerrit already)
On Fri, Jun 10, 2016 at 2:42 PM, <xhwang@chromium.org> wrote: > On 2016/06/10 20:21:56, Ken ...
4 years, 6 months ago (2016-06-10 21:51:01 UTC) #21
Ken Rockot(use gerrit already)
4 years, 6 months ago (2016-06-10 21:51:01 UTC) #22
Message was sent while issue was closed.
On Fri, Jun 10, 2016 at 2:42 PM, <xhwang@chromium.org> wrote:

> On 2016/06/10 20:21:56, Ken Rockot wrote:
> > On 2016/06/10 at 20:05:52, xhwang wrote:
> > >
>
>
https://codereview.chromium.org/2058023004/diff/1/media/mojo/services/BUILD.gn
> > > File media/mojo/services/BUILD.gn (right):
> > >
> > >
> >
>
>
https://codereview.chromium.org/2058023004/diff/1/media/mojo/services/BUILD.g...
> > > media/mojo/services/BUILD.gn:75: public_deps = [
> > > On 2016/06/10 20:00:41, Ken Rockot wrote:
> > > > On 2016/06/10 at 19:49:56, xhwang wrote:
> > > > > why are these public_deps now?
> > > >
> > > > Because they're exposed by headers like mojo_decryptor.h
> > >
> > > That makes me sad. Having to track what should be in deps and what
> should be
> > in public_deps would be a non-trivial task.
> > >
> > > If I don't want to do this, I have to restructure all my header files
> such
> > that they only expose a pure interface, and always use an internal class
> in
> the
> > CC file to do the real implementation. It's doable but also super
> annoying.
> >
> > There's a meaningful difference between public dependencies and
> non-public
> > dependencies, and it affects the build. Any header exposed by //foo's
> sources
> > may be included by dependents of //foo and we have no way to enforce more
> > specific constraints at build time. Unless you are willing to document
> what is
> > and isn't public, and strictly enforce it in code review, I don't think
> it's a
> > good idea to expose things in headers without fixing the dependencies.
> This
> can
> > really cause build flake.
> >
> > If something shouldn't be exposed to //foo's dependents, it shouldn't be
> in
> > //foo's headers. This is why many components separate code into public/
> and
> > non-public/ locations.
>
> Is this enforced by anything like "gn check"?
>

It should be, but it's not and it's complicated. I thought there was a
feature request for this on GN but I can't find it.


>
> Yeah, we don't have the concept of "public" in media, that seems to be the
> root
> of this issue. To do that, we need to refactor a lot of headers.
>
> For "non-trivial", I am talking about fixing much larger targets, like
> media/base:
> https://cs.chromium.org/chromium/src/media/base/BUILD.gn?rcl=0&l=25
> But I agree even for that it's probably not hard to fix it.
>

It seems like it would be unfortunate makework to refactor everything just
for the sake of doing it. It's not strictly a problem unless some of the
public dependencies have generated outputs (e.g. mojom targets) or public
configs associated with them (skia is a good example), so things like
media/base probably won't run into trouble. It's good policy to adhere to
moving forward though, so I'll probably continue to update targets
accordingly if I ever have to touch them for any other reason.



>
> https://codereview.chromium.org/2058023004/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698