commit | bead0ed3e99f9c76ceab64f05f1fa29880222882 | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Sun Apr 27 00:29:25 2014 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Sun Apr 27 00:29:25 2014 +0100 |
tree | aca39eee915d4955f5bce6d1d939007d182dad41 | |
parent | 588dc4ebf80510c09198bfa9d4e03c40491a7346 [diff] |
Display language features warnings during compile When compiling Scala scripts, display verbose warnings when language features are used but not enabled. This extra warning appears on the Gerrit log and allows to better troubleshoot common problems. Change-Id: I1ba9dff2262acc899e5c9a685a648da936f5d212
This plugin provides Scala runtime environment for Gerrit plugins in Scala.
To test this series must be applied on top of Gerrit master [1].
To build link this directory under Gerrit's tree plugins directory and run:
buck build plugins/scala-provider:scala-provider
The resulting artifact can be found under:
buck-out/gen/plugins/scala-provider/scala-provider.jar
A sample Scala hello world script is:
import com.google.gerrit.sshd._ import com.google.gerrit.extensions.annotations._ @Export("scala") class ScalaCommand extends SshCommand { override def run = stdout println "Hello from Scala!" }
Copy and past the above sample Scala fragment into the file $GERRIT_SITE/plugin/hello-1.0.scala.
The “hello” plugin version 1.0 will be automatically loaded into Gerrit and will provide a new SSH command “hello scala”.