35 Commits

Author SHA1 Message Date
David Ostrovsky
22be3f0256 Update Buck to newest version
The latest Buck version added support to long awaited feature: ability
to specify "..." syntax used for target visibility to target selection
from the command line: [1], e.g.:

  $ buck build gerrit-server/...
  $ buck test gerrit-server/...

[1] https://github.com/facebook/buck/issues/294

Change-Id: I7ce804b1c86fa483fbfe0b50b86892ae9e5e4c7a
2015-05-10 20:03:16 +02:00
David Ostrovsky
93de246461 Update Buck to newest version
Most recent version fixed critical bugs that prevent Gerrit build on
other platform: [1], [2].

[1] https://github.com/facebook/buck/issues/248
[2] https://github.com/facebook/buck/issues/265

Change-Id: Ie283140a73967ba763c13a78abe6ff04183ed480
2015-03-07 23:03:15 +01:00
David Ostrovsky
dea43ec975 Update Buck to newest version
Most recent version fixed critical bugs that prevent Gerrit build on
other platform: [1], [2].

[1] https://github.com/facebook/buck/issues/248
[2] https://github.com/facebook/buck/issues/250

Change-Id: Ibe3bfc421b24941a09682e97337e750f69d50a00
2015-03-03 21:51:39 +01:00
David Pursehouse
2ecf23c68a Update buck to latest version
This version fixed some issues for building Gerrit on other platforms:
[1], [2].

[1] https://github.com/facebook/buck/issues/243
[2] https://github.com/facebook/buck/issues/247

Change-Id: Id4db98ab747fa7c4d35a8e04f67d025916eec71e
2015-02-18 23:08:10 +00:00
David Pursehouse
0b9b1c78bc Update buck to latest version
Nothing specific in this version; just keeping up-to-date with
the latest head of the master branch.

Change-Id: I0d47f1eaf4e37e7e2e14fb926460fa0a75685913
2015-01-21 08:29:26 +00:00
David Ostrovsky
925b71fe6a Update Buck to recent version
Recent Buck version fixed missing colors in Buck output bug [1].

[1] https://github.com/facebook/buck/issues/235

Change-Id: Ic618cd17bbbc2452b4f91bef4a1d7c78bf6dc34a
2015-01-12 19:01:22 +00:00
David Ostrovsky
80babfe985 Update Buck to recent version
Nothing special about this version, just to keep track with newest Buck
version.

Change-Id: I253eb90d7772a1b41e69a095ad7c3ea755f6526b
2014-12-17 22:41:02 +01:00
David Ostrovsky
38828ed860 Update Buck to recent version
This version fixes this bug [1] that allows us to eliminate these ugly
shell backticks and switch again to escaped macro like invocations:

  \$(dirname $OUT)

[1] https://github.com/facebook/buck/issues/212

Change-Id: Ie43b3ff6dfc89c4d840f2ff75c64ac0a5c6346b6
2014-10-30 21:54:51 +01:00
David Ostrovsky
7fc13dca82 Buck: upgrade to recent version
This version fixes a critical bug [1] that prevents us from simplifying
bucklets intergration. In this version, Buck only allows defining new
rule functions in files included with include_defs, not actually
instantiating rules, so we need to reshuffle some rules.

After this commit [2] "$(macro ...)" syntax is preserved for buck
macros, we need to use a backslash to send commands directly to the
shell: "\$(macro ...)". It turns out this doesn't work yet, shell
backticks seem to work though [3].

[1] https://github.com/facebook/buck/issues/182
[2] d6f3252170
[3] https://github.com/facebook/buck/issues/212

Change-Id: Ie99757bafc626d4ac2c5a75a2983d91b0c4f6d24
2014-10-27 20:13:42 +00:00
David Pursehouse
c56903d526 Update buck
There's nothing specifically that we need in this version, but it
includes my patch:

  Improve error messages when build target parse preconditions fail

