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
Store a library of configs to be used as the base gerrit.config during
tests. Specify at a per-acceptance_tests-rule level which of these
configs to generate rules for, passing in the config file via a system
property in a new rule named based on the config file name.
Include two additional labels for each test, "acceptance_config" and
"config_<name>", for including and excluding specific configs or all
non-default configs.
This preserves the behavior of running a single test class per VM, at
the cost of making it harder to run tests with nonstandard configs
from Eclipse. For that, developers can create custom run
configurations with different VM args passing the appropriate -D.
Change-Id: If29bcba26ac271479a63da836008b0f6608a1b6c
The naming of the test site is inconsistent in the documentation. Some
parts refer to `gerrit_testsite` while other parts, and the default
debug configurations, refer to `test_site`.
Update the documentation and debug configs to use `gerrit_testsite`.
Change-Id: I5b1fb5c9dcc6c9a39e7d95e88d4e0ea9df384b09
Plugin code is often loaded into the workspace in Eclipse, and is
therefore part of the default project path. Detect this at startup
time by looking for gerrit.buck-out system property and building a
new classpath consisting only of the primary classes and JARs.
The GWT compiler, tests and plugins are excluded from the classpath,
preventing weird collisions with the dynamically loaded plugins from
$site_path/plugins.
PluginLoader recognizes the split output directory used by Eclipse and
loads the latest classes files ahead of anything from the JAR in
$site_path/plugins. This makes development of most code changes quick
by hiding the staleness of the installed JAR.
Change-Id: I4b879eebbcb332384c4e747d3f0c4b5c948c5fed
Configure Eclipse to compile/copy each plugin's classes and resources
into its own private classes folder. This should fix the duplicate
resource warnings for about.md or other documentation and static image
assets.
Move test and utility classes into their own directories too. This
has no real impact on the runtime classpath at this time, but opens
the door to do something more creative later.
Change-Id: If2a048dfe0349f671a17f9e80d6f22a69a5c0ade
Use the same permutation selector applied by the server at runtime to
automatically detect the browser making the request and build/refresh
that UI permutation.
Change-Id: I31603a80e23a8e4e2c46325be4dac808d8f98a5c
In bb360ebe the target '//gerrit-plugin-gwtui:client' was renamed to
'//gerrit-plugin-gwtui:gwtui-api', but the 'tools/eclipse/BUCK' and
'tools/gwt-constants.defs' files were not updated to use it, thus
running 'tools/eclipse/project' failed with a "No such build target"
error.
Change-Id: I72307de9bac2484722b666ac0f5d0c0bb99b3906
Jetty 9 was built with compiler settings producing class files that
are not recognized by Java 6 runtimes.
Gerrit 2.9 will require Java 7 as its minimum runtime version.
Change-Id: Ifed3f9e07bf77a7a737b16c20e6e400acd990649
The documentation of this endpoint is available in
rest-api-docsearch[.txt|.html].
The UI of showing the search result and doing the search will be in a
separate change.
Change-Id: Ifa4f5a7d576ada7f88a4fa1b765a38cba6d7e964
Pressing Ctrl-C during the build results in an ugly Python
TraceBack.
Add handling of KeyboardInterrupt and print a useful message.
This fixes most cases, but there are still a few TraceBacks
coming from inside Buck. These will need to be fixed upstream.
Change-Id: I3f0dc19f3be599460a2a6409642a70a195b50753
Having these in the classpath permits the sources to be modified
in Eclipse just like any other Java source file.
Change-Id: I6256f5db793dd056a61e934720cb40056d50cfd0
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
It does not appear to be necessary to include either $OUT or $DEPS
in the command line when building the project and classpath files
for Eclipse. Omit these as $DEPS is starting to be deprecated by
Buck and will eventually disappear.
Change-Id: I40f9a357dfa8114efaf0212bd1ff4cb51197b67f
Buck runs tests in parallel based on the targets declared in BUCK
files. Making each test its own target allows the tests to run in
parallel in separate JVMs. Parallel execution enables slow acceptance
tests to take less wall clock time when multiple cores are available.
Acceptance tests leak an entire server environment for every @Test
method run. Fragmenting the tests into units allows them to be
garbage collected by the operating system when the test JVM dies.
This avoids stressing the Java GC with lots of garbage as more tests
pile into the finite heap space.
With this change and the newer version of buck, a clean build and
execution of all tests takes my laptop only 1m25s to execute when
running on battery.
Change-Id: Ia3f689a9e6ca6c620026cc720ccca924387e1363
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
While we support both Buck and Maven, these names are confusing
because which target to launch depends how the project is imported
into Eclipse. This is especially bad for gwt_debug (Buck) vs.
gwtui_debug (Maven), but it's worth disambiguating for the rest as
well.
Change-Id: I058e2fddef26b182ae0836a3d8337671be62ac12
On Mac OS X the hosted mode crashed when it ran out of permgen space.
Give it 128M, this seems to resolve the errors on my MacBook.
Change-Id: I0bc24f03b1186b2f90077c0418f37de57b09dd3a
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>
Try to reduce the size of the top-level BUCK file by moving
anything that has to do with Eclipse project generation and
classpath management into tools/eclipse.
Change-Id: Id779eaff4fe732908b28a8e3441004e364b59e21