New issue
Advanced search Search tips

Issue 730719 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

gn --check doesn't understand platform #ifdefs

Project Member Reported by mmenke@chromium.org, Jun 7 2017

Issue description

Go to net/BUILD.gn and remove the "!is_android" part of enable_net_mojo.  Then run gn gen --check on a directory set to build for Android.  You'll get:

ERROR at //chrome/utility/chrome_content_utility_client.cc:37:11: Include not allowed.
#include "net/proxy/mojo_proxy_resolver_factory_impl.h"
          ^-------------------------------------------
It is not in any dependency of
  //chrome/utility:utility
The include file is in the target(s):
  //net:net_utility_services
which should somehow be reachable.

This is weird, in that the referenced include line is in an "#if !defined(OS_ANDROID)" block.  Also, the file wasn't in a dependency of "chrome/utility:utility" before.  The only difference is that net:net_utility_services is not defined when enable_net_mojo (Defined in net/BUILD.gn, but not exported) is false.

Despite this gn error, everything links and builds fine, it's just gn that's preventing me from making this change.

The reason for all this is that on Android, there is no separate process to run PAC scripts, so chrome_content_utility_client doesn't need to create a process for this.  However, we want to use the same code in process, so we can run PAC scripts via in-process Mojo (This will be useful so that when we switch to using a network service, it has the same interface for setting up PAC execution on Android (Where both the service and PACs run in process) and on desktop (Where both run in separate processes).

This seems like a completely unexpected and very surprising behavior.
 

Comment 1 by emso@chromium.org, Jun 9 2017

Components: -Infra>CodeAnalysis

Sign in to add a comment