Change-Id: I93b960fd19ee334aa95b3c27332997bec74fcd85
2014-09-11 11:08:11 +02:00
David Ostrovsky
0ff53a4a42 Update Buck
New buck version added native support for python_test() rule, so that
our home made java_test() wrapper around python unittest framework is
not needed any more.

Change-Id: If7bae742b7f22a994c5237fb161a35f3f33aaa80
2014-09-01 02:57:52 +00:00
David Ostrovsky
52dc89cf2c Update Buck
New Buck version migrated start scripts from shell to python,
so we are getting closer to cross platform support.

Change-Id: I55153a5ab7511773dc4aefe97f174a863154a682
2014-08-20 21:51:26 +02:00
David Ostrovsky
6406e7be6b Update Buck
This version makes test coverage tool JaCoCo work in the wild [1].

[1] ab0133d576

Change-Id: I497bd5e5a88bdda1ea6b3766d199d62cb73318ed
2014-08-13 10:51:02 +02:00
Dave Borowitz
f25f54ba1e Update Buck
This version contains a fix for a watchman/buckd integration issue[1]
producing incorrect builds.

Change-Id: I56cdc9f55f605849dcfd74a4c5359481e3c2c860
2014-08-06 13:34:48 -07:00
Shawn Pearce
3bfca9ed0e Update Buck
Buck no longer accepts duplicate deps. One test listed a library
that is always included for tests and can be safely dropped.

Buck does not accept duplicate resources, which happens with
gwt_module() loading in srcs, resources and gwt_xml. Convert
to a set and back to a list to remove duplicates transparently.

Change-Id: I0e450ef376040e8fa315ca17ab62a5cebbaf1d67
2014-08-01 09:24:52 -07:00
David Ostrovsky
530a4c3e75 Update Buck
Highlight of the new version is the fact, that "--all" parameter is
now optional in:

   buck test

Change-Id: Iecfc4629d056b9860f3cce82c3d7ad7600c77267
2014-06-24 20:40:48 +00:00
David Ostrovsky
e227086f24 Update Buck
Update to the version with expand user home directory feature in
cache directory name [1], [2].

[1] https://github.com/facebook/buck/issues/120
[2] https://github.com/facebook/buck/commit/\
a1ba00118666c39f87354e3c0f2226e6f87c6970

Change-Id: Ib20eb7fee2a692f44c6899e954ca8d70d8eae2a1
2014-06-12 05:57:25 +00:00
David Ostrovsky
a607a784e3 Update Buck
Number of bugs were fixed in recent Buck version:

* java_binary: manifest_file rejects target name as input [1]
* java_binary: optionally suppress manifest merging from dependent
JARs [2]
* java_library(): changing deps to provided_deps doesn't trigger
library rebuild [3]
* genrule: Make deps to $(exe :foo) and $(location :bar) implicitly
[4]

[1] https://github.com/facebook/buck/issues/126
[2] https://github.com/facebook/buck/pull/87
[3] https://github.com/facebook/buck/issues/133
[4] https://github.com/facebook/buck/issues/128

Change-Id: I8fb9f57676eac242b54892a50d90773bfc5cb0c0
2014-06-10 02:37:50 +02:00
Shawn Pearce
06e069cfcc Update Buck and use gwt_binary()
Migrate gwt build tool chain to built in gwt_binary() rule [1].

[1] https://github.com/facebook/buck/issues/109

Change-Id: I1f13f4d29864bc7e7278f8a2b2e39c882acf44aa
2014-05-19 11:41:31 -07:00
Shawn Pearce
334997292c Update Buck
java_library() now accepts provided_deps argument which replaces
our custom use of java_library2().

This change replaces compile_deps with provided_deps parameter in
gerrit_{plugin,extension} rules. Plugins that are using it must be
updated.

