You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2022/05/15 02:56:55 UTC

[groovy] branch GROOVY_4_0_X updated (d471d3d507 -> 58ac52b1a7)

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a change to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


    from d471d3d507 Tweak guards for receiver and parameters further
     new 17dcb6a8d7 GROOVY-10626: --enable-preview doesn't show in CLI/help for groovysh
     new 58ac52b1a7 minor refactor: add explanation to build

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.gradle                                                            | 1 +
 src/main/java/groovy/ui/GroovyMain.java                                 | 2 +-
 src/main/java/org/codehaus/groovy/tools/FileSystemCompiler.java         | 2 +-
 src/spec/doc/tools-groovy.adoc                                          | 2 +-
 src/spec/doc/tools-groovyc.adoc                                         | 2 +-
 .../src/main/resources/groovy/console/ui/Console.properties             | 2 +-
 subprojects/groovy-console/src/spec/doc/groovy-console.adoc             | 2 +-
 .../src/main/groovy/org/apache/groovy/groovysh/Main.groovy              | 1 +
 .../src/main/resources/org/apache/groovy/groovysh/Main.properties       | 2 ++
 subprojects/groovy-groovysh/src/spec/doc/groovysh.adoc                  | 2 +-
 subprojects/groovy-json/build.gradle                                    | 1 +
 11 files changed, 12 insertions(+), 7 deletions(-)


[groovy] 01/02: GROOVY-10626: --enable-preview doesn't show in CLI/help for groovysh

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 17dcb6a8d7ddb05af214dad70d16750d69395996
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sun May 15 10:59:14 2022 +1000

    GROOVY-10626: --enable-preview doesn't show in CLI/help for groovysh
---
 src/main/java/groovy/ui/GroovyMain.java                                 | 2 +-
 src/main/java/org/codehaus/groovy/tools/FileSystemCompiler.java         | 2 +-
 src/spec/doc/tools-groovy.adoc                                          | 2 +-
 src/spec/doc/tools-groovyc.adoc                                         | 2 +-
 .../src/main/resources/groovy/console/ui/Console.properties             | 2 +-
 subprojects/groovy-console/src/spec/doc/groovy-console.adoc             | 2 +-
 .../src/main/groovy/org/apache/groovy/groovysh/Main.groovy              | 1 +
 .../src/main/resources/org/apache/groovy/groovysh/Main.properties       | 2 ++
 subprojects/groovy-groovysh/src/spec/doc/groovysh.adoc                  | 2 +-
 9 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/main/java/groovy/ui/GroovyMain.java b/src/main/java/groovy/ui/GroovyMain.java
