Re: [PROPOSAL]Provide an option to generate stubs in in-momery file system for better compiling performance

2019-01-19 Thread Daniel.Sun
Hi Cédric, It seems that gradle has its own java compiler and does not invoke the following method of groovy, right? https://github.com/apache/groovy/blob/master/src/main/java/org/codehaus/groovy/tools/javac/JavacJavaCompiler.java#L54 Cheers, Daniel.Sun - Apache Groovy committer Blo

Re: [PROPOSAL]Provide an option to generate stubs in in-momery file system for better compiling performance

2019-01-19 Thread Jochen Theodorou
The only minus on this is the memory consumption... though I did not measure it, so maybe it is not that bad. On 18.01.19 09:44, Daniel Sun wrote: Hi all, [Background] Groovy's joint compiler will generate a lot of stubs for groovy source files, many of the stubs are useless and writte

Re: [PROPOSAL]Provide an option to generate stubs in in-momery file system for better compiling performance

2019-01-19 Thread Daniel.Sun
Yep ;-) The stub files normally are very small. Given 8K by average per stub file, Groovy project contains about 2900 groovy files(normally one groovy file contains only one groovy class), keeping all the stubs in memory occupies at most 30M space. In addition, we can clean stubs in memory when co

Re: [PROPOSAL]Provide an option to generate stubs in in-momery file system for better compiling performance

2019-01-19 Thread Daniel.Sun
I found gradle's Java compiler(not reuse Groovy's `JavacJavaCompiler`) relies on the stubs on disk... When I enabled generating stub in memory, Groovy's `JavacJavaCompiler` is refined so it can find stubs smartly, and everything is OK, but gradle's Java compiler can not find stub files and throws e

Re: [PROPOSAL]About creating open collective for Groovy programming language in the name of Groovy Community

2019-01-19 Thread Jennifer Strater
Hi everyone, Was there a response from the Apache foundation? And as always, just let me know if I can help. Best, Jenn On Thu, Jan 10, 2019 at 10:35 AM Marcin Erdmann wrote: > Given that I have no association with ASF nor am I a PMC member or a > committer I would be happy to take ownership

Re: [PROPOSAL]Provide an option to generate stubs in in-momery file system for better compiling performance

2019-01-19 Thread Daniel.Sun
[Help wanted] Even if I add "--add-modules java.compiler --add-opens java.compiler/javax.tools=ALL-UNNAMED" to JVM, the following error( Type javax.tools.JavaFileObject not present ) still happens when running on Java9+... Any advice to fix the issue? Thanks in advance! java.lang.TypeNotPresent

Re: [PROPOSAL]About creating open collective for Groovy programming language in the name of Groovy Community

2019-01-19 Thread Daniel.Sun
No response util now... Cheers, Daniel.Sun - Apache Groovy committer Blog: http://blog.sunlan.me Twitter: @daniel_sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Re: [PROPOSAL]Provide an option to generate stubs in in-momery file system for better compiling performance

2019-01-19 Thread Daniel.Sun
I found the issue is related to the specified parent classloader: https://github.com/apache/groovy/blob/master/src/test/org/codehaus/groovy/transform/classloading/TransformsAndCustomClassLoadersTest.groovy#L46 Looking for the way to expose javax.tools classes to the classloader... - Apache

Re: [PROPOSAL]Provide an option to generate stubs in in-momery file system for better compiling performance

2019-01-19 Thread Daniel.Sun
Use `ClassLoader.getPlatformClassLoader()` instead to solve the issue. GroovyClassLoader dependencyLoader = new GroovyClassLoader(new URLClassLoader(urls, (ClassLoader)ClassLoader.getPlatformClassLoader())) class loading changed in Java 9+. WTF! Cheers, Daniel.Sun - Apache Groovy commit

Re: [PROPOSAL]About creating open collective for Groovy programming language in the name of Groovy Community

2019-01-19 Thread MG
Was also wondering about that... The funding topic has been brought up several times and it always seems to go back to sleep without any progress, so hope this time will be different. I feel it should not be this hard to give some money to the project one likes, just because it is a Apache pr

Re: [PROPOSAL]Provide an option to generate stubs in in-momery file system for better compiling performance

2019-01-19 Thread Remi Forax
- Mail original - > De: "Daniel.Sun" > À: "dev" > Envoyé: Samedi 19 Janvier 2019 16:44:43 > Objet: Re: [PROPOSAL]Provide an option to generate stubs in in-momery file > system for better compiling performance > Use `ClassLoader.getPlatformClassLoader()` instead to solve the issue. > >

Re: [PROPOSAL]Provide an option to generate stubs in in-momery file system for better compiling performance

2019-01-19 Thread Daniel.Sun
Gotcha. Thanks for your explanation, Rémi :-) Cheers, Daniel.Sun - Apache Groovy committer Blog: http://blog.sunlan.me Twitter: @daniel_sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html