Change-Id: I16d53793da567c958267f91ca203e9cae6c4d02f
2014-05-04 12:54:17 +02:00
David Ostrovsky
3b4019d1ad Buck: Adjust to upstream change: "default java targeted to be Java 7"
60efceb upstream change flips the default version of java targeted to be
Java 7 rather than the EoL'd Java 6.  Now we don't need to overwrite
Buck's own python methods to enforce Java 7 to be the default Java version.

[1] 60efceb523

Change-Id: I8735dc0bec74c55c88ddcd07fe035536e7f0ceff
2014-04-22 08:08:30 +02:00
David Pursehouse
2fc609be42 Update buck to latest upstream version
This version includes the `--test-selectors` option on `buck test`.

The options allow to select tests to run by name, using a class#method
syntax. All other tests will not be run and test result caching is
disabled.

Change-Id: I01e6072ede4823cd0d12a62a6feec3f0d82f34a3
2014-03-24 18:26:35 +00:00
Shawn Pearce
4e1a8bc63d Update Buck
Buck changed export_deps from a boolean to be exported_deps, a list of
dependencies that are to be added to deps and also exported.  This
allows libraries to have dependencies for implementation use only, but
not expose them to callers for linkage.

exported_deps aren't transparently transitive anymore.  This mostly
impacts the plugin-api:lib rule.

This is the first time Gerrit is using upstream Buck with no patches.

- Java memory settings for Buck can now be supplied in a project
  specific file using `.buckjavaargs` in the root directory.  The file
  replaces the `.buckrc` previously supported by Gerrit's fork.

- Temporary directories for java_application() invoked from genrule()
  is now supplied as part of the arguments using $TMP.  This removes
  one of the patches Gerrit had for Buck.

- Unit tests use the system temporary directory during testing.  This
  can be faster if the temporary directory is a tmpfs.  Unfortunately
  not all passing tests clean up after themselves, making it possible
  to exhaust system memory and swap with useless tmpfs contents.
  Using the system temporary directory for tests removes another patch
  Gerrit had on top of Buck.

Change-Id: I3a9fe4aab0a33a8673df727e618122027a742638
2013-11-29 10:50:59 -08:00
Shawn Pearce
88884a9593 Update Buck
Upstream fixed a bug allowing java_library() to include its prior
build result on the classpath of a future build, leading to confusing
or potentially incorrect results when classes are deleted.

Change-Id: I5333d9d919a9886f1613772ace8bf0724ad51009
2013-11-05 21:38:53 +00:00
Shawn Pearce
55583ac43e Update buck
$TMP, $DEPS, $SRCS, $OUT are no longer supplied by Buck in the
environment unless they appear in the command line.  Pass $TMP
where it was assumed to be magically supplied. This allows steps
to continue to use buck-out/gen/ for temporary storage instead of
polluting the system /tmp.

Change-Id: Iea8380e5f93fa16ec77457eb76404832bde93a39
2013-10-18 17:06:56 +00:00
Shawn Pearce
b9c0db1ca6 Update Buck
Change-Id: Ie2084a75622c53e11ce0c8170241d54f8f4ce72d
2013-09-26 16:33:09 -07:00
Shawn Pearce
a7a3ee1e3a Update Buck to latest master
genrule() no longer supports running commands run only for the
side-effect with no output file. Actions like download_sources or
eclipse need to be handled using Python scripts executed from the
user's shell, otherwise Buck fails if caching is enabled.

Change-Id: I361fc20675f211e15e4ab7942ef52778d0a615c2
2013-09-20 19:41:26 -07:00
Shawn Pearce
627a250c72 Update Buck
$DEPS is now funny, it is an unexpanded string using the shell
variable $GEN_DIR. Upstream buck suggests using $(eval echo $DEPS)
to access the string value as $DEPS will not expand to the complete
file paths.

Instead of using eval modify our only use of $DEPS inside of the
GWT compiler helper to replace $GEN_DIR at the start of a string
with the value from the environment.

