Missing build dependency: //chrome/browser/extensions/api:api_registration -> //services/identity/public/mojom |
|
Issue description
Chrome Version: 71.0.3569.0
OS: all
Encountered this compilation error recently:
In file included from gen/chrome/browser/extensions/api/generated_api_registration.cc:50:
In file included from ../../chrome/browser/extensions/api/identity/identity_api.h:24:
In file included from ../../chrome/browser/extensions/api/identity/identity_get_accounts_function.h:10:
gen/services/identity/public/mojom/identity_manager.mojom.h:28:10: fatal error: 'services/identity/public/mojom/identity_manager.mojom-shared.h' file not found
#include "services/identity/public/mojom/identity_manager.mojom-shared.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
There is a dependency from //chrome/browser/extensions target (which lists identity_api.h in its sources) to //services/identity/public/mojom but apparently //chrome/browser/extensions/api:api_registration also uses identity_api.h implicitly and is missing the dependency to generate the mojo include.
This seems like a more general error:
targetA builds header.h which includes mojom.h, but it's fine as long as targetA also depends on targetM which generates mojom.h. targetA's dependencies will be built before header.h.
But if targetA depends on targetB, which also happens to build header.h, it's a problem. targetB may be build before other targetA's deps, potentially before targetM.
There are dozens of api headers referenced in generated_api_resources.cc and potentially lots of issues like this.
,
Oct 19
Is this on master (and what's the git commit id?) And what command did you use to build?
,
Oct 22
commit 004d2ec55e47a7d1331a3b363df2c56a9c6eb343 ninja -C out/Debug/ -j80 chrome/browser/extensions/api:api_registration (on a clear build dir) There's bound to be some "fatal error: *.pb.h file not found" or "*.mojom.h file not found", this particular one from //services/identity isn't necessarily the first one that will fail, depending on build order. |
|
►
Sign in to add a comment |
|
Comment 1 by dtapu...@chromium.org
, Oct 18