You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2020/02/23 13:13:26 UTC

[GitHub] [groovy] paulk-asert opened a new pull request #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8

paulk-asert opened a new pull request #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8
URL: https://github.com/apache/groovy/pull/1173
 
 
   Basic fixes required for 2.5.X to work on JDK14. Just one test (currently disabled) that needs further work but even that can possibly wait.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [groovy] paulk-asert commented on a change in pull request #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8

Posted by GitBox <gi...@apache.org>.
paulk-asert commented on a change in pull request #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8
URL: https://github.com/apache/groovy/pull/1173#discussion_r383813029
 
 

 ##########
 File path: src/test/groovy/lang/ScriptSourcePositionInAstTest.groovy
 ##########
 @@ -45,18 +46,24 @@ class ScriptSourcePositionInAstTest extends GroovyTestCase {
     }
 
     void testDoubleStatementScript() {
-        assert positionsForScript("""\
+        def raw = """\
             println 'hello'
             println 'bye'
-        """.stripIndent()) == [[1, 1], [2, 14]]
+        """
+        // avoid stripIndent issues on JDK13+ by calling Groovy's DGM stripIndent explicitly
+        def script = StringGroovyMethods.stripIndent((CharSequence)raw)
 
 Review comment:
   The `@Deprecated` on `stripIndent` in JDK13 is "just" how they mark preview features. The deprecation appears gone in 14 as the feature has now been more or less accepted. They still have a bit of a disclaimer in the javadoc text itself but I'd assume it is here bar a few tweaks for the foreseeable future. Unless someone else knows different.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [groovy] paulk-asert edited a comment on issue #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8

Posted by GitBox <gi...@apache.org>.
paulk-asert edited a comment on issue #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8
URL: https://github.com/apache/groovy/pull/1173#issuecomment-590067821
 
 
   Note: this doesn't try to bring across the many changes to get rid of illegal warnings etc., but just aims to get the VMPlugin plumbing working again.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [groovy] paulk-asert commented on issue #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8

Posted by GitBox <gi...@apache.org>.
paulk-asert commented on issue #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8
URL: https://github.com/apache/groovy/pull/1173#issuecomment-590067821
 
 
   Note: this doesn't try to bring across the many changes to get rid of illegal warnings etc., nor yet set target bytecode for JDK14/15, but just aims to get the VMPlugin plumbing working again.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [groovy] blackdrag commented on a change in pull request #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8

Posted by GitBox <gi...@apache.org>.
blackdrag commented on a change in pull request #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8
URL: https://github.com/apache/groovy/pull/1173#discussion_r384098562
 
 

 ##########
 File path: src/test/groovy/lang/ScriptSourcePositionInAstTest.groovy
 ##########
 @@ -45,18 +46,24 @@ class ScriptSourcePositionInAstTest extends GroovyTestCase {
     }
 
     void testDoubleStatementScript() {
-        assert positionsForScript("""\
+        def raw = """\
             println 'hello'
             println 'bye'
-        """.stripIndent()) == [[1, 1], [2, 14]]
+        """
+        // avoid stripIndent issues on JDK13+ by calling Groovy's DGM stripIndent explicitly
+        def script = StringGroovyMethods.stripIndent((CharSequence)raw)
 
 Review comment:
   if it is going to stay then we need to think about how the two stripidents differ and what we do about it. We may have to remove our stripident in general for example

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [groovy] paulk-asert commented on a change in pull request #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8

Posted by GitBox <gi...@apache.org>.
paulk-asert commented on a change in pull request #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8
URL: https://github.com/apache/groovy/pull/1173#discussion_r383813029
 
 

 ##########
 File path: src/test/groovy/lang/ScriptSourcePositionInAstTest.groovy
 ##########
 @@ -45,18 +46,24 @@ class ScriptSourcePositionInAstTest extends GroovyTestCase {
     }
 
     void testDoubleStatementScript() {
-        assert positionsForScript("""\
+        def raw = """\
             println 'hello'
             println 'bye'
-        """.stripIndent()) == [[1, 1], [2, 14]]
+        """
+        // avoid stripIndent issues on JDK13+ by calling Groovy's DGM stripIndent explicitly
+        def script = StringGroovyMethods.stripIndent((CharSequence)raw)
 
 Review comment:
   The @Deprecated on `stripIndent` in JDK13 is "just" how they mark preview features. The deprecation appears gone in 14 as the feature has now been more or less accepted. They still have a bit of a disclaimer in the javadoc text itself but I'd assume it is here bar a few tweaks for the foreseeable future. Unless someone else knows different.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [groovy] asfgit merged pull request #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8

Posted by GitBox <gi...@apache.org>.
asfgit merged pull request #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8
URL: https://github.com/apache/groovy/pull/1173
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [groovy] paulk-asert commented on a change in pull request #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8

Posted by GitBox <gi...@apache.org>.
paulk-asert commented on a change in pull request #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8
URL: https://github.com/apache/groovy/pull/1173#discussion_r384170016
 
 

 ##########
 File path: src/test/groovy/lang/ScriptSourcePositionInAstTest.groovy
 ##########
 @@ -45,18 +46,24 @@ class ScriptSourcePositionInAstTest extends GroovyTestCase {
     }
 
     void testDoubleStatementScript() {
-        assert positionsForScript("""\
+        def raw = """\
             println 'hello'
             println 'bye'
-        """.stripIndent()) == [[1, 1], [2, 14]]
+        """
+        // avoid stripIndent issues on JDK13+ by calling Groovy's DGM stripIndent explicitly
+        def script = StringGroovyMethods.stripIndent((CharSequence)raw)
 
 Review comment:
   In Groovy 3, we added a `stripIndent(boolean)` method (GROOVY-9423). It doesn't make the problem go away but at least provides a workaround. It isn't part of GROOVY_2_5_X hence the need for the slightly hacky change here.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [groovy] blackdrag commented on a change in pull request #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8

Posted by GitBox <gi...@apache.org>.
blackdrag commented on a change in pull request #1173: GROOVY-9211: BUG! UNCAUGHT EXCEPTION on OpenJDK14-ea+8
URL: https://github.com/apache/groovy/pull/1173#discussion_r383715873
 
 

 ##########
 File path: src/test/groovy/lang/ScriptSourcePositionInAstTest.groovy
 ##########
 @@ -45,18 +46,24 @@ class ScriptSourcePositionInAstTest extends GroovyTestCase {
     }
 
     void testDoubleStatementScript() {
-        assert positionsForScript("""\
+        def raw = """\
             println 'hello'
             println 'bye'
-        """.stripIndent()) == [[1, 1], [2, 14]]
+        """
+        // avoid stripIndent issues on JDK13+ by calling Groovy's DGM stripIndent explicitly
+        def script = StringGroovyMethods.stripIndent((CharSequence)raw)
 
 Review comment:
   I wonder if we should even support JDK13 here. It is not a LTS version, it will stop receiving updates after March 2020 and the stripIdent method in JDK13 is deprecated. I would prefer not changing the tests for that

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services