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
Nothing specific in this version; just keeping up-to-date with
the latest head of the master branch.
Change-Id: I0d47f1eaf4e37e7e2e14fb926460fa0a75685913
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
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
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
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
New Buck version migrated start scripts from shell to python,
so we are getting closer to cross platform support.
Change-Id: I55153a5ab7511773dc4aefe97f174a863154a682
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
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
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
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
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
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
$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
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
$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
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
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
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
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
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
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