[jira] [Comment Edited] (MCOMPILER-325) StackOverflowError from javac is not reflected in output when fork=true

2018-02-16 Thread Jake Robb (JIRA)

[ 
https://issues.apache.org/jira/browse/MCOMPILER-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16365965#comment-16365965
 ] 

Jake Robb edited comment on MCOMPILER-325 at 2/16/18 5:01 PM:
--

Here's my new output. I've updated pom.xml to specify fork=true and set the 
source and target language level to Java 8. This is the problematic output. 
javac encountered a StackOverflowError, and there's nothing in the output that 
even comes remotely close to pointing you in the right direction.

{code}
% mvn -version   
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 
2017-04-03T15:39:06-04:00)
Maven home: /Users/jrobb/bin/apache-maven-3.5.0
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.3", arch: "x86_64", family: "mac"
% mvn clean test 
[INFO] Scanning for projects...
[INFO] 
[INFO] 
[INFO] Building maven-compiler-plugin-bug 1.0.0-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ 
maven-compiler-plugin-bug ---
[INFO] Deleting /Users/jrobb/Projects/maven-compiler-plugin-bug/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
maven-compiler-plugin-bug ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/Users/jrobb/Projects/maven-compiler-plugin-bug/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ 
maven-compiler-plugin-bug ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ 
maven-compiler-plugin-bug ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/Users/jrobb/Projects/maven-compiler-plugin-bug/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ 
maven-compiler-plugin-bug ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to 
/Users/jrobb/Projects/maven-compiler-plugin-bug/target/test-classes
[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time: 1.485 s
[INFO] Finished at: 2018-02-15T12:17:20-05:00
[INFO] Final Memory: 9M/112M
[INFO] 
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.7.0:testCompile 
(default-testCompile) on project maven-compiler-plugin-bug: Compilation failure 
-> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
{code}


was (Author: jakerobb):
Here's my new output. I've updated pom.xml to specify fork=true and set the 
source and target language level to Java 8.
{code}
% mvn -version   
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 
2017-04-03T15:39:06-04:00)
Maven home: /Users/jrobb/bin/apache-maven-3.5.0
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.3", arch: "x86_64", family: "mac"
% mvn clean test 
[INFO] Scanning for projects...
[INFO] 
[INFO] 
[INFO] Building maven-compiler-plugin-bug 1.0.0-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ 
maven-compiler-plugin-bug ---
[INFO] Deleting /Users/jrobb/Projects/maven-compiler-plugin-bug/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
maven-compiler-plugin-bug ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/Users/jrobb/Projects/maven-compiler-plugin-bug/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ 
maven-compiler-plugin-bug ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources 

[jira] [Comment Edited] (MCOMPILER-325) StackOverflowError from javac is not reflected in output when fork=true

2018-02-16 Thread Jake Robb (JIRA)

[ 
https://issues.apache.org/jira/browse/MCOMPILER-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16364445#comment-16364445
 ] 

Jake Robb edited comment on MCOMPILER-325 at 2/16/18 5:00 PM:
--

So, I decided to be a good citizen and make a test project, and in my test 
project, I'm seeing the desired output. I'm unclear on why I wasn't earlier. 
I'll do some more research and update this as soon as I know more. In the 
meantime, please don't close as Can't Reproduce or whatever. Thanks! :)

EDIT: please read on; I've got it all figured out, and there's a real problem 
here. :)


was (Author: jakerobb):
So, I decided to be a good citizen and make a test project, and in my test 
project, I'm seeing the desired output. I'm unclear on why I wasn't earlier. 
I'll do some more research and update this as soon as I know more. In the 
meantime, please don't close as Can't Reproduce or whatever. Thanks! :)

