Incorrect dependencies for mojom js for grit build |
|||
Issue description
I tried to build a particular target (../../chrome/app/chrome_exe_main_win.cc^) that seems to require gen\device\bluetooth\public\interfaces\uuid.mojom.js, but doesn't depend on it. This would be a cause of build flake.
Here's repro steps with output locally:
[asan-startup]c:\src\cr\src>del out\RelSA\gen\device\bluetooth\public\interfaces\uuid.mojom.js
[asan-startup]c:\src\cr\src>ninja -C out\RelSA ../../chrome/app/chrome_exe_main_win.cc^^
ninja: Entering directory `out\RelSA'
[5->1/6 ~1] ACTION //chrome/browser:resources_grit(//build/toolchain/win:x86)
FAILED: gen/chrome/resources_stamp.d.stamp gen/chrome/grit/browser_resources.h gen/chrome/browser_resources.pak
c:/src/depot_tools/python276_bin/python.exe ../../tools/grit/grit.py -i ../../chrome/browser/browser_resources.grd build -o gen/chrome --depdir . --depfile gen/chrome/resources_stamp.d --write-only-new=1 --depend-on-stamp -D _google_chrome -E CHROMIUM_BUILD=google_chrome -D toolkit_views -D use_aura -D enable_media_router -D enable_app_list=false -D enable_background=true -D enable_extensions=true -D enable_google_now=false -D enable_hangout_services_extension=true -D enable_hotwording=false -D enable_plugins=true -D enable_print_preview=true -D enable_printing=true -D enable_service_discovery=true -D enable_vr_shell=false -D enable_webrtc=true -D enable_webvr=false -D mac_views_browser=false -D safe_browsing_mode=1 -D use_vulcanize=true -D enable_hangout_services_extension -E additional_modules_list_file=gen/chrome/browser/internal/additional_modules_list.txt -E root_gen_dir=gen -f ../../tools/gritsettings/resource_ids --assert-file-list=obj/chrome/browser/resources_expected_outputs.txt
Error processing node <?xml version="1.0" encoding="UTF-8"?>
<include compress="gzip" file="${root_gen_dir}\device\bluetooth\public\interfaces\uuid.mojom.js" name="IDR_BLUETOOTH_UUID_MOJO_JS" type="BINDATA" use_base_dir="false" />
Traceback (most recent call last):
File "../../tools/grit/grit.py", line 15, in <module>
grit.grit_runner.Main(sys.argv[1:])
File "c:\src\cr\src\tools\grit\grit\grit_runner.py", line 268, in Main
toolobject.Run(options, args[1:])
File "c:\src\cr\src\tools\grit\grit\tool\build.py", line 258, in Run
self.Process()
File "c:\src\cr\src\tools\grit\grit\tool\build.py", line 385, in Process
self.ProcessNode(self.res, output, outfile)
File "c:\src\cr\src\tools\grit\grit\tool\build.py", line 322, in ProcessNode
formatted = formatter(node, output_node.GetLanguage(), output_dir=base_dir)
File "c:\src\cr\src\tools\grit\grit\format\data_pack.py", line 45, in Format
id, value = node.GetDataPackPair(lang, UTF8)
File "c:\src\cr\src\tools\grit\grit\node\include.py", line 96, in GetDataPackPair
data = util.ReadFile(filename, util.BINARY)
File "c:\src\cr\src\tools\grit\grit\util.py", line 207, in ReadFile
with open(filename, mode) as f:
IOError: [Errno 2] No such file or directory: u'..\\..\\out\\RelSA\\gen\\device\\bluetooth\\public\\interfaces\\uuid.mojom.js'
ninja: build stopped: subcommand failed.
[asan-startup]c:\src\cr\src>ninja -C out\RelSA gen\device\bluetooth\public\interfaces\uuid.mojom.js
ninja: Entering directory `out\RelSA'
[0->1/1 ~1] ACTION //device/bluetooth/public/interfaces:interfaces__generator(//build/toolchain/win:x86)
[asan-startup]c:\src\cr\src>ninja -C out\RelSA ../../chrome/app/chrome_exe_main_win.cc^^
ninja: Entering directory `out\RelSA'
[0->6/6 ~1] STAMP obj/chrome/chrome_initial.inputdeps.stamp
[asan-startup]c:\src\cr\src>type out\RelSA\args.gn
is_debug = false
is_chrome_branded = true
is_component_build = false
symbol_level = 2
is_official_build = true
is_syzyasan = true
target_cpu = "x86"
win_console_app = true
[asan-startup]c:\src\cr\src>
,
Dec 30 2016
This is orthogonal to data deps. This is a build-time dependency, which is currently only correctly expressible as a dependency on the ${name}__generator target. Depending on the ${name} target produces the JS generation dependency, but also includes the generated C++ sources and as well as an unnecessary runtime dependency on the generated JS.
,
Jan 9 2017
,
Jan 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1724f97e1dc9533f2c0cd7d67a78c8b04ff78c54 commit 1724f97e1dc9533f2c0cd7d67a78c8b04ff78c54 Author: mlopatkin <mlopatkin@yandex-team.ru> Date: Wed Jan 18 09:24:08 2017 Add missing dependency to //chrome/browser:resources The browser_resources.grd file references generated uuid.mojom.js file but there was no dependency in GN files. This caused 'gn gen' with compute_grit_inputs_for_analyze=true to fail. BUG= 676093 R=yzshen@chromium.org,mbrunson@chromium.org Review-Url: https://codereview.chromium.org/2638773003 Cr-Commit-Position: refs/heads/master@{#444310} [modify] https://crrev.com/1724f97e1dc9533f2c0cd7d67a78c8b04ff78c54/chrome/browser/BUILD.gn
,
Jun 21 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by yzshen@chromium.org
, Dec 21 2016Owner: yzshen@chromium.org