WebKit mojo classes can magically depend on content |
||
Issue descriptionfetch_api_request.mojom.h, a file generate from fetch_api_request.mojom, magically depends on content (I guess it magically merges some enums identical to those in content/common/service_worker/service_worker_types.h?). It looks like there's magic somewhere in gn to allow this to pass "gn check", despite no explicit WebKit dependency on content/. Ignoring laying violations and potential compilation failures, this also causes problems when trying to modify these magically included files. I tried adding an include file in content/common to service_worker_types.h, but "gn check" wouldn't allow it. I think adding a typemap for that file may work around the issue. Regardless, this is weird and magical and completely unexpected, and there's no easy way to figure out what's happening. I've spent the last two hours just trying to figure out what's going on, and am not yet confident I fully understand the issue, or have a clear path to a workaround.
,
Jun 29 2017
And is //content/common/service_worker/service_worker_fetch_request.typemap the typemap in question you couldn't find?
,
Jun 29 2017
I'm talking about the mojom.h one. Whether it's expected or not, gn is failing whenever content/common/service_worker/service_worker_types.h includes any file without a typemap file, with the following:
ERROR at //content/common/service_worker/service_worker_types.h:21:11: Include not allowed.
#include "content/common/accessibility_messages.h"
^--------------------------------------
It is not in any dependency of
//third_party/WebKit/public:mojo_bindings
The include file is in the target(s):
//content/common:common
which should somehow be reachable.
,
Jun 29 2017
Ahh, you're right. service_worker_fetch_request.typemap has the magic I was missing. Context is that ResourceRequest depends on some, but not all, of these, and to use the NetworkService in chrome, I need to move ResourceRequest and its dependencies into content/public, which is turning into a yak shave.
,
Jun 29 2017
I guess this is probably WontFix, but maybe typemappings should be more discoverable somehow? Going from a gn check error (On something that compiles and runs fine) to figuring out that the issue is these typemappings seems way too obscure.
,
Jun 30 2017
And it was due to allow_circular_includes_from (Which isn't a property of the mojo targets, but the one they depend on). Anyhow, too much weirdness. :( |
||
►
Sign in to add a comment |
||
Comment 1 by mek@chromium.org
, Jun 29 2017