19 Commits

Author SHA1 Message Date
Shawn Pearce
10f09d3d52 Require Java 7
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
2013-11-16 19:58:03 -08:00
David Ostrovsky
0dd4462e97 gerrit-plugin-gwtui: make the project visible to eclipse
Change-Id: I67e32e675294b34a43954b69090a1551293dbe80
2013-11-08 19:59:07 +01:00
David Ostrovsky
e6bc8b523b Add unit test for EditDeserializer
Change-Id: I42ebb8a5f085066cd4d8dbe8cc953d7fcb849eef
2013-11-05 14:19:06 -08:00
Yuxuan 'fishy' Wang
ec4b06a6e2 REST endpoint for searching Gerrit documentation.
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
2013-10-18 18:33:17 -07:00
David Pursehouse
7a16e859a4 Handle KeyboardInterrupt in Buck build wrapper scripts
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
2013-10-18 15:10:25 +09:00
Shawn Pearce
b899eff7f3 Include lib/asciidoctor/java in the Eclipse classpath
Having these in the classpath permits the sources to be modified
in Eclipse just like any other Java source file.

Change-Id: I6256f5db793dd056a61e934720cb40056d50cfd0
2013-10-07 17:15:26 -07:00
David Pursehouse
6c25ea8fdd Fix a few coding style nits in Buck build Python scripts
- Prefix regex strings with `r`
- Remove unused imports
- Rename variables and parameters to avoid redefinition of
  built-in types `dir` and `type`

Change-Id: Ia21667b89631c751f241dd6499a2e460e3435697
2013-09-26 16:50:07 +09:00
Shawn Pearce
0672a19c54 Create buck.properties during tools/eclipse/project.py
Change-Id: I7fdccee7d08e2177a5bb4a4ecbcf17be9d4ada39
2013-09-24 12:27:31 -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
71ab2f0f63 Simplify buck build eclipse by removing $OUT and $DEPS
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
2013-08-14 16:25:58 -07:00
Shawn Pearce
b46c76ea89 Split acceptance tests into one target per test
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
2013-07-27 11:34:23 -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
fb58a8cd87 Fix eclipse classpath to include GWT unit test deps
Change-Id: Ia8fe603e40a94be29962ee27c3f073f80958f392
2013-06-14 14:17:23 -07:00
Dave Borowitz
bc7a9ea30c Merge "Fix the buck springboard to always work from Eclipse" 2013-05-13 23:38:13 +00:00
Dave Borowitz
3d581315f5 Rename Buck Eclipse launch targets to buck_*
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
2013-05-13 15:39:41 -07:00
Shawn Pearce
e6f95721d7 Increase gwt_debug permgen to 128M
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
2013-05-13 13:12:20 -07:00
Shawn Pearce
6dec5bf32e Fix the buck springboard to always work from Eclipse
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
2013-05-13 13:02:25 -07:00
Chirayu Desai
4c5ee48f47 Python3 support
* 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>
2013-05-13 14:07:42 +05:30
Shawn Pearce
82e66ee4e5 Move Eclipse related stuff into tools/eclipse
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
2013-05-10 12:42:54 -07:00