I've been moving some mojom / typemaps around, and have gotten a variety of completely inscrutable gn errors, which take quite a while to debug. Examples:
ERROR at dynamically parsed input that //mojo/public/tools/bindings/mojom.gni:125:35 loaded :66:25: Could not read file.
_imported = read_file(typemap_import, "scope")
^-------------
I resolved this to "C:/src/chrome/src/net/interfaces/typemaps.gni".
See //chrome/test/BUILD.gn:21:1: whence it was imported.
import("//mojo/public/tools/bindings/mojom.gni")
^----------------------------------------------
See //BUILD.gn:102:7: which caused the file to be included.
"//chrome/test:browser_tests",
This apparently means "mojo/public/tools/bindings/chromium_bindings_configuration.gni" still references a removed typemap file." Note that the browser_tests path at the end varied randomly from run to run.
ERROR at dynamically parsed input that dynamically parsed input that //mojo/public/tools/bindings/mojom.gni:125:35 loaded :74:16 loaded :5:9: Could not read file.
mojom = "//net/interfaces/address_family.mojom"
^--------------------------------------
I resolved this to "C:/src/chrome/src/net/interfaces/address_family.mojom".
See //chrome/test/BUILD.gn:21:1: whence it was imported.
import("//mojo/public/tools/bindings/mojom.gni")
^----------------------------------------------
See //BUILD.gn:102:7: which caused the file to be included.
"//chrome/test:browser_tests",
^----------------------------
This one apparently means that a address_family.typemap has a reference to "net/interfaces/address_family.mojom" (Which was moved). But you also get the exact same error if any mojom files tries to import the file at the old path.
Could we at least output the current mojo/bindings file being processed in these error messages?
Comment 1 by rockot@google.com
, Nov 10