Buck: Fix infinite loop when trying to build non-existing core plugins

Running `buck build plugins:core` before initialising the submodules
causes buck to throw FileNotFoundException and then go into an infinite
loop.

The genrule in the plugins' BUCK configuration has a check in the `cmd`
to make sure the required core plugins (`NEED`) exist, but it looks
like this gets evaluated after the `srcs` which is using `CORE`.

Change `srcs` to use `HAVE`.  Now buck will exit with an error when the
core plugins do not exist.

Bug: issue 2343
Change-Id: I1bc2f67bcf6aacfe553c00e54fff18f959ac4b79
This commit is contained in:
David Pursehouse 2013-12-16 16:22:28 +09:00
parent 4f00f41dc3
commit 7fcd202680

View File

@ -30,7 +30,7 @@ genrule(
'for s in $SRCS;do ln -s $s $TMP/WEB-INF/plugins;done;' +
'cd $TMP;' +
'zip -qr $OUT .',
srcs = [genfile('%s/%s.jar' % (n, n)) for n in CORE],
srcs = [genfile('%s/%s.jar' % (n, n)) for n in HAVE],
deps = ['//%s/%s:%s' % (BASE, n, n) for n in HAVE],
out = 'core.zip',
visibility = ['//:release'],