The GWT compiler can output a report (or "story of your compile"),
describing the size of the JavaScript and which source classes
contributed to the overall download size. This is useful for
optimizing code splits in Dispatcher, and generally understanding
the impact of linking code together.
Only the "Split Point Report" is created.
The "Compiler Metrics" are not output.
The report is very slow to create, so it is not done by default.
Change-Id: I6ce86d65ee5f3e4bdba573d1f777ccc59767341d
Add rule to build search-free documentation for static hosting, and update
dev-release documentation to reflect the new rule.
Change-Id: Ifc9284d3c44349e3099ad582fcc14ba27695f30a
The codeserver runs separately and cannot easily be embedded in Gerrit
because it depends on an outdated version of Jetty. We may change this
behavior when GWT is updated.
Prerequisite is to download gwt-codeserver.jar and dependencies:
buck build codeserver
Start CodeServer with new launch configuration:
tools/eclipse/gerrit_gwt_codeserver.launch
And follow the instructions: [1].
[1] http://stackoverflow.com/a/18333050/116472
Inspired-By: Thomas Broyer <t.broyer@gmail.com>
Change-Id: Ieff7190db6bc151eae1274105ccf828eaa652027
* stable-2.9:
Fix GitWeb link for parent commits
Move gerrit.war from api_{install,deploy} to war_{install,deploy}
New review UI: Fix display of large avatar image in user popup panel
Conflicts:
.buckconfig
Change-Id: I3ec139fb5b95fc443be834fba8866528e7a51ab2
I22c8d3339 added unconditionally installation of gerrit.war to API install
process. Because it depends on '//:release' target all core plugins,
documentation and optimized permutations of all supported GWT client
agents must be built to update a new version of plugin API.
In some cases it cannot be built at all, i.e. if Gerrit tree was cloned
non-recursively, and core plugins are not available.
Very repetitive tasks in development process like building new version of
plugin API that other plugins depend on should be very easy and fast doable.
Decouple installation and deployment of gerrit.war in its own targets:
$ buck build war_{install,deploy}
Change-Id: I7fce3b126621580dde43104aa811d704cf6e8997
This change allows to compile optimized GWT version for popular brwosers:
buck build chrome
buck build firefox
buck build safari
And no: IE is not among them:
buck build ie
BUILD FAILED: No directory ie when resolving target //ie:ie
Change-Id: I4f888bd114928555967022c5586e2b3ef16396b0
Use buck-out/cache folder for local cache of buck build results.
Since we don't (yet) have a shared set of Cassandra cache nodes,
using a local cache is a good default. This will speed up build
times when switching between different version of Gerrit (for example
master/stable) and also when running "git bisect".
Change-Id: Id23c6053e7cb0498d129345f6ead18288d0e9701
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
According to [1] buck makes no assumption about source code versioning
systems which means that it will also scan the .git folder for the file
system monitoring (buckd) and when searching for the BUCK files.
[1] http://facebook.github.io/buck/concept/buckconfig.html
Change-Id: Ic9248326232684f8b85a951f5b01b542127a080a
The build system used mixed names for essentially the same things.
Rename all DEFS files to *.defs matching the handful of other files
that are already using this convention.
Change-Id: I3269bd5db5d8d83f5e192ea910f19431c2a4a1cf
These are already named using the alias in the .buckconfig. Moving
them down to tools allows their program to drop a visbility rule, and
shortens the top level file a bit.
Change-Id: I4193249c02850cb7aca3bf7fab81113c5f7b7d8b
Rewrite the Maven tool to accept a spec of things to process on the
command line and use $(location) in the invoking genrule() to locate
the necessary files from Buck. This gets rid of special cases in the
mvn wrapper tool and allows the definition to be given completely from
Buck as part of the build description.
Maven needs to be single threaded to perform repository updates safely
so only one genrule() target is declared to buck for the deploy or
install action. The rule is given all artifact information in a single
pass, allowing the mvn.py wrapper to execute them.
Change-Id: Idbcf645b69280420987a0e8f52947ba93ac9e6f0
`buck build api_install` copies the artifacts to the local maven repository.
`buck build api_deploy` uploads the artifacts to the remote maven repository.
The type of the repo is induced from the Gerrit version name, i. e.
* 2.8-SNAPSHOT: snapshot repo
* 2.8: release repo
Change-Id: I063834bb39311a4d92f5fdbb183f70b1fb8418b6
The macro rules this file defines have nothing to do with the
third-party dependency libraries, but instead are global definitions
used throughout the Gerrit build process. Most build tools are
hidden under //tools, so move these definitions to that directory.
Change-Id: I5e95d7cef734228ca818428a266afc0ac9fa0385
Previously it also setup the prebuilt_jar() which isn't actually
necessary to execute the download. This reduces the size of the
command line passed into the child buck process.
Before this change not all libraries were downloaded during the
download target. Targets in the root of //lib were skipped due to
an incorrect regex passed to egrep. This has been fixed with the
new regex inside of download_all.py.
The initial binary download now requires ~59s on my home cable modem,
and pulls 84M.
Source JARs are now only downloaded when the user builds the
download_sources target. This saves ~30s of setup time on a
the same connection and reduces the initial download by 16M.
Change-Id: Ie3bc97c9101c94f8bc4b89664bbd218323ad7230
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
This avoids needing to type ":" in front of the name to build.
Eventually I can move the eclipse targets down into a different
area and hide them from the top level file.
Change-Id: I9781099348cbe969bfd9c1f38711c37e1b92d3e2
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