Update Buck to latest version

This version fixed a major issue: [1] that was a reason of frustration
of many plugin developers: Not cache sources files under symbolic link.
Now for all such source files, the warning is issued:

"
Disabling caching for target //plugins/wip:wip__plugin, because one or
more input files are under a symbolic link
({plugins/wip=/home/davido/projects/wip}). This will severely impact
performance! To resolve this, use separate rules and declare
dependencies instead of using symbolic links.
"

To suppress this warning we add project.allow_symlink option. This
doesn't have any impact for gerrit core but silences the warning above
when plugins are built in gerrit tree mode.

As pointed out in this issue: [2], we are using some artifacts as source
to the java_library() rule as well as binary_jar for prebuilt_ja rule.
To avoid the warning, we rename sources to have "-sources.jar" suffix
and we rename *.zip to end with .jar in other places.

"
Assuming edit.src.zip is a JAR and renaming to edit.src.jar in
//gerrit-patch-jgit:edit_src. Change the extension of the binary_jar to
'.jar' to remove this warning.
"

source_under_test attribute was removed from java_test() rule.
Replication and cookbook-plugin are updated as well.

local.properties support was removed, but we use it only for download
process customization in our own python script, so that we can keep it
usage and not need to move it to .buckconfig.local.

[1] https://github.com/facebook/buck/issues/341
[2] https://github.com/facebook/buck/issues/855

Change-Id: Idf76cc71c21df43e808179b645f9175767b322a8
This commit is contained in:
David Ostrovsky 2016-09-19 09:42:21 +02:00 committed by David Pursehouse
parent 66077df75c
commit 0b774c478e
22 changed files with 6 additions and 28 deletions

View File

@ -24,6 +24,7 @@
target_level = 8
[project]
allow_symlinks = allow
ignore = .git, eclipse-out, bazel-gerrit
parallel_parsing = true

View File

@ -1 +1 @@
e64a2e2ada022f81e42be750b774024469551398
fd3105a0b62899f74662f4cdc156de6990bdc24c

View File

@ -3,6 +3,5 @@ include_defs('//gerrit-acceptance-tests/tests.defs')
acceptance_tests(
group = 'pgm',
srcs = glob(['*IT.java']),
source_under_test = ['//gerrit-pgm:pgm'],
labels = ['pgm'],
)

View File

@ -3,6 +3,5 @@ load('//gerrit-acceptance-tests:tests.bzl', 'acceptance_tests')
acceptance_tests(
group = 'pgm',
srcs = glob(['*IT.java']),
source_under_test = ['//gerrit-pgm:pgm'],
labels = ['pgm'],
)

View File

@ -11,7 +11,6 @@ def acceptance_tests(
flaky = 0,
deps = [],
labels = [],
source_under_test = [], #unused
vm_args = ['-Xmx256m']):
junit_tests(
name = group,

View File

@ -8,7 +8,6 @@ def acceptance_tests(
srcs,
deps = [],
labels = [],
source_under_test = [],
vm_args = ['-Xmx256m']):
from os import path
if path.exists('/dev/urandom'):
@ -20,11 +19,6 @@ def acceptance_tests(
deps = deps + BOUNCYCASTLE + [
'//gerrit-acceptance-tests:lib'
],
source_under_test = [
'//gerrit-httpd:httpd',
'//gerrit-sshd:sshd',
'//gerrit-server:server',
] + source_under_test,
labels = labels + [
'acceptance',
'slow',

View File

@ -62,7 +62,6 @@ java_test(
'//lib:guava',
'//lib:junit',
],
source_under_test = [':client'],
)
java_test(

View File

@ -67,7 +67,6 @@ java_test(
'//lib:truth',
'//lib/guice:guice',
],
source_under_test = [':api'],
)
java_doc(

View File

@ -52,6 +52,5 @@ java_test(
'//lib/bouncycastle:bcprov',
'//lib/jgit/org.eclipse.jgit.junit:junit',
],
source_under_test = [':gpg'],
visibility = ['//tools/eclipse:classpath'],
)

View File

@ -80,7 +80,6 @@ java_test(
'//lib/gwt:user',
'//lib/gwt:dev',
],
source_under_test = [':SafeHtml'],
)
gwt_module(

View File

@ -66,7 +66,6 @@ java_test(
'//lib/gwt:user',
'//lib/jgit/org.eclipse.jgit:jgit',
],
source_under_test = [':client'],
vm_args = ['-Xmx512m'],
visibility = ['//tools/eclipse:classpath'],
)

View File

@ -62,7 +62,6 @@ java_test(
'//lib/gwt:dev',
'//lib/gwt:user',
],
source_under_test = [':ui_module'],
vm_args = ['-Xmx512m'],
visibility = ['//tools/eclipse:classpath'],
)

View File

@ -73,7 +73,6 @@ java_test(
'//lib/jgit/org.eclipse.jgit.junit:junit',
'//lib/joda:joda-time',
],
source_under_test = [':httpd'],
# TODO(sop) Remove after Buck supports Eclipse
visibility = ['//tools/eclipse:classpath'],
)

View File

@ -33,7 +33,7 @@ genrule(
'org/eclipse/jgit/diff/Edit.java;' +
'cd $TMP;' +
'zip -Dq $OUT org/eclipse/jgit/diff/Edit.java',
out = 'edit.src.zip',
out = 'edit-sources.jar',
)
java_library(
@ -61,6 +61,5 @@ java_test(
'//lib/jgit/org.eclipse.jgit:jgit',
'//lib:junit',
],
source_under_test = [':server'],
visibility = ['//tools/eclipse:classpath'],
)

View File

@ -180,5 +180,4 @@ java_test(
'//lib/jgit/org.eclipse.jgit:jgit',
'//lib/jgit/org.eclipse.jgit.junit:junit',
],
source_under_test = [':pgm'],
)

View File

@ -33,6 +33,5 @@ java_test(
'//lib:gwtorm',
'//lib:truth',
],
source_under_test = [':client'],
visibility = ['//tools/eclipse:classpath'],
)

View File

@ -181,7 +181,6 @@ java_test(
'//gerrit-server/src/main/prolog:common',
'//lib/antlr:java_runtime',
],
source_under_test = [':server'],
)
java_test(
@ -208,6 +207,5 @@ java_test(
'//lib/guice:guice-assistedinject',
'//lib/prolog:runtime',
],
source_under_test = [':server'],
visibility = ['//tools/eclipse:classpath'],
)

View File

@ -56,5 +56,4 @@ java_test(
'//lib:truth',
'//lib/mina:sshd',
],
source_under_test = [':sshd'],
)

View File

@ -34,7 +34,6 @@ java_test(
'//lib:truth',
'//lib/easymock:easymock',
],
source_under_test = [':http'],
# TODO(sop) Remove after Buck supports Eclipse
visibility = ['//tools/eclipse:classpath'],
)

@ -1 +1 @@
Subproject commit de2d4d7e7222e1f8b286ea13b316f77fae9ee878
Subproject commit 60449ddf39a533ab7184d8b9d72648c9f3505e52

@ -1 +1 @@
Subproject commit a592cc0cb61ef309f21669c037ee6689780a6d89
Subproject commit 9411b6d9d37fbbd9a6bb98307bcb8f4f47c58f37

View File

@ -201,7 +201,7 @@ def gerrit_plugin(
':%s__gwt_application' % name +
';cd $TMP' +
';zip -qr $OUT .',
out = '%s-static.zip' % name,
out = '%s-static.jar' % name,
)
gwt_binary(
name = name + '__gwt_application',