index 11ae848b0e..f1c7e2a75b 100644
--- a/src/main/java/groovy/ui/GroovyMain.java
+++ b/src/main/java/groovy/ui/GroovyMain.java
@@ -206,7 +206,7 @@ public class GroovyMain {
         @Option(names = {"-pa", "--parameters"}, description = "Generate metadata for reflection on method parameter names (jdk8+ only)")
         private boolean parameterMetadata;
 
-        @Option(names = {"-pr", "--enable-preview"}, description = "Enable preview Java features (JEP 12) (jdk12+ only)")
+        @Option(names = {"-pr", "--enable-preview"}, description = "Enable preview Java features (jdk12+ only)")
         private boolean previewFeatures;
 
         @Option(names = "-l", arity = "0..1", paramLabel = "<port>", description = "Listen on a port and process inbound lines (default: 1960)")
diff --git a/src/main/java/org/codehaus/groovy/tools/FileSystemCompiler.java b/src/main/java/org/codehaus/groovy/tools/FileSystemCompiler.java
index 097b201304..69061e08b7 100644
--- a/src/main/java/org/codehaus/groovy/tools/FileSystemCompiler.java
+++ b/src/main/java/org/codehaus/groovy/tools/FileSystemCompiler.java
@@ -363,7 +363,7 @@ public class FileSystemCompiler {
         @Option(names = {"-pa", "--parameters"}, description = "Generate metadata for reflection on method parameter names (jdk8+ only)")
         private boolean parameterMetadata;
 
-        @Option(names = {"-pr", "--enable-preview"}, description = "Enable preview Java features (JEP 12) (jdk12+ only) - must be after classpath but before other arguments")
+        @Option(names = {"-pr", "--enable-preview"}, description = "Enable preview Java features (jdk12+ only) - must be after classpath but before other arguments")
         private boolean previewFeatures;
 
         @Option(names = {"-j", "--jointCompilation"}, description = "Attach javac compiler to compile .java files")
diff --git a/src/spec/doc/tools-groovy.adoc b/src/spec/doc/tools-groovy.adoc
index 2e865cc52f..c106789cff 100644
--- a/src/spec/doc/tools-groovy.adoc
+++ b/src/spec/doc/tools-groovy.adoc
@@ -59,5 +59,5 @@ int (disable any int based optimizations) |
 | -p | | process files line by line and print result (see also -n) |
 | -v | --version | display the Groovy and JVM versions | groovy -v
 | -pa | --parameters | Generates metadata for reflection on method parameter names on JDK 8 and above. Defaults to false. | groovy --parameters Person.groovy
-| -pr | --enable-preview | Enable preview Java features (JEP 12) (jdk12+ only). | groovy --enable-preview Person.groovy
+| -pr | --enable-preview | Enable preview Java features (jdk12+ only). | groovy --enable-preview Person.groovy
 |=======================================================================
diff --git a/src/spec/doc/tools-groovyc.adoc b/src/spec/doc/tools-groovyc.adoc
index e87bed6f30..240ecd1e7e 100644
--- a/src/spec/doc/tools-groovyc.adoc
+++ b/src/spec/doc/tools-groovyc.adoc
@@ -54,7 +54,7 @@ a number of command line switches:
 | -Jproperty=value | | Properties to be passed to `javac` if joint compilation is enabled | groovyc -j -Jtarget=1.6 -Jsource=1.6 A.groovy B.java
 | -Fflag | | Flags to be passed to `javac` if joint compilation is enabled | groovyc -j -Fnowarn A.groovy B.java
 | -pa | --parameters | Generates metadata for reflection on method parameter names. Requires Java 8+. | groovyc --parameters Person.groovy
-| -pr | --enable-preview | Enable preview Java features (JEP 12) (jdk12+ only). | groovy --enable-preview Person.groovy
+| -pr | --enable-preview | Enable preview Java features (jdk12+ only). | groovy --enable-preview Person.groovy
 | @argfile | | Read options and source files from specified file. | groovyc @conf/args
 |=======================================================================
 
diff --git a/subprojects/groovy-console/src/main/resources/groovy/console/ui/Console.properties b/subprojects/groovy-console/src/main/resources/groovy/console/ui/Console.properties
index f0ad9666f1..6f33b856e2 100644
--- a/subprojects/groovy-console/src/main/resources/groovy/console/ui/Console.properties
+++ b/subprojects/groovy-console/src/main/resources/groovy/console/ui/Console.properties
@@ -26,7 +26,7 @@ cli.option.cp.description=Aliases for '-classpath'
 
 cli.option.classpath.description=Specify where to find the class files - must be first argument
 
-cli.option.enable.preview.description=Enable preview Java features (JEP 12) (jdk12+ only) - must be after classpath but before other arguments
+cli.option.enable.preview.description=Enable preview Java features (jdk12+ only) - must be after classpath but before other arguments
 
 cli.option.parameters.description=Generate metadata for reflection on method parameter names (jdk8+ only)
 
diff --git a/subprojects/groovy-console/src/spec/doc/groovy-console.adoc b/subprojects/groovy-console/src/spec/doc/groovy-console.adoc
index 51966626a7..8bf058aada 100644
--- a/subprojects/groovy-console/src/spec/doc/groovy-console.adoc
+++ b/subprojects/groovy-console/src/spec/doc/groovy-console.adoc
@@ -66,7 +66,7 @@ The Groovy Swing Console allows a user to enter and run Groovy scripts.
   -h, --help                 Display this help message
   -pa, --parameters          Generate metadata for reflection on method parameter
                                names (jdk8+ only)
-  -pr, --enable-preview             Enable preview Java features (JEP 12) (jdk12+ only)
+  -pr, --enable-preview      Enable preview Java features (jdk12+ only)
   -V, --version              Display the version
 -----------------------------------------------------------------
 
diff --git a/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/Main.groovy b/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/Main.groovy
index c4ddcae030..705213e198 100644
--- a/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/Main.groovy
+++ b/subprojects/groovy-groovysh/src/main/groovy/org/apache/groovy/groovysh/Main.groovy
@@ -90,6 +90,7 @@ class Main {
             D(longOpt: 'define', type: Map, argName: 'name=value', messages['cli.option.define.description'])
             T(longOpt: 'terminal', args: 1, argName: 'TYPE', messages['cli.option.terminal.description'])
             pa(longOpt: 'parameters', messages['cli.option.parameters.description'])
+            pr(longOpt: 'enable-preview', messages['cli.option.enable.preview.description'])
         }
         OptionAccessor options = cli.parse(args)
 
diff --git a/subprojects/groovy-groovysh/src/main/resources/org/apache/groovy/groovysh/Main.properties b/subprojects/groovy-groovysh/src/main/resources/org/apache/groovy/groovysh/Main.properties
index fac864ddbe..94d294f3b1 100644
--- a/subprojects/groovy-groovysh/src/main/resources/org/apache/groovy/groovysh/Main.properties
+++ b/subprojects/groovy-groovysh/src/main/resources/org/apache/groovy/groovysh/Main.properties
@@ -46,4 +46,6 @@ cli.option.terminal.description=Specify the terminal TYPE to use
 
 cli.option.parameters.description=Generate metadata for reflection on method parameter names (jdk8+ only)
 
+cli.option.enable.preview.description=Enable preview Java features (jdk12+ only) - must be after classpath but before other arguments
+
 cli.info.version=@|green Groovy Shell|@ {0}
diff --git a/subprojects/groovy-groovysh/src/spec/doc/groovysh.adoc b/subprojects/groovy-groovysh/src/spec/doc/groovysh.adoc
index 566087cff7..6e7e691209 100644
--- a/subprojects/groovy-groovysh/src/spec/doc/groovysh.adoc
+++ b/subprojects/groovy-groovysh/src/spec/doc/groovysh.adoc
@@ -63,7 +63,7 @@ experiments.
   -h, --help              Display this help message
   -pa, --parameters       Generate metadata for reflection on method parameter names
                             (jdk8+ only)
-  -pr, --enable-preview          Enable preview Java features (JEP 12) (jdk12+ only)
+  -pr, --enable-preview   Enable preview Java features (jdk12+ only)
   -q, --quiet             Suppress superfluous output
   -T, --terminal=<TYPE>   Specify the terminal TYPE to use
   -v, --verbose           Enable verbose output


[groovy] 02/02: minor refactor: add explanation to build

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 58ac52b1a7d88436da85f4400b1f2f36dba72191
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sun May 15 11:00:24 2022 +1000

    minor refactor: add explanation to build
---
 build.gradle                         | 1 +
 subprojects/groovy-json/build.gradle | 1 +
 2 files changed, 2 insertions(+)

diff --git a/build.gradle b/build.gradle
index e9afad3719..0b8eee8a14 100644
--- a/build.gradle
+++ b/build.gradle
@@ -163,6 +163,7 @@ dependencies {
     testImplementation "net.jcip:jcip-annotations:${versions.jcipAnnotations}"
 
     testRuntimeOnly(project(":")) {
+        because "Tests are using Grapes"
         capabilities {
             requireCapability 'org.apache.groovy:groovy-grapes'
         }
diff --git a/subprojects/groovy-json/build.gradle b/subprojects/groovy-json/build.gradle
index c369c5e4a8..0206395cec 100644
--- a/subprojects/groovy-json/build.gradle
+++ b/subprojects/groovy-json/build.gradle
@@ -28,6 +28,7 @@ dependencies {
     testImplementation 'net.javacrumbs.json-unit:json-unit:2.33.0'
 
     testRuntimeOnly project(':'), {
+        because "Tests are using Grapes"
         capabilities {
             requireCapability 'org.apache.groovy:groovy-grapes'
         }