> StackOverflowError from javac is not reflected in output when fork=true
> ---
>
> Key: MCOMPILER-325
> URL: https://issues.apache.org/jira/browse/MCOMPILER-325
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.7.0
>Reporter: Jake Robb
>Assignee: Robert Scholte
>Priority: Minor
>
> Context: 
> [https://stackoverflow.com/questions/48775213/maven-compilation-error-without-any-errors-from-the-compiler]
> If the Java code being compiled contains a chain of method calls that is too 
> long to fit in javac's stack, javac will throw a StackOverflowError and exit.
> The resulting output indicates that javac errored, but does not show the SOE, 
> nor which source file caused it. (It'd be nice if it actually pointed out the 
> problem, but that's on javac, not on the Maven plugin.)
> For more recent versions of the plugin, if {{verbose=true}}, the plugin 
> output includes the files being compiled as they go, and so the last file 
> output is helpful, but it still doesn't indicate what went wrong. -X and -e 
> args to Maven are also not helpful.
> In my case, the failure occurred using default settings for stack size (I 
> think it's 1MB) when compiling a test case that chained together 673 builder 
> methods, e.g.
> {code:java}
> return new 
> MyBuilder().foo(a1).foo(a2).foo(...).foo(a672).foo(a673).build();{code}
> I assume this problem is not unique to StackOverflowErrors and would affect 
> any thrown Error from javac.
> The plugin should be updated to capture javac's error output and include it 
> when applicable.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (MCOMPILER-325) StackOverflowError from javac is not reflected in output when fork=true

2018-02-15 Thread Jake Robb (JIRA)

[ 
https://issues.apache.org/jira/browse/MCOMPILER-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16365965#comment-16365965
 ] 

Jake Robb edited comment on MCOMPILER-325 at 2/15/18 5:19 PM:
--

Here's my new output. I've updated pom.xml to specify fork=true and set the 
source and target language level to Java 8.
{code}
% mvn -version   
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 
2017-04-03T15:39:06-04:00)
Maven home: /Users/jrobb/bin/apache-maven-3.5.0
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.3", arch: "x86_64", family: "mac"
% mvn clean test 
[INFO] Scanning for projects...
[INFO] 
[INFO] 
[INFO] Building maven-compiler-plugin-bug 1.0.0-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ 
maven-compiler-plugin-bug ---
[INFO] Deleting /Users/jrobb/Projects/maven-compiler-plugin-bug/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
maven-compiler-plugin-bug ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/Users/jrobb/Projects/maven-compiler-plugin-bug/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ 
maven-compiler-plugin-bug ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ 
maven-compiler-plugin-bug ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/Users/jrobb/Projects/maven-compiler-plugin-bug/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ 
maven-compiler-plugin-bug ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to 
/Users/jrobb/Projects/maven-compiler-plugin-bug/target/test-classes
[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time: 1.485 s
[INFO] Finished at: 2018-02-15T12:17:20-05:00
[INFO] Final Memory: 9M/112M
[INFO] 
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.7.0:testCompile 
(default-testCompile) on project maven-compiler-plugin-bug: Compilation failure 
-> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
{code}


was (Author: jakerobb):
{code}
% mvn -version   
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 
2017-04-03T15:39:06-04:00)
Maven home: /Users/jrobb/bin/apache-maven-3.5.0
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.3", arch: "x86_64", family: "mac"
% mvn clean test 
[INFO] Scanning for projects...
[INFO] 
[INFO] 
[INFO] Building maven-compiler-plugin-bug 1.0.0-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ 
maven-compiler-plugin-bug ---
[INFO] Deleting /Users/jrobb/Projects/maven-compiler-plugin-bug/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
maven-compiler-plugin-bug ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/Users/jrobb/Projects/maven-compiler-plugin-bug/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ 
maven-compiler-plugin-bug ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ 
maven-compiler-plugin-bug ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/Users/jrobb/Projects/maven-compiler-plugin-bug/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ 

[jira] [Comment Edited] (MCOMPILER-325) StackOverflowError from javac is not reflected in output when fork=true

2018-02-15 Thread Jake Robb (JIRA)

[ 
https://issues.apache.org/jira/browse/MCOMPILER-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16365910#comment-16365910
 ] 

Jake Robb edited comment on MCOMPILER-325 at 2/15/18 4:58 PM:
--

Nope, I'm using Java 8. 8u144 for my testing, but I've also verified the 
problem with 8u152. What makes you think I'm using 7?

This morning, I discovered that the thing missing from my example was 
true. With that enabled, I get the same behavior from my test as 
we saw in Bamboo. I've updated my test accordingly.

More importantly, the bug is not that my code doesn't compile (which is what 
your solutions address); the bug is that maven-compiler-plugin doesn't report 
this nature of failure when fork=true.

I also discovered that MCOMPILER-308 already reports that issue, although the 
people working on that issue seem to think it's unique to JDK9. This can remain 
closed, but the resolution is inaccurate; I have linked it as a duplicate and 
commented there.


was (Author: jakerobb):
Nope, I'm using Java 8. 8u144 for my testing, but I've also verified the 
problem with 8u152. What makes you think I'm using 7?

This morning, I discovered that the thing missing from my example was 
true. With that enabled, I get the same behavior from my test as 
we saw in Bamboo. I've updated my test accordingly.

I also discovered that MCOMPILER-308 already reports that issue. This can 
remain closed, but the resolution is inaccurate; I have linked it as a 
duplicate.

> StackOverflowError from javac is not reflected in output when fork=true
> ---
>
> Key: MCOMPILER-325
> URL: https://issues.apache.org/jira/browse/MCOMPILER-325
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.7.0
>Reporter: Jake Robb
>Assignee: Robert Scholte
>Priority: Minor
>
> Context: 
> [https://stackoverflow.com/questions/48775213/maven-compilation-error-without-any-errors-from-the-compiler]
> If the Java code being compiled contains a chain of method calls that is too 
> long to fit in javac's stack, javac will throw a StackOverflowError and exit.
> The resulting output indicates that javac errored, but does not show the SOE, 
> nor which source file caused it. (It'd be nice if it actually pointed out the 
> problem, but that's on javac, not on the Maven plugin.)
> For more recent versions of the plugin, if {{verbose=true}}, the plugin 
> output includes the files being compiled as they go, and so the last file 
> output is helpful, but it still doesn't indicate what went wrong. -X and -e 
> args to Maven are also not helpful.
> In my case, the failure occurred using default settings for stack size (I 
> think it's 1MB) when compiling a test case that chained together 673 builder 
> methods, e.g.
> {code:java}
> return new 
> MyBuilder().foo(a1).foo(a2).foo(...).foo(a672).foo(a673).build();{code}
> I assume this problem is not unique to StackOverflowErrors and would affect 
> any thrown Error from javac.
> The plugin should be updated to capture javac's error output and include it 
> when applicable.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (MCOMPILER-325) StackOverflowError from javac is not reflected in output when fork=true

2018-02-15 Thread Jake Robb (JIRA)

[ 
https://issues.apache.org/jira/browse/MCOMPILER-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16365910#comment-16365910
 ] 

Jake Robb edited comment on MCOMPILER-325 at 2/15/18 4:55 PM:
--

Nope, I'm using Java 8. 8u144 for my testing, but I've also verified the 
problem with 8u152. What makes you think I'm using 7?

This morning, I discovered that the thing missing from my example was 
true. With that enabled, I get the same behavior from my test as 
we saw in Bamboo. I've updated my test accordingly.

I also discovered that MCOMPILER-308 already reports that issue. This can 
remain closed, but the resolution is inaccurate; I have linked it as a 
duplicate.


was (Author: jakerobb):
Nope, I'm using Java 8. 8u144 for my testing, but I've also verified the 
problem with 8u152. What makes you think I'm using 7?

This morning, I discovered that the thing missing from my example was 
true. With that enabled, I get the same behavior from my test as 
we saw in Bamboo. I've updated my test accordingly.

I also discovered that MCOMPILER-308 already reports that issue. This can 
remain closed; I have linked it as a duplicate.

> StackOverflowError from javac is not reflected in output when fork=true
> ---
>
> Key: MCOMPILER-325
> URL: https://issues.apache.org/jira/browse/MCOMPILER-325
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.7.0
>Reporter: Jake Robb
>Assignee: Robert Scholte
>Priority: Minor
>
> Context: 
> [https://stackoverflow.com/questions/48775213/maven-compilation-error-without-any-errors-from-the-compiler]
> If the Java code being compiled contains a chain of method calls that is too 
> long to fit in javac's stack, javac will throw a StackOverflowError and exit.
> The resulting output indicates that javac errored, but does not show the SOE, 
> nor which source file caused it. (It'd be nice if it actually pointed out the 
> problem, but that's on javac, not on the Maven plugin.)
> For more recent versions of the plugin, if {{verbose=true}}, the plugin 
> output includes the files being compiled as they go, and so the last file 
> output is helpful, but it still doesn't indicate what went wrong. -X and -e 
> args to Maven are also not helpful.
> In my case, the failure occurred using default settings for stack size (I 
> think it's 1MB) when compiling a test case that chained together 673 builder 
> methods, e.g.
> {code:java}
> return new 
> MyBuilder().foo(a1).foo(a2).foo(...).foo(a672).foo(a673).build();{code}
> I assume this problem is not unique to StackOverflowErrors and would affect 
> any thrown Error from javac.
> The plugin should be updated to capture javac's error output and include it 
> when applicable.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (MCOMPILER-325) StackOverflowError from javac is not reflected in output when fork=true

2018-02-15 Thread Jake Robb (JIRA)

[ 
https://issues.apache.org/jira/browse/MCOMPILER-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16365910#comment-16365910
 ] 

Jake Robb edited comment on MCOMPILER-325 at 2/15/18 4:55 PM:
--

Nope, I'm using Java 8. 8u144 for my testing, but I've also verified the 
problem with 8u152. What makes you think I'm using 7?

This morning, I discovered that the thing missing from my example was 
true. With that enabled, I get the same behavior from my test as 
we saw in Bamboo. I've updated my test accordingly.

I also discovered that MCOMPILER-308 already reports that issue. This can 
remain closed; I have linked it as a duplicate.


was (Author: jakerobb):
Nope, I'm using Java 8. 8u144 for my testing, but I've also verified the 
problem with 8u152. What makes you think I'm using 7?

This morning, I discovered that the thing missing from my example was 
true. With that enabled, I get the same behavior from my test as 
we saw in Bamboo. I've updated my test accordingly.

I also discovered that MCOMPILER-308 already reports that issue. This can 
remain closed, but should be marked instead as a duplicate.

> StackOverflowError from javac is not reflected in output when fork=true
> ---
>
> Key: MCOMPILER-325
> URL: https://issues.apache.org/jira/browse/MCOMPILER-325
> Project: Maven Compiler Plugin
>  Issue Type: Bug
>Affects Versions: 3.7.0
>Reporter: Jake Robb
>Assignee: Robert Scholte
>Priority: Minor
>
> Context: 
> [https://stackoverflow.com/questions/48775213/maven-compilation-error-without-any-errors-from-the-compiler]
> If the Java code being compiled contains a chain of method calls that is too 
> long to fit in javac's stack, javac will throw a StackOverflowError and exit.
> The resulting output indicates that javac errored, but does not show the SOE, 
> nor which source file caused it. (It'd be nice if it actually pointed out the 
> problem, but that's on javac, not on the Maven plugin.)
> For more recent versions of the plugin, if {{verbose=true}}, the plugin 
> output includes the files being compiled as they go, and so the last file 
> output is helpful, but it still doesn't indicate what went wrong. -X and -e 
> args to Maven are also not helpful.
> In my case, the failure occurred using default settings for stack size (I 
> think it's 1MB) when compiling a test case that chained together 673 builder 
> methods, e.g.
> {code:java}
> return new 
> MyBuilder().foo(a1).foo(a2).foo(...).foo(a672).foo(a673).build();{code}
> I assume this problem is not unique to StackOverflowErrors and would affect 
> any thrown Error from javac.
> The plugin should be updated to capture javac's error output and include it 
> when applicable.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)