You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@groovy.apache.org by Jochen Theodorou <bl...@gmx.org> on 2016/11/04 17:01:46 UTC
restructuring sources
Hi all,
after playing around with the idea of having the parser in its own
project I started wondering if we should not reorganize the project a
little.
Right now we do a compileJava, produce a bootstrap.jar from that and
then compileGroovy using the bootstrap.jar
Why don�t we move all the bootstrap classes into a bootstrap subproject
and have the remaining java and groovy classes in another (or in main)?
I think then we could also for example get rid of the ant jar call to
produce the bootstrap.jar
bye Jochen
Re: restructuring sources
Posted by Jochen Theodorou <bl...@gmx.org>.
On 04.11.2016 23:20, Jochen Theodorou wrote:
> On 04.11.2016 18:03, C�dric Champeau wrote:
>> +1, I also want to restructure the Gradle build at some point. It's
>> really inefficient as it is now.
>
> the "only" trouble is... to get a fully working groovy compiler we need
> some classes which reference classes of the runtime. To just name a few:
> * CompilationUnit: referencing GroovyClassLoader
> * ClassHelper: referencing about every groovy.lang class... and from
> there it goes to the runtime
>
> CompilationUnit is something that could be fixed... but it is a breaking
> change. But in case of ClassHelper it is almost a conceptual problem. I
> cannot even use Reflection instead of direct class usage, because I
> really need the information from those. Which means I would have to
> manually build the ClassNode for each of these classes including
> generics. And even then... once somebody wants to call getTypeClass on
> these, there is trouble
nope, I think this will not work.... I mean the static compiler will
also need the classes
so I guess the only possible split is between java code independent of
groovy and mixed groovy/java code
hm... what if we use an older Groovy version to let the antlr plugin to
compile against? Frankly that is a general strategy we should consider.
It is not uncommon in the world of compilers
bye Jochen
Re: restructuring sources
Posted by Jochen Theodorou <bl...@gmx.org>.
On 04.11.2016 18:03, C�dric Champeau wrote:
> +1, I also want to restructure the Gradle build at some point. It's
> really inefficient as it is now.
the "only" trouble is... to get a fully working groovy compiler we need
some classes which reference classes of the runtime. To just name a few:
* CompilationUnit: referencing GroovyClassLoader
* ClassHelper: referencing about every groovy.lang class... and from
there it goes to the runtime
CompilationUnit is something that could be fixed... but it is a breaking
change. But in case of ClassHelper it is almost a conceptual problem. I
cannot even use Reflection instead of direct class usage, because I
really need the information from those. Which means I would have to
manually build the ClassNode for each of these classes including
generics. And even then... once somebody wants to call getTypeClass on
these, there is trouble
bye Jochen
Re: restructuring sources
Posted by Cédric Champeau <ce...@gmail.com>.
+1, I also want to restructure the Gradle build at some point. It's really
inefficient as it is now.
2016-11-04 18:01 GMT+01:00 Jochen Theodorou <bl...@gmx.org>:
> Hi all,
>
> after playing around with the idea of having the parser in its own project
> I started wondering if we should not reorganize the project a little.
>
> Right now we do a compileJava, produce a bootstrap.jar from that and then
> compileGroovy using the bootstrap.jar
>
> Why don´t we move all the bootstrap classes into a bootstrap subproject
> and have the remaining java and groovy classes in another (or in main)? I
> think then we could also for example get rid of the ant jar call to produce
> the bootstrap.jar
>
> bye Jochen
>