a283507bccbd408540ae1baf75eb80eb59dce031 disabled EditIteratorTest due
to gwt-test-utils uncompatibility with new GWT 2.6 release.
After fixing the compatibility problem in [1] the tests can be enabled
again.
[1] https://github.com/gwt-test-utils/gwt-test-utils/issues/62
Change-Id: I1f93e6422a1ae60d66f4d8b4abac23b6a1acb4f9
GWT 2.6.0 has Java 7 support and other new features [1].
Internal Jetty version, shipped with GWT was updated to 8.1. This
version collides with the version that is used internally by Gerrit
(9.1). To resolve the conflict, GWT's own Jetty version is stripped
from the gwt-dev.jar with maven_jar() method and Gerrit's own Jetty
used instead. Missing Jetty artifacts, needed for the GWT to run in
dev mode:
* jetty-webapp
* jetty-xml
are included now as dependency of gerrit-gwtdebug project.
New GWT version updates a number of dependencies that are used in
Gerrit [3]. Update them too.
EditIteratorTest test is failing with NSME Exception in gwt-test-utils
framework, so deactivate it for now [2].
[1] http://www.gwtproject.org/release-notes.html#Release_Notes_2_6_0_RC1
[2] https://code.google.com/p/gwt-test-utils/issues/detail?id=179
[3]
* Guava 15.0
* Protobuf 2.5.0
* ASM 4.1
Change-Id: I0fa96da6465d52febeae65168b0bd1c2913f6c7e
If the user terminates a build while the GWT compilation is
running, the wrapper script exits with a Python TraceBack.
Handle KeyboardInterrupt and exit gracefully with a message
to the stderr console.
Change-Id: I634b9e57e6ebcc85b4ed9627953f5900cd4ac44a
$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
The currently specified version is no longer available on the
repository.
Update the BUCK config to use the latest release.
Change-Id: I918ef3fe3f899d5ab4682114586084f99a324403
The SNAPSHOT version 0.45 doesn't exist anymore on the
specified repository. Switch to snapshot version 0.46.
Because of this bug calling "tools/eclipse/project.py"
didn't work properly. You have to delete your
~/.gerritcodereview/buck-cache to see this problem.
Change-Id: Ie249d6aedf30e579c90f3f457807ff84a3bdb110
Updated version of prettify: in addition to adding new syntax
highlighters, it appears to run much better in IE versions >8.
This would manifest as an unhandled JavaScript exception.
Additionally, formatting appeared to not work well in IE standards
mode and Safari because the @media selector was getting mangled
by GWT. This was fixed in an update to GWT 2.5.1.
Change-Id: Idcc095dac1007c6794e9f67fa12a92b01695d5cf
$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
Modfied lib/maven.defs so that maven_jar() is able to handle snapshot
builds.
Simplified the implementation of the advance() method in
EditIterator. Previously, the method was calling substring()
on the lines, which was unnecessary.
Change-Id: I3b00caa140539ae77605721d741afae75ae1448e
JettyDaemon invokes buck build to ensure GWT JS is up-to-date before
running the server. To be completely compatible with the command line
build it uses the same PATH environment variable, ignoring the PATH
that is inherited from Eclipse.
Including the PATH as part of the genrule() command ensures buck will
rewrite the properties file anytime the user modifies the PATH, rather
than only when there are updates to GWT Java sources.
Using a properties file frees us from worrying about double quoting in
shell: once in the genrule, again in the script itself.
Using a single properties file ensures any GWT UI can be computed or
verified by JettyDaemon. This change simplifies bootstrap for a
developer as they no longer need to build the UI before launching the
server from within Eclipse. JettyDaemon now takes care of it.
Change-Id: If096a60d9a3f9d6d1502cc947b966109b4458717
* Mostly involves changing print to be a function, and adding
"from __future__ import print_function" for copatibility.
Change-Id: I3129233726e0116a348753a2e2bb68806a08668c
Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
Implement a new build system using Buck[1], Facebook's
open source clone of Google's internal build system.
Pros:
- Concise build language
- Test and build output is concise
- Test failures and stack traces show on terminal
- Reliable incrementals; clean is unnecessary
- Extensible with simple blocks of Python
- Fast
buck: clean: 0.452s, full 1m21.083s [*], no-op: 7.145s,
mvn: clean: 4.596s, full 2m53.776s, no-op: 59.108s,
[*] full build includes downloading all dependencies,
time can vary due to remote server performance.
Cons:
- No Windows support
- No native Maven Central support (added by macros)
- No native GWT, Prolog, or WAR support (added by macros)
- Bootstrap of buck requires Ant
Getting started:
git clone https://gerrit.googlesource.com/buck
cd buck
ant
Mac OS X:
PATH="`pwd`/bin:/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands:$PATH"
Linux:
PATH="`pwd`/bin:$PATH"
Importing into Eclipse:
$ time buck build :eclipse
0m48.949s
Import existing project from `pwd`
Import 'gerrit' (do not import other Maven based projects)
Expand 'gerrit'
Right click 'buck-out' > Properties
Under Attributes check 'Derived'
If the code doesn't currently compile but an updated classpath
is needed, refresh the configs and obtain missing JARs:
$ buck build :eclipse_project :download
Running JUnit tests:
$ time buck test --all -e slow # skip slow tests
0m19.320s
$ time buck test --all # includes acceptance tests
5m17.517s
Building WAR:
$ buck build :gerrit
$ java -jar buck-out/gen/gerrit.war
Building release:
$ buck test --all && buck build :api :release
$ java -jar buck-out/gen/release.war
$ ls -lh buck-out/gen/{extension,plugin}-api.jar
Downloading dependencies:
Dependencies are normally downloaded automatically, but Buck can
inspect its graph and download missing dependencies so future
compiles can run without the network:
$ buck build :download
[1] http://facebook.github.io/buck/
Change-Id: I40853b108bd8e153cefa0896a5280a9a5ff81655