ca48f0fff22f7fbcb856fd2faa6e15e7de900775 version of Buck changed the current
directory for command invocation. Previously it was always project root
directory. After upgrade it is relative directory to the active rule.
This particularly breaks javadoc rule execution, which assumed that the
current directory was project root. Fix it by changing to the parent
directory untill the project root by checking for existience of .buckconfig
file.
Change-Id: Ia5530b892b67412dc8e942a1d0b0ec4da42df493
After merging Buck's change 2e2550fcf54680ea4d697398d258d5ac3ba2f60c,
it is now required, that `buck` is always executed in the project root
directory. Adjust invocation of `buck` to satisfy this requirement.
Change-Id: Ic1c79ad105d814ee23842add74c2dc54548aea47
Escape dollar sign in plugin manifest entries, to prevent that
it is interpreted by the shell and thus get removed.
Change-Id: Iefd8abdcd207cb985f8156c7e41c094c1aa12b27
* stable-2.8:
Update replication plugin
Enable creating new branch and push local new commits in one step.
Add Implementation-Vendor default manifest entry
Fix incompatibility between "Rebase if Necessary" and "copy*Score*"
Fix submit rule evaluation for non blocking labels
Set uploader to current user in "patchset-created" event upon rebasing
Guard against diff.mnemonicprefix in commit-msg hook
Conflicts:
gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/BUCK
gerrit-extension-api/src/main/java/com/google/gerrit/extensions/api/changes/AddReviewerInput.java
gerrit-server/src/main/java/com/google/gerrit/server/change/ChangeJson.java
gerrit-server/src/main/java/com/google/gerrit/server/git/strategy/RebaseIfNecessary.java
Change-Id: Ie59a530fe2c0fe66244d010e01e3cdf41de150f0
* stable-2.8:
Update 2.8.2 release notes with recently merged changes
Update change to invalidate cache after deletion of draft revision
Buck: Decouple plugin-api installation from deployment
SideBySide2: Fill the browser width
SideBySide2: Fix tab alignment to be correct width
Extend ChangeScreen2 horizontal bars to full width.
Conflicts:
gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen2.ui.xml
gerrit-gwtui/src/main/java/com/google/gerrit/client/diff/DiffTable.ui.xml
Change-Id: Ie78dbe4f7c6695be273a78e4fe44a2d4081aed7e
Currently the same pom_fake.xml controls both installing the plugin-api
in local Maven repository (typical use case for a contributor) and
deploying it on Google bucket (typical use case for a maintainer). To fit
the both use cases that file contains stuff needed for uploading to Google
bucket only: 'gs-maven-wagon' artifact and the repository to fetch it from.
Because the "best" build tool in the world randomly and unreproducible
fails to fetch that artifact [1], frustrating the potential contributors,
for reasons that nobody knows and understands, separate these use cases
from each other, and strip the stuff from pom_fake.xml needed for deployment
of plugin-api. The cost is code duplication. The advantage of doing it:
buck build api_install
just works. Always.
[1] https://gist.github.com/mulby/092fee5f5962aafbbb25#file-gerrit-build-error-txt
Change-Id: I842335907ef8721f4126bcd90e395f7748aefc74
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
Currently the same pom_fake.xml controls both installing the plugin-api
in local Maven repository (typical use case for a contributor) and
deploying it on Google bucket (typical use case for a maintainer). To fit
the both use cases that file contains stuff needed for uploading to Google
bucket only: 'gs-maven-wagon' artifact and the repository to fetch it from.
Because the "best" build tool in the world randomly and unreproducible
fails to fetch that artifact [1], frustrating the potential contributors,
for reasons that nobody knows and understands, separate these use cases
from each other, and strip the stuff from pom_fake.xml needed for deployment
of plugin-api. The cost is code duplication. The advantage of doing it:
buck build api_install
just works. Always.
[1] https://gist.github.com/mulby/092fee5f5962aafbbb25#file-gerrit-build-error-txt
Change-Id: I842335907ef8721f4126bcd90e395f7748aefc74
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
Add an extension screen which contains a hook that can be used by
GWT and JS plugins to integrate complete screens into the Gerrit UI.
Change-Id: I48a92ea49c4384db034177b04b2e7f0bea6a87b2
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
In some cases it might be useful to be able to pass dependencies as non
transitive dependencies, that not included in final plugin binary.
Why? When plugin dependencies are needed in both bootstrap classpath and
in plugin then they must be put in $gerrit_path/lib dir. Having them in lib
and inside the plugin doesn't make much sense.
This change exposes compile_deps parameter to the gerrit_{plugin|extension}
methods. It is possible to create both versions of the plugin: with and without
dependencies.
gerrit_plugin(
name = 'javamelody',
srcs = glob(['src/main/java/**/*.java']),
resources = glob(['src/main/resources/**/*']),
manifest_entries = [
'Gerrit-PluginName: javamelody',
'Gerrit-Module: com.googlesource.gerrit.plugins.javamelody.Module',
'Gerrit-HttpModule: com.googlesource.gerrit.plugins.javamelody.HttpModule',
],
deps = [
'//plugins/javamelody/lib:javamelody',
'//plugins/javamelody/lib:jrobin',
],
)
gerrit_plugin(
name = 'javamelody-no-deps',
srcs = glob(['src/main/java/**/*.java']),
resources = glob(['src/main/resources/**/*']),
manifest_entries = [
'Gerrit-PluginName: javamelody',
'Gerrit-Module: com.googlesource.gerrit.plugins.javamelody.Module',
'Gerrit-HttpModule: com.googlesource.gerrit.plugins.javamelody.HttpModule',
],
compile_deps = [
'//plugins/javamelody/lib:javamelody',
'//plugins/javamelody/lib:jrobin',
],
)
Change-Id: Ia274dbeb18de8807f0ab1edf7144f12ff0d02d74
This plugin module was left out during Buck migration.
$>buck build api
produces now plugin-gwtui.jar and plugin-gwtui-src.jar.
Buck Maven bridge was enhanced to {install|deploy} the new artifact to
remote or local Maven repositories:
$>buck build install_api
deployes
gerrit-plugin-gwtui-2.9-SNAPSHOT-sources.jar
gerrit-plugin-gwtui-2.9-SNAPSHOT.jar
to local Maven repository.
Change-Id: Idae18f6df2e67fe53d57b8c35caa4226333e269b
(cherry picked from commit c8cffc8e928a9277621ffff6cb740f79cd662195)
Add the necessary settings in the fake pom.xml file, and correct the URL
in the BUCK file to make deployment with gs-maven-wagon work.
Change-Id: I6d1f84c850c70f731d061d9e50a062d37c68baf2
* changes:
Don't put plugins into system classpath
Isolate plugin class directories from each other
Display UI build failures in browser
Unify debug launch configs and auto-detect browser
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
Since this Buck's commit 59759043f66de17140b423a7f11a2d8827b4cbbf the whole
unflattened subtree is used.
Change-Id: I4ec930a452d4867add3f5dd46430d3184c2a7277
GWT only needs the rebind code for CSS and ServerLinker to be
precompiled as bytecode. Save build time by passing no source
files to the java_library() used by gwt_module().
For a full draft build of ui_safari this cuts the refresh time
down from 32.015s to 26.158s on my MacBook. Saving 6s on each
UI reload adds up during development.
The common annotations need to be provided as bytecode, avoiding
spurious warnings from GWT when there is a Java syntax error.
Change-Id: I37826498650c65c05303e7d4d1177d05781c56f6
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
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
Buck lacks a feature to set java source level and target level per project
base, i. e. in .buckconfig file under java section.
The only method that currently is supported and described in the
documentation is to pass custom levels to java_library and java_test methods.
That would work, but that approach would require to touch dozens of files.
Second approach could be to just patch system wide Buck with this patch[1].
However that is not really an option because in this case the increased
java source and target level applies on all projects and branches.
Particularly it is undesirable to build Gerrit 2.8 stable branch or other
projects that were migrated to Buck (e. g. JGit) with increased java source
and target level.
This change redefines the standard definitions of java_test() and
java_library() methods and increases the java source and target level in the
new defined functions. With the combination of "include = default.defs"
construct in .buildconfig file it is garanteed that all BUCK files first
"see" the redefined methods.
Disadvantage of the approach is that every time the original method
definitions are changed in upstream Buck (i. e. new paramters are introduced)
this patch must be changed too.
The best approach would be to extend Buck and enable definition of source and
target level per project base (in .buckconfig file).
[1] https://github.com/facebook/buck/pull/67
Change-Id: Ifaba1eb41e9ac2f033e704a75723f3595e1c1ee5
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
The plugin api moved into the gerrit-plugin-api package.
Change the reference created by gerrit_plugin() to match.
Change-Id: I390a22f512835847367ae2993a7a9bddf9d11b5c
buck build api
generates now javadocs.
buck build api_install
installs all plugin/extension related artifacts with javadocs in the
local Maven repository.
Change-Id: Ifa6a8eb469f388e16449576ff2bff01a5dce67dd
Currently only predefined Maven repositories are supported by Buck maven_jar.
Additional logic exists to redirect to a local repository mirror.
Current implementation relies on the repository name matching between repo
passed to maven_jar and redirect definition defined in local.properties that
is not under Git control.
This change extends that by allowing to pass not only the repo name but the
complete URL to maven_jar. The augmented implementation checks if it is a
known Maven repository: if it is, then the behavious is unchanged, if not,
then the passed URL is used.
As result plugin's can use custom Maven repositories:
GERRIT_FORGE = 'http://gerritforge.com/snapshot'
maven_jar(
name = 'gitblit',
id = 'com.gitblit:gitblit:1.4.0',
sha1 = '1b130dbf5578ace37507430a4a523f6594bf34fa',
license = 'Apache2.0',
repository = GERRIT_FORGE,
)
Plugin owned Maven repositories can also be rewritten in local.properties.
To achieve that custom repository name must be passed to the maven_jar()
function, like known repositories, and the URL must be defined in
local.properties.
local.properties excerpt:
download.GERRIT_FORGE = http://my.company.mirror/gerrit-forge
BUCK excerpt:
GERRIT_FORGE = 'GERRIT_FORGE:'
maven_jar(
name = 'gitblit',
id = 'com.gitblit:gitblit:1.4.0',
sha1 = '1b130dbf5578ace37507430a4a523f6594bf34fa',
license = 'Apache2.0',
repository = GERRIT_FORGE,
)
Python unit test can be executed with other Java unit tests:
buck test tools:python_tests
Change-Id: Ib31d51f0884b1ca1a07b6492f861f404db115946
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
This changes extends gerrit_plugin function with additional gwt_module
parameters. When passed, GWT application is created. Assumtion is met,
that this application depends on gerrit-plugin-gwtui module.
With this change Gerrit GWT plugins can be build with Buck:
MODULE = 'com.googlesource.gerrit.plugins.cookbook.HelloForm'
gerrit_plugin(
name = 'cookbook-plugin',
srcs = glob(['src/main/java/**/*.java']),
resources = glob(['src/main/**/*']),
gwt_module = MODULE,
manifest_entries = [
'Gerrit-PluginName: cookbook',
'Gerrit-Module: com.googlesource.gerrit.plugins.cookbook.Module',
'Gerrit-HttpModule: com.googlesource.gerrit.plugins.cookbook.HttpModule',
'Gerrit-SshModule: com.googlesource.gerrit.plugins.cookbook.SshModule',
]
)
Change-Id: I4b131c7c2672675d99457651fcee63bf4f149c2f
This plugin module was left out during Buck migration.
$>buck build api
produces now plugin-gwtui.jar and plugin-gwtui-src.jar.
Buck Maven bridge was enhanced to {install|deploy} the new artifact to
remote or local Maven repositories:
$>buck build install_api
deployes
gerrit-plugin-gwtui-2.9-SNAPSHOT-sources.jar
gerrit-plugin-gwtui-2.9-SNAPSHOT.jar
to local Maven repository.
Change-Id: Idae18f6df2e67fe53d57b8c35caa4226333e269b
After switching to Eclipse Maven repository for pulling JGit lib, we
have the problem that according to Eclipse release train the JARs have
to be signed. That collids with our jgit patch for diff deserialization.
To rectify that, add `unsign` parameter to maven_jar() function.
Change-Id: Ib7bfa5d16f980a64b887d61a4b4ec325e6ffb0a1
After switching to Eclipse Maven repository for pulling JGit lib, we
have the problem that according to Eclipse release train the JARs have
to be signed. That collids with our jgit patch for diff deserialization.
To rectify that, add `unsign` parameter to maven_jar() function.
Change-Id: Ib7bfa5d16f980a64b887d61a4b4ec325e6ffb0a1
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