Buck: Remove jgit cell
Cross cell support in Buck is considered as experimental feature, with number of open issues: [1], [2], [3]. Moreover, to make Maven Central machinery work, it was needed to create symbolic links in source tree. That broke `buck targets` feature. Remove it for now, and re-consider to add it later. [1] https://github.com/facebook/buck/issues/656 [2] https://github.com/facebook/buck/issues/658 [3] https://github.com/facebook/buck/issues/717 Bug: Issue 3954 Change-Id: Ic621a07771f926001df181b46b2169e214ce208a
This commit is contained in:
parent
c2eda8fae1
commit
08ea694499
@ -25,7 +25,7 @@
|
||||
src_roots = java, resources, src
|
||||
|
||||
[project]
|
||||
ignore = .git, eclipse-out, lib/jgit
|
||||
ignore = .git, eclipse-out
|
||||
parallel_parsing = true
|
||||
|
||||
[cache]
|
||||
@ -35,6 +35,3 @@
|
||||
[test]
|
||||
excluded_labels = manual
|
||||
|
||||
[repositories]
|
||||
jgit = lib/jgit
|
||||
|
||||
|
@ -14,9 +14,9 @@ DEPS = [
|
||||
'//lib/httpcomponents:httpclient',
|
||||
'//lib/httpcomponents:httpcore',
|
||||
'//lib/jetty:servlet',
|
||||
'//lib/jgit/org.eclipse.jgit.junit:junit',
|
||||
'//lib/log:impl_log4j',
|
||||
'//lib/log:log4j',
|
||||
'@jgit//org.eclipse.jgit.junit:junit',
|
||||
]
|
||||
|
||||
PROVIDED = [
|
||||
@ -30,9 +30,9 @@ PROVIDED = [
|
||||
'//gerrit-server:server',
|
||||
'//lib:gson',
|
||||
'//lib:jsch',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/mina:sshd',
|
||||
'//lib:servlet-api-3_1',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
]
|
||||
|
||||
java_binary(
|
||||
|
@ -33,8 +33,8 @@ java_library(
|
||||
'//lib/guice:guice-assistedinject',
|
||||
'//lib/guice:guice-servlet',
|
||||
'//lib/log:api',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/mina:sshd',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
],
|
||||
visibility = [
|
||||
'//gerrit-plugin-api/...',
|
||||
|
@ -8,8 +8,8 @@ java_library(
|
||||
'//lib:guava',
|
||||
'//lib:h2',
|
||||
'//lib/guice:guice',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/log:api',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
],
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
|
@ -21,9 +21,9 @@ gwt_module(
|
||||
'//gerrit-prettify:client',
|
||||
'//lib:guava',
|
||||
'//lib:gwtorm_client',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/joda:joda-time',
|
||||
'//lib/log:api',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
],
|
||||
provided_deps = ['//lib:servlet-api-3_1'],
|
||||
visibility = ['PUBLIC'],
|
||||
@ -41,9 +41,9 @@ java_library(
|
||||
'//lib:guava',
|
||||
'//lib:gwtjsonrpc',
|
||||
'//lib:gwtorm',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/joda:joda-time',
|
||||
'//lib/log:api',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
],
|
||||
provided_deps = ['//lib:servlet-api-3_1'],
|
||||
visibility = ['PUBLIC'],
|
||||
|
@ -8,8 +8,8 @@ DEPS = [
|
||||
'//lib/guice:guice',
|
||||
'//lib/guice:guice-assistedinject',
|
||||
'//lib/guice:guice-servlet',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/log:api',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
]
|
||||
|
||||
java_library(
|
||||
@ -50,7 +50,7 @@ java_test(
|
||||
'//lib:truth',
|
||||
'//lib/bouncycastle:bcpg',
|
||||
'//lib/bouncycastle:bcprov',
|
||||
'@jgit//org.eclipse.jgit.junit:junit',
|
||||
'//lib/jgit/org.eclipse.jgit.junit:junit',
|
||||
],
|
||||
source_under_test = [':gpg'],
|
||||
visibility = ['//tools/eclipse:classpath'],
|
||||
|
@ -64,7 +64,7 @@ java_test(
|
||||
':client',
|
||||
'//lib:junit',
|
||||
'//lib/gwt:user',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
],
|
||||
source_under_test = [':client'],
|
||||
vm_args = ['-Xmx512m'],
|
||||
|
@ -33,10 +33,10 @@ java_library(
|
||||
'//lib/guice:guice',
|
||||
'//lib/guice:guice-assistedinject',
|
||||
'//lib/guice:guice-servlet',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/jgit/org.eclipse.jgit.http.server:jgit-servlet',
|
||||
'//lib/log:api',
|
||||
'//lib/lucene:lucene-core-and-backward-codecs',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
'@jgit//org.eclipse.jgit.http.server:jgit-servlet',
|
||||
],
|
||||
provided_deps = ['//lib:servlet-api-3_1'],
|
||||
visibility = ['PUBLIC'],
|
||||
@ -69,9 +69,9 @@ java_test(
|
||||
'//lib/easymock:easymock',
|
||||
'//lib/guice:guice',
|
||||
'//lib/guice:guice-servlet',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/jgit/org.eclipse.jgit.junit:junit',
|
||||
'//lib/joda:joda-time',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
'@jgit//org.eclipse.jgit.junit:junit',
|
||||
],
|
||||
source_under_test = [':httpd'],
|
||||
# TODO(sop) Remove after Buck supports Eclipse
|
||||
|
@ -31,11 +31,11 @@ java_library(
|
||||
'//lib:gwtorm',
|
||||
'//lib/guice:guice',
|
||||
'//lib/guice:guice-assistedinject',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/log:api',
|
||||
'//lib/lucene:lucene-analyzers-common',
|
||||
'//lib/lucene:lucene-core-and-backward-codecs',
|
||||
'//lib/lucene:lucene-misc',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
],
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
|
@ -19,8 +19,8 @@ java_library(
|
||||
'//lib/commons:codec',
|
||||
'//lib/guice:guice',
|
||||
'//lib/guice:guice-servlet',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/log:api',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
],
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
|
@ -29,7 +29,7 @@ prebuilt_jar(
|
||||
|
||||
genrule(
|
||||
name = 'jgit_edit_src',
|
||||
cmd = 'unzip -qd $TMP $(location @jgit//org.eclipse.jgit:jgit_src) ' +
|
||||
cmd = 'unzip -qd $TMP $(location //lib/jgit/org.eclipse.jgit:jgit_src) ' +
|
||||
'org/eclipse/jgit/diff/Edit.java;' +
|
||||
'cd $TMP;' +
|
||||
'zip -Dq $OUT org/eclipse/jgit/diff/Edit.java',
|
||||
@ -46,7 +46,7 @@ java_library(
|
||||
],
|
||||
deps = [
|
||||
'//lib:gson',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
],
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
@ -56,8 +56,8 @@ java_test(
|
||||
srcs = glob(['src/test/java/**/*.java']),
|
||||
deps = [
|
||||
':server',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib:junit',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
],
|
||||
source_under_test = [':server'],
|
||||
visibility = ['//tools/eclipse:classpath'],
|
||||
|
@ -15,9 +15,9 @@ BASE_JETTY_DEPS = [
|
||||
'//lib/guice:guice',
|
||||
'//lib/guice:guice-assistedinject',
|
||||
'//lib/guice:guice-servlet',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/log:api',
|
||||
'//lib/log:log4j',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
]
|
||||
|
||||
DEPS = BASE_JETTY_DEPS + [
|
||||
@ -176,8 +176,8 @@ java_test(
|
||||
'//lib:junit',
|
||||
'//lib/easymock:easymock',
|
||||
'//lib/guice:guice',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
'@jgit//org.eclipse.jgit.junit:junit',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/jgit/org.eclipse.jgit.junit:junit',
|
||||
],
|
||||
source_under_test = [':pgm'],
|
||||
)
|
||||
|
@ -39,11 +39,11 @@ java_library(
|
||||
'//lib/guice:guice',
|
||||
'//lib/guice:guice-assistedinject',
|
||||
'//lib/guice:guice-servlet',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/jgit/org.eclipse.jgit.http.server:jgit-servlet',
|
||||
'//lib/joda:joda-time',
|
||||
'//lib/log:api',
|
||||
'//lib/mina:sshd',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
'@jgit//org.eclipse.jgit.http.server:jgit-servlet',
|
||||
],
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
|
@ -29,7 +29,7 @@ java_library(
|
||||
'//gerrit-reviewdb:server',
|
||||
'//lib:guava',
|
||||
'//lib:gwtjsonrpc',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
],
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
|
@ -59,6 +59,8 @@ java_library(
|
||||
'//lib/guice:guice',
|
||||
'//lib/guice:guice-assistedinject',
|
||||
'//lib/guice:guice-servlet',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/jgit/org.eclipse.jgit.archive:jgit-archive',
|
||||
'//lib/joda:joda-time',
|
||||
'//lib/log:api',
|
||||
'//lib/log:jsonevent-layout',
|
||||
@ -70,8 +72,6 @@ java_library(
|
||||
'//lib/ow2:ow2-asm-tree',
|
||||
'//lib/ow2:ow2-asm-util',
|
||||
'//lib/prolog:runtime',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
'@jgit//org.eclipse.jgit.archive:jgit-archive',
|
||||
],
|
||||
provided_deps = [
|
||||
'//lib:servlet-api-3_1',
|
||||
@ -98,12 +98,12 @@ TESTUTIL_DEPS = [
|
||||
'//lib:truth',
|
||||
'//lib/guice:guice',
|
||||
'//lib/guice:guice-servlet',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/jgit/org.eclipse.jgit.junit:junit',
|
||||
'//lib/joda:joda-time',
|
||||
'//lib/log:api',
|
||||
'//lib/log:impl_log4j',
|
||||
'//lib/log:log4j',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
'@jgit//org.eclipse.jgit.junit:junit',
|
||||
]
|
||||
|
||||
TESTUTIL = glob([
|
||||
|
@ -24,12 +24,12 @@ java_library(
|
||||
'//lib/guice:guice',
|
||||
'//lib/guice:guice-assistedinject',
|
||||
'//lib/guice:guice-servlet', # SSH should not depend on servlet
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/jgit/org.eclipse.jgit.archive:jgit-archive',
|
||||
'//lib/log:api',
|
||||
'//lib/log:log4j',
|
||||
'//lib/mina:core',
|
||||
'//lib/mina:sshd',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
'@jgit//org.eclipse.jgit.archive:jgit-archive',
|
||||
],
|
||||
provided_deps = [
|
||||
'//lib/bouncycastle:bcprov',
|
||||
|
@ -15,7 +15,7 @@ java_library(
|
||||
'//lib:guava',
|
||||
'//lib:servlet-api-3_1',
|
||||
'//lib/httpcomponents:httpclient',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
],
|
||||
visibility = ['PUBLIC'],
|
||||
)
|
||||
|
@ -23,8 +23,8 @@ java_library(
|
||||
'//lib:gwtorm',
|
||||
'//lib/guice:guice',
|
||||
'//lib/guice:guice-servlet',
|
||||
'//lib/jgit/org.eclipse.jgit:jgit',
|
||||
'//lib/log:api',
|
||||
'@jgit//org.eclipse.jgit:jgit',
|
||||
],
|
||||
provided_deps = ['//lib:servlet-api-3_1'],
|
||||
visibility = [
|
||||
|
@ -1,7 +0,0 @@
|
||||
[cache]
|
||||
mode = dir
|
||||
dir = ~/.gerritcodereview/buck-cache/locally-built-artifacts
|
||||
|
||||
[repositories]
|
||||
jgit = .
|
||||
|
1
lib/jgit/.gitignore
vendored
1
lib/jgit/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/buck-out
|
@ -1,6 +0,0 @@
|
||||
include_defs('//lib/maven.defs')
|
||||
|
||||
define_license(name = 'Apache2.0')
|
||||
define_license(name = 'jgit')
|
||||
|
||||
define_license(name = 'DO_NOT_DISTRIBUTE')
|
@ -1 +0,0 @@
|
||||
../../JGIT_VERSION
|
@ -1 +0,0 @@
|
||||
../../LICENSE-Apache2.0
|
@ -1 +0,0 @@
|
||||
../../LICENSE-DO_NOT_DISTRIBUTE
|
@ -1 +0,0 @@
|
||||
../../LICENSE-jgit
|
@ -1 +0,0 @@
|
||||
../../maven.defs
|
@ -7,7 +7,7 @@ maven_jar(
|
||||
sha1 = 'c065b765aac56cdbe531634fdfd829a6ce8bbd0c',
|
||||
license = 'jgit',
|
||||
repository = REPO,
|
||||
deps = ['@jgit//org.eclipse.jgit:jgit'],
|
||||
deps = ['//lib/jgit/org.eclipse.jgit:jgit'],
|
||||
unsign = True,
|
||||
exclude = [
|
||||
'about.html',
|
||||
|
@ -7,7 +7,7 @@ maven_jar(
|
||||
sha1 = '516925ff0df67705e368c905a910ed982655cc32',
|
||||
license = 'jgit',
|
||||
repository = REPO,
|
||||
deps = ['@jgit//org.eclipse.jgit:jgit'],
|
||||
deps = ['//lib/jgit/org.eclipse.jgit:jgit'],
|
||||
unsign = True,
|
||||
exclude = [
|
||||
'about.html',
|
||||
|
@ -8,5 +8,5 @@ maven_jar(
|
||||
license = 'DO_NOT_DISTRIBUTE',
|
||||
repository = REPO,
|
||||
unsign = True,
|
||||
deps = ['@jgit//org.eclipse.jgit:jgit'],
|
||||
deps = ['//lib/jgit/org.eclipse.jgit:jgit'],
|
||||
)
|
||||
|
@ -1 +0,0 @@
|
||||
../../../tools/BUCK
|
@ -1 +0,0 @@
|
||||
../../../tools/__init__.py
|
@ -1 +0,0 @@
|
||||
../../../tools/download_file.py
|
@ -1 +0,0 @@
|
||||
../../../tools/merge_jars.py
|
@ -1 +0,0 @@
|
||||
../../../tools/pack_war.py
|
@ -1 +0,0 @@
|
||||
../../../tools/util.py
|
@ -1 +0,0 @@
|
||||
../../../tools/util_test.py
|
@ -19,11 +19,6 @@ from subprocess import check_call, CalledProcessError, Popen, PIPE
|
||||
|
||||
MAIN = ['//tools/eclipse:classpath']
|
||||
PAT = re.compile(r'"(//.*?)" -> "//tools:download_file"')
|
||||
# TODO(davido): Remove this hack when Buck bugs are fixed:
|
||||
# https://github.com/facebook/buck/issues/656
|
||||
# https://github.com/facebook/buck/issues/658
|
||||
JGIT = re.compile(r'//org.eclipse.jgit.*')
|
||||
CELL = '//lib/jgit'
|
||||
|
||||
opts = OptionParser()
|
||||
opts.add_option('--src', action='store_true')
|
||||
@ -36,8 +31,6 @@ for line in p.stdout:
|
||||
m = PAT.search(line)
|
||||
if m:
|
||||
n = m.group(1)
|
||||
if JGIT.match(n):
|
||||
n = CELL + n[1:]
|
||||
if args.src and n.endswith('__download_bin'):
|
||||
n = n[:-13] + 'src'
|
||||
targets.add(n)
|
||||
|
@ -131,8 +131,7 @@ def gen_classpath():
|
||||
continue
|
||||
|
||||
m = java_library.match(p)
|
||||
# Don't grab the cross-cell JGit libraries as source
|
||||
if m and not m.group(1).startswith('org.eclipse.jgit'):
|
||||
if m:
|
||||
src.add(m.group(1))
|
||||
else:
|
||||
lib.add(p)
|
||||
|
@ -28,7 +28,6 @@ args, ctx = opts.parse_args()
|
||||
|
||||
war = args.tmp
|
||||
jars = set()
|
||||
basenames = set()
|
||||
|
||||
def prune(l):
|
||||
return [j for e in l for j in e.split(':')]
|
||||
@ -37,19 +36,10 @@ def link_jars(libs, directory):
|
||||
makedirs(directory)
|
||||
for j in libs:
|
||||
if j not in jars:
|
||||
# When jgit is consumed from its own cell,
|
||||
# potential duplicates should be filtered.
|
||||
# e.g. jsch.jar will be reached through:
|
||||
# 1. /home/username/projects/gerrit/buck-out/gen/lib/jsch.jar
|
||||
# 2. /home/username/projects/jgit/buck-out/gen/lib/jsch.jar
|
||||
if (j.find('jgit/buck-out/gen/lib') > 0
|
||||
and path.basename(j) in basenames):
|
||||
continue
|
||||
jars.add(j)
|
||||
n = path.basename(j)
|
||||
if j.find('buck-out/gen/gerrit-') > 0:
|
||||
n = j[j.find('buck-out'):].split('/')[2] + '-' + n
|
||||
basenames.add(n)
|
||||
symlink(j, path.join(directory, n))
|
||||
|
||||
if args.lib:
|
||||
|
Loading…
Reference in New Issue
Block a user