My CL ( https://chromium-review.googlesource.com/c/512282/6 ) has a platform-dependent header file inclusion.
services/device/time_zone_monitor/time_zone_monitor.cc has this line:
#if defined(OS_ANDROID)
#include "base/i18n/timezone.h"
#endif
And services/device/time_zone_monitor/BUILD.gn has
if (is_android) {
sources += [
"android/time_zone_monitor_jni_registrar.cc",
"android/time_zone_monitor_jni_registrar.h",
]
deps += [
":time_zone_monitor_jni_headers",
"//base:i18n",
]
}
-----------------------
However, mac trybot and windows trybot complain about base/i18n/timezone.h .
https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Ftryserver.chromium.mac%2Fmac_chromium_compile_dbg_ng%2F425753%2F%2B%2Frecipes%2Fsteps%2Fanalyze%2F0%2Fstdout has
""" to /b/c/b/mac/src/out/Debug/args.gn.
/b/c/b/mac/src/buildtools/mac/gn gen //out/Debug --check
-> returned 1
ERROR at //services/device/time_zone_monitor/time_zone_monitor.cc:8:11: Include not allowed.
#include "base/i18n/timezone.h"
^-------------------
It is not in any dependency of
//services/device/time_zone_monitor:time_zone_monitor
The include file is in the target(s):
//base:i18n
which should somehow be reachable.
GN gen failed: 1
https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Ftryserver.chromium.win%2Fwin_chromium_x64_rel_ng%2F434339%2F%2B%2Frecipes%2Fsteps%2Fanalyze%2F0%2Fstdout has
ERROR at //services/device/time_zone_monitor/time_zone_monitor.cc:8:11: Can't include this header from here.
#include "base/i18n/timezone.h"
^-------------------
The target:
//services/device/time_zone_monitor:time_zone_monitor
is including a file from the target:
//base:i18n
It's usually best to depend directly on the destination target.
In some cases, the destination target is considered a subcomponent
of an intermediate target. In this case, the intermediate target
should depend publicly on the destination to forward the ability
to include headers.
Dependency chain (there may also be others):
//services/device/time_zone_monitor:time_zone_monitor -->
//ui/gfx:gfx --[private]-->
//base:i18n
GN gen failed: 1
------------------------------------
Comment 1 by js...@chromium.org
, May 23 2017