You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Vladimir Sitnikov <si...@gmail.com> on 2018/09/15 18:37:29 UTC

Avoid re-generate Parser.jj on each build if the parser was not modified

Hi,

I'm sure lots of us have seen during Maven build even though the sources
were not changed:
   Compiling 1155 source files to .../code/calcite/core/target/classes

The issue there is FMPP generates Parser.jj no matter what, and it causes
JavaCC to re-generate parser which causes maven-compiler-plugin to compile
calcite-core again.
Note: Maven sends all the files to javac and it assumes javac is
intelligent enough to identify which files were modified and which need to
be recompiled.

Unfortunately, regular javac is not incremental, and it basically builds
the whole source tree (see
https://issues.apache.org/jira/browse/MCOMPILER-209 )

I propose to use org.apache.drill.tools:drill-fmpp-maven-plugin instead of
com.googlecode.fmpp-maven-plugin:fmpp-maven-plugin.
Drill's fmpp plugin compares outputs, thus it skips overwrite of Parser.jj,
and it improves Calcite Core build times.
I'm sure IDEs would be happier since Parser.jj and the generated parser are
quite big and IDE won't have to re-parse it.

JIRA: https://issues.apache.org/jira/browse/CALCITE-2558
PR: https://github.com/apache/calcite/pull/832

From my point of view this is an improvement with no drawbacks.
Any thoughts? Objections?

Vladimir

Re: Avoid re-generate Parser.jj on each build if the parser was not modified

Posted by Enrico Olivelli <eo...@gmail.com>.
+1 awesome idea
Thanks
Enrico

Il sab 15 set 2018, 20:56 Vladimir Sitnikov <si...@gmail.com>
ha scritto:

> >Can you nag the Drill folks to contribute their changes back, if their
> plugin is a fork?
>
> Original plugin is not maintained. It was hosted on GoogleCode which was
> closed, and I couldn't find a continuation.
>
> Vladimir
>
-- 


-- Enrico Olivelli

Re: Avoid re-generate Parser.jj on each build if the parser was not modified

Posted by Vladimir Sitnikov <si...@gmail.com>.
>Can you nag the Drill folks to contribute their changes back, if their
plugin is a fork?

Original plugin is not maintained. It was hosted on GoogleCode which was
closed, and I couldn't find a continuation.

Vladimir

Re: Avoid re-generate Parser.jj on each build if the parser was not modified

Posted by Julian Hyde <jh...@gmail.com>.
Great idea. 

Can you nag the Drill folks to contribute their changes back, if their plugin is a fork?

Julian

> On Sep 15, 2018, at 11:37, Vladimir Sitnikov <si...@gmail.com> wrote:
> 
> Hi,
> 
> I'm sure lots of us have seen during Maven build even though the sources
> were not changed:
>   Compiling 1155 source files to .../code/calcite/core/target/classes
> 
> The issue there is FMPP generates Parser.jj no matter what, and it causes
> JavaCC to re-generate parser which causes maven-compiler-plugin to compile
> calcite-core again.
> Note: Maven sends all the files to javac and it assumes javac is
> intelligent enough to identify which files were modified and which need to
> be recompiled.
> 
> Unfortunately, regular javac is not incremental, and it basically builds
> the whole source tree (see
> https://issues.apache.org/jira/browse/MCOMPILER-209 )
> 
> I propose to use org.apache.drill.tools:drill-fmpp-maven-plugin instead of
> com.googlecode.fmpp-maven-plugin:fmpp-maven-plugin.
> Drill's fmpp plugin compares outputs, thus it skips overwrite of Parser.jj,
> and it improves Calcite Core build times.
> I'm sure IDEs would be happier since Parser.jj and the generated parser are
> quite big and IDE won't have to re-parse it.
> 
> JIRA: https://issues.apache.org/jira/browse/CALCITE-2558
> PR: https://github.com/apache/calcite/pull/832
> 
> From my point of view this is an improvement with no drawbacks.
> Any thoughts? Objections?
> 
> Vladimir

Re: Avoid re-generate Parser.jj on each build if the parser was not modified

Posted by Julian Hyde <jh...@apache.org>.
Yes, I checked, the Drill plugin is the best there is. (Freemarker is
now an Apache project, but I don't see any sign of them wanting to
adopt FMPP.)
On Sat, Sep 15, 2018 at 12:24 PM Michael Mior <mm...@apache.org> wrote:
>
> +1 Thanks Vladimir!
>
> --
> Michael Mior
> mmior@apache.org
>
>
> Le sam. 15 sept. 2018 à 14:37, Vladimir Sitnikov <
> sitnikov.vladimir@gmail.com> a écrit :
>
> > Hi,
> >
> > I'm sure lots of us have seen during Maven build even though the sources
> > were not changed:
> >    Compiling 1155 source files to .../code/calcite/core/target/classes
> >
> > The issue there is FMPP generates Parser.jj no matter what, and it causes
> > JavaCC to re-generate parser which causes maven-compiler-plugin to compile
> > calcite-core again.
> > Note: Maven sends all the files to javac and it assumes javac is
> > intelligent enough to identify which files were modified and which need to
> > be recompiled.
> >
> > Unfortunately, regular javac is not incremental, and it basically builds
> > the whole source tree (see
> > https://issues.apache.org/jira/browse/MCOMPILER-209 )
> >
> > I propose to use org.apache.drill.tools:drill-fmpp-maven-plugin instead of
> > com.googlecode.fmpp-maven-plugin:fmpp-maven-plugin.
> > Drill's fmpp plugin compares outputs, thus it skips overwrite of Parser.jj,
> > and it improves Calcite Core build times.
> > I'm sure IDEs would be happier since Parser.jj and the generated parser are
> > quite big and IDE won't have to re-parse it.
> >
> > JIRA: https://issues.apache.org/jira/browse/CALCITE-2558
> > PR: https://github.com/apache/calcite/pull/832
> >
> > From my point of view this is an improvement with no drawbacks.
> > Any thoughts? Objections?
> >
> > Vladimir
> >

Re: Avoid re-generate Parser.jj on each build if the parser was not modified

Posted by Michael Mior <mm...@apache.org>.
+1 Thanks Vladimir!

--
Michael Mior
mmior@apache.org


Le sam. 15 sept. 2018 à 14:37, Vladimir Sitnikov <
sitnikov.vladimir@gmail.com> a écrit :

> Hi,
>
> I'm sure lots of us have seen during Maven build even though the sources
> were not changed:
>    Compiling 1155 source files to .../code/calcite/core/target/classes
>
> The issue there is FMPP generates Parser.jj no matter what, and it causes
> JavaCC to re-generate parser which causes maven-compiler-plugin to compile
> calcite-core again.
> Note: Maven sends all the files to javac and it assumes javac is
> intelligent enough to identify which files were modified and which need to
> be recompiled.
>
> Unfortunately, regular javac is not incremental, and it basically builds
> the whole source tree (see
> https://issues.apache.org/jira/browse/MCOMPILER-209 )
>
> I propose to use org.apache.drill.tools:drill-fmpp-maven-plugin instead of
> com.googlecode.fmpp-maven-plugin:fmpp-maven-plugin.
> Drill's fmpp plugin compares outputs, thus it skips overwrite of Parser.jj,
> and it improves Calcite Core build times.
> I'm sure IDEs would be happier since Parser.jj and the generated parser are
> quite big and IDE won't have to re-parse it.
>
> JIRA: https://issues.apache.org/jira/browse/CALCITE-2558
> PR: https://github.com/apache/calcite/pull/832
>
> From my point of view this is an improvement with no drawbacks.
> Any thoughts? Objections?
>
> Vladimir
>