Buck: Move gwt-dev transitive deps to first order dependency

Since bottom-up to top-down graph traversal switch in Buck, only
first order dependencies are built per default. This leads to a
problem when gerrit is built without --deep option (per default).

Move gwt-dev dependencies to gwt_binary() rules.

The correct fix for this issue would be to model the GWT compiler
as a tool, and ensure that its transitive deps are added as first
order deps of the gwt_binary() rules: [1]. Put this workaround for
now in tree and fix build breakages. We can always improve things
when Buck supports that new model.

Test plan:

* buck clean
* change one of GWT classes
* buck build //gerrit-gwtui:ui_opt
* buck build api_install

[1] https://github.com/facebook/buck/issues/469

Change-Id: I4212ac327acd27f33256c1ba1e86c0b098e07a93
This commit is contained in:
David Ostrovsky
2015-10-16 14:57:40 +02:00
parent e3721d1ab7
commit 1ae0210ab4
5 changed files with 15 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
include_defs('//gerrit-gwtui/gwt.defs')
include_defs('//tools/gwt-constants.defs')
DEPS = [
DEPS = GWT_TRANSITIVE_DEPS + [
'//gerrit-gwtexpui:CSS',
'//lib:gwtjsonrpc',
'//lib/gwt:dev',

View File

@@ -55,7 +55,7 @@ java_doc(
deps = DEPS + [
'//lib:gwtjsonrpc',
'//lib:gwtorm_client',
'//lib/gwt:dev__jar',
'//lib/gwt:dev',
'//gerrit-gwtui-common:client-lib',
'//gerrit-common:client',
'//gerrit-reviewdb:client',

View File

@@ -15,15 +15,6 @@ maven_jar(
id = 'com.google.gwt:gwt-dev:' + VERSION,
sha1 = 'c2c3dd5baf648a0bb199047a818be5e560f48982',
license = 'Apache2.0',
exported_deps = [
':javax-validation',
':javax-validation_src',
'//lib/ow2:ow2-asm',
'//lib/ow2:ow2-asm-analysis',
'//lib/ow2:ow2-asm-commons',
'//lib/ow2:ow2-asm-tree',
'//lib/ow2:ow2-asm-util',
],
attach_source = False,
exclude = ['org/eclipse/jetty/*'],
)
@@ -34,7 +25,7 @@ maven_jar(
bin_sha1 = 'b6bd7f9d78f6fdaa3c37dae18a4bd298915f328e',
src_sha1 = '7a561191db2203550fbfa40d534d4997624cd369',
license = 'Apache2.0',
visibility = [],
visibility = ['PUBLIC'],
)
maven_jar(
@@ -54,5 +45,5 @@ maven_jar(
id = 'org.javassist:javassist:3.18.1-GA',
sha1 = 'd9a09f7732226af26bf99f19e2cffe0ae219db5b',
license = 'Apache2.0',
visibility = [],
visibility = ['PUBLIC'],
)

View File

@@ -193,7 +193,7 @@ def gerrit_plugin(
gwt_binary(
name = name + '__gwt_application',
modules = [gwt_module],
deps = GWT_PLUGIN_DEPS + ['//lib/gwt:dev'],
deps = GWT_PLUGIN_DEPS + GWT_TRANSITIVE_DEPS + ['//lib/gwt:dev'],
module_deps = [':%s__gwt_module' % name],
local_workers = cpu_count(),
strict = True,

View File

@@ -12,3 +12,13 @@ GWT_PLUGIN_DEPS = [
'//gerrit-plugin-gwtui:gwtui-api-lib',
'//lib/gwt:user',
]
GWT_TRANSITIVE_DEPS = [
'//lib/gwt:javax-validation',
'//lib/gwt:javax-validation_src',
'//lib/ow2:ow2-asm',
'//lib/ow2:ow2-asm-analysis',
'//lib/ow2:ow2-asm-commons',
'//lib/ow2:ow2-asm-tree',
'//lib/ow2:ow2-asm-util',
]