groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Laforge <glafo...@gmail.com>
Subject Re: [VOTE] Release Groovy 2.6.0-alpha-3
Date Mon, 05 Mar 2018 13:33:47 GMT
Hi Daniel,

I just built from sources and ran my usual smoke test (hello world style),
and all was fine.
But I haven't tested your native lambda work, sorry (I'm sick & travelling
at the same time, so don't have much time for now)

+1

Guillaume


On Fri, Mar 2, 2018 at 6:01 PM, Daniel.Sun <sunlan@apache.org> wrote:

> If you are using Java8 and want to try the native lambda, please add
> addition
> JVM options( `-Dgroovy.target.bytecode=1.7 -Dgroovy.antlr4=true` OR
> -Dgroovy.target.bytecode=1.8 -Dgroovy.antlr4=true)
>
> For example:
> 1) Run script via command line
> ```
> groovy -Dgroovy.target.bytecode=1.8 -Dgroovy.antlr4=true
> TryNativeLambda.groovy
> ```
>
> 2)  Run script in groovy console
>          a) set the environment variable `JAVA_OPTS` as
> `-Dgroovy.target.bytecode=1.8 -Dgroovy.antlr4=true`
>          b) run `groovyConsole`
>
>
> Here is a sample script for you to try:
> ```
>        import groovy.transform.CompileStatic
>         import java.util.stream.Collectors
>         import java.util.stream.Stream
>
>         @CompileStatic
>         public class Test1 {
>             public static void main(String[] args) {
>                 p();
>             }
>
>             public static void p() {
>                 println([1, 2, 3].stream().map(e -> e.plus 1).toList())
>             }
>         }
> ```
>
>        In next releases of 2.6.0, `-Dgroovy.target.bytecode=1.7` will be
> set
> by default.
>
> Cheers,
> Daniel.Sun
>
>
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>



-- 
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform

Blog: http://glaforge.appspot.com/
Social: @glaforge <http://twitter.com/glaforge> / Google+
<https://plus.google.com/u/0/114130972232398734985/posts>

Mime
View raw message