The JUnit support in Buck was updated recently and PrologTestCase
is being identified as a test to run. Rename its execution method
to prevent it from being identified as a test and push real call
down into the concrete base class.

Change-Id: Ic7e119cd26e72ee95e155e8507785c77b7692acf
2013-08-15 17:25:45 +00:00
Shawn Pearce
980b51f64e Fix path used in generated prolog class names
Force relative paths by passing the Prolog compiler only a relative
name from within $SRCDIR.  This avoids picking up the user's $HOME
path as part of the generated class file names, and prevents build
failures on filesystems where individual path components are limited
to 256 bytes.

Change-Id: I43f2a93daf857413401f4e1aeb24b9b2a8c741fe
2013-08-06 17:32:43 -07:00
Shawn Pearce
957e6a5a1d Update Buck to latest version
A new console display prints out the activity of each thread
as the build runs, allowing developers to see where the build
is bottlenecked in real time.

Change-Id: I83a94fb56c2ebf794557a03cc9680cb8dfe6e3d4
2013-08-05 19:53:46 -07:00
Shawn Pearce
11d27c8ee8 Update Buck
Latest version of buck is faster than the prior version used by
Gerrit.  No-op updates when loading a debug version of the UI now take
only 1.804s on my laptop (previously 7s) and a draft UI compile is
only 24.659s (previously 39s).

The slow acceptance tests must now be excluded with `--exclude slow`.
Buck changed the meaning of the -e option to be --emulator, which is
unfortunately useful only for Android application developers.

genrule() now needs to use $(exe) to reference the binary to run,
offers $(location) to make it easier to find files in the build tree.

The empty srcs array is no longer required for genrule().  Buck has
determined it is sufficiently powerful with $(location) and deps that
requiring srcs is unnecessary.

Supporting .src.zip files in the srcs array of java_library() means
Gerrit no longer needs to run a separate genrule() to extract files
produced by ANTLR, or call javac inside of the BuckPrologCompiler
support glue.

Change-Id: Ib03042921a081b867a7aad0423bd45523e42917a
2013-07-26 18:11:51 -07:00
Shawn Pearce
1b84902e47 Update buck to gerrit/a3aadacd
Change-Id: I6434a571931cfdbffdec1183f39c9492ad81867a
2013-06-14 12:47:51 -07:00
Shawn Pearce
2c58882623 Upgrade buck to gerrit/410fcf34
Buck upstream now supports a daemon mode[1] which allows BUILD
files to be cached across invocations. This saves considerable
time on startup, especially for no-op incremental builds:

  no-op without buckd:  10.6s
  no-op with    buckd:   5.2s

However the current daemon implementation is insecure. Users
should only run it on dedicated machines where they trust all
other running processes.

Buck now requires Java 7. If it is missing the build will fail.

[1] http://facebook.github.io/buck/command/buckd.html
Change-Id: I55dec63e467f8f4db5a799296fb7f588ce4b2aa1
2013-05-30 13:56:50 +00:00
Shawn Pearce
1aa7494673 Upgrade buck to gerrit/b01f03b8
Upstream buck 4c5ff21ab6bb1dad6c336b9c8d833e90cfef0868 plus
Shawn's four patches required by the Gerrit build process:

  b01f03b genrule() should fail if any command fails
  3b35ed0 Supply temporary directory to genrule() invoked java_binary()
  f6e4b0a Supply temporary directory to java_test()
  ab7fea3 Reset compressed size when combining JAR/ZIP archives

Change-Id: Ibdd91a1583476346afd2622522ae55c5f41eb00e
2013-05-22 08:36:13 -07:00
Shawn Pearce
bd5629718f Update buck build for strict dependencies
java_library() targets must now list every dependency they need for
an import. This permits buck to run more targets in parallel as it
has a better view of the dependency graph, and opens the door for
buck to make even more optimizations in the future.

Change-Id: I132bf47a725e44ba5950ba6ca76bfa72c3876906
2013-05-16 01:14:27 +00:00