Make EventInterfaces.in build step not depend on bindings generation
Currently EventInterfaces.in generation is causing build problems (fail to rebuild) because it does not specify dependencies correctly, and it is not depended on correctly. Fixing this is hard because of wonky circular dependency between core/ and bindings/. This fixes it by moving EventInterfaces.in generation to a separate file, core_bindings_generated.gyp, and having a static list of event interfaces, so EventInterfaces.in generation does not depend on any other build steps, breaking the cycle. The build action stays in bindings/, because it depends on .idl files in modules/, and we don't want build dependencies of core/ on modules/. This also does some cleanup of generated_bindings.gyp and bindings.gypi, which incidentally moves ServiceWorkerGlobalScopeConstructors.idl into gen/blink (where it belongs), not gen/. (For ease of reviewing it doesn't move the Python file, but I can move it to build/scripts in a followup.) == Details == The simple fix for EventInterfaces.in generation (adding dependencies) creates a circular dependency between .gyp files, which causes Mac build bot to fail. (This isn't a circular dependency between GYP *targets*, so builds correctly on other platforms), Breaking the circular dependency by omitting it breaks Android build. The specific dependency problem is that core/core_generated.gyp:make_core_generated ...needs to depend on generation of EventInterfaces.in, ...which is currently in bindings/generated_bindings.gyp:generated_bindings but this depends on core/core_generated.gyp:generated_testing_idls (for generated IDL files), which creates a cycle of *files*: core/core_generated.gyp -> bindings/generated_bindings.gyp -> core/core_generated.gyp We break this by having core/core_generated.gyp:make_core_generated depend on bindings/core_bindings_generated.gyp:core_bindings_generated ...which has no dependency targets. The dependency on bindings/ is because current EventInterfaces.in generation dynamically computes the list of event interfaces (based on ancestry: inherits from Event), which depends on the global 'compute_interfaces_info' step in bindings/, which computes ancestry and a whole lot more. This can be solved by instead having a static list of event interface IDL files, which breaks the dependency, and also avoids unnecessary regenerations (only regen on event .idl file changes, not any .idl file change) and simplifies the code. Previous build failure/proposed fix: Add RuntimeEnabled info to InterfaceInfo.pickle. https://codereview.chromium.org/208953004/ Quick fix: Fix dependencies for EventInterfaces.in https://codereview.chromium.org/209723002/ ...reverted in: Revert of Fix dependencies for EventInterfaces.in https://codereview.chromium.org/212713002/ R=abarth, haraken BUG=341748 BUG=358074 Review URL: https://codereview.chromium.org/212983010 git-svn-id: svn://svn.chromium.org/blink/trunk@170628 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment