From 7fcd20268057d2693d9872a75428cb2c3799db9b Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Mon, 16 Dec 2013 16:22:28 +0900 Subject: [PATCH] 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 --- plugins/BUCK | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/BUCK b/plugins/BUCK index 6440fb7320..16c65dab0f 100644 --- a/plugins/BUCK +++ b/plugins/BUCK @@ -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'],