Buck: Fix source path generation for JGit cell
Due to Buck bug: [1] root cell name is neither preserved nor resolved in `buck audit classpath --dot` output and thus cannot be passed to Buck again. Add a hack and help Buck for now until the bug is fixed. * [1] https://github.com/facebook/buck/issues/656 Change-Id: I5973c1c7d81e51ba882c1f10658237a4c8e6a642
This commit is contained in:
committed by
David Pursehouse
parent
d114827b84
commit
5581ca5c77
@@ -19,6 +19,10 @@ 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 bug is fixed:
|
||||
# https://github.com/facebook/buck/issues/656
|
||||
JGIT = re.compile(r'//:ewah|//:jgit|//:junit')
|
||||
CELL = '//lib/jgit'
|
||||
|
||||
opts = OptionParser()
|
||||
opts.add_option('--src', action='store_true')
|
||||
@@ -31,6 +35,8 @@ for line in p.stdout:
|
||||
m = PAT.search(line)
|
||||
if m:
|
||||
n = m.group(1)
|
||||
if JGIT.match(n):
|
||||
n = CELL + n[2:]
|
||||
if args.src and n.endswith('__download_bin'):
|
||||
n = n[:-13] + 'src'
|
||||
targets.add(n)
|
||||
|
||||
Reference in New Issue
Block a user