//services/device/serial:serial now depending on blink

35 views
Skip to first unread message

Claudio deSouza

unread,
Apr 18, 2019, 4:30:28 AM4/18/19
to Chromium-dev
Hello everyone,

I have some code that depends on //services/device/serial:serial, which I make use of by patching my target on the visibility list in serial's GN file.

I've noticed that a few days ago my build went from 2.5k steps to 8k steps on all platforms, and upon further investigation I noticed it a few dependencies that I had never built against, now being included, like //skia.

//services/device/serial:serial --[public]-->
//services/device/public/mojom:mojom --[private]-->
//third_party/blink/public/common:headers --[public]-->
//skia:skia

When doing a GN path to check what was going on I've got the following. I assume this is very recent.

Would anyone please assist me, even if involved doing a chromium patch only on my end, to allow me to exclude blink as a dependency from serial?

Regards,

Claudio DeSouza.

Daniel Bratell

unread,
Apr 18, 2019, 6:31:29 AM4/18/19
to Chromium-dev, Claudio deSouza
Pretty sure this started happening after  https://chromium-review.googlesource.com/c/chromium/src/+/1538507 where I added a dependency to fix:

ERROR at //out/Default/gen/services/device/public/mojom/screen_orientation_lock_types.mojom-forward.h:37:11: Include not allowed.
#include "third_party/blink/public/common/screen_orientation/web_screen_orientation_lock_type.h"

My guess is  that an alternative would be to move  web_screen_orientation_lock_type.h out of blink? Or move it to a more limited build target that doesn't pull in as much as the "headers" build target apparently does.

The header is included in the mojo bindings because of
public_headers = [ "//third_party/blink/public/common/screen_orientation/web_screen_orientation_lock_type.h" ]
in  third_party/blink/public/common/screen_orientation/screen_orientation_lock_types.typemap.

/Daniel
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/b619b926-1c6c-4bea-b040-33b853ed260d%40chromium.org.



--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

Claudio deSouza

unread,
Apr 18, 2019, 7:08:15 AM4/18/19
to Chromium-dev, claudi...@gmail.com
I have dealt with this in a different way on the moment, by having serial.mojom isolated to its own mojom target. As in:

mojom("serial") {
  sources = [
    "serial.mojom",
  ]

  public_deps = [
#    ":constants",
    "//mojo/public/mojom/base",
#    "//services/network/public/mojom",
#    "//services/network/public/mojom:mutable_network_traffic_annotation_interface",
  ]

  export_class_attribute_blink = "BLINK_PLATFORM_EXPORT"
  export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
  export_header_blink = "third_party/blink/public/platform/web_common.h"

  visibility_blink =
      [ "//third_party/blink/renderer/platform:blink_platform_public_deps" ]

}

Then, I added this target both to //services/device/serial:serial and //services/device/public/mojom:mojom

I'm thinking of pushing this to chromium and see what the device team say about it. It seems weird to me that //services/device/serial:serial has to depend on a bunch of interfaces that are entirely unrelated.

Regards

Daniel Bratell

unread,
Apr 18, 2019, 7:50:35 AM4/18/19
to Chromium-dev, Claudio deSouza
We have similar questions at other places as well, what is better, many small build targets with few dependencies or fewer large build targets with long dependency lists and circular dependencies?

No perfect answer here.

/Daniel
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
Message has been deleted

Peter Kasting

unread,
Apr 18, 2019, 11:57:24 AM4/18/19
to Daniel Bratell, Chromium-dev, Claudio deSouza
On Thu, Apr 18, 2019 at 4:49 AM Daniel Bratell <bra...@opera.com> wrote:
We have similar questions at other places as well, what is better, many small build targets with few dependencies or fewer large build targets with long dependency lists and circular dependencies?

No perfect answer here.

Phrased that way, I'm scratching my head wondering what the downside of the "many small build targets with few dependencies" route is.

PK 

Claudio deSouza

unread,
Apr 18, 2019, 12:33:42 PM4/18/19
to Chromium-dev, bra...@opera.com, claudi...@gmail.com
I've upload a small intermediary dependency for serial headers here.


I don't see any downside to have something similar for the other projects. Also, I'm not sure why my previous message was deleting where I said I was going to upload this.

Claudio.

Daniel Cheng

unread,
Apr 18, 2019, 12:40:56 PM4/18/19
to Peter Kasting, Daniel Bratell, Chromium-dev, Claudio deSouza
One downside is a BUILD.gn file that ends up with over a dozen mojom targets (with slight and minor variations between each one, with unclear reasons for the variations). And due to lack of structure, the number of targets just continues increasing over time.

Daniel

 

PK 

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
Reply all
Reply to author
Forward
0 new messages