<div dir="ltr">Yep, it&#39;s a hog :/</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 15, 2013 at 6:17 AM, Max Rydahl Andersen <span dir="ltr">&lt;<a href="mailto:manderse@redhat.com" target="_blank">manderse@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Mon, May 13, 2013 at 02:38:21PM -0400, Lincoln Baxter, III wrote:<br>
&gt;Do you have a suggestion for an alternate Groovy parser to use if we cannot<br>
&gt;use groovy eclipse?<br>
<br>
</div>Nope - its one of the reasons I consider Gradle as evil as Ant in many places :)<br>
<div class="im"><br>
&gt;Also, even if we do, this should not  (unless the Eclipse JDT does some<br>
&gt;*really bad* things), be a problem because it will be loaded in an isolated<br>
&gt;classloader.<br>
<br>
</div>Just please consider memory usage - these are not exactly &quot;small&quot; on memory usage.<br>
<span class="HOEnZb"><font color="#888888"><br>
/max<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
&gt;<br>
&gt;<br>
&gt;On Mon, May 13, 2013 at 12:55 PM, Max Rydahl Andersen<br>
&gt;&lt;<a href="mailto:manderse@redhat.com">manderse@redhat.com</a>&gt;wrote:<br>
&gt;<br>
&gt;&gt; Just a warning about using groovy eclipse plugin - it historically have<br>
&gt;&gt; had a dependency<br>
&gt;&gt; on a patched Eclipse JDT meaning it&#39;s not installable on just any eclipse<br>
&gt;&gt; version.<br>
&gt;&gt;<br>
&gt;&gt; I would hope if you just need a groovy parser that you don&#39;t have a<br>
&gt;&gt; depenency on Eclipse JDT for that<br>
&gt;&gt; - but if you do then that might become tricky (might also be osgi<br>
&gt;&gt; dependencies to deal with, but<br>
&gt;&gt; that is another concern ;)<br>
&gt;&gt;<br>
&gt;&gt; If the dependency will be included into eclipse as a forge loaded lib we<br>
&gt;&gt; might avoid it all - but<br>
&gt;&gt; since forge itself also have a dependency on JDT it is something to keep<br>
&gt;&gt; an eye on for possible<br>
&gt;&gt; version mismatches.<br>
&gt;&gt;<br>
&gt;&gt; /max<br>
&gt;&gt;<br>
&gt;&gt; On Sun, May 12, 2013 at 06:00:20PM +0200, Adam Wyłuda wrote:<br>
&gt;&gt; &gt;Hi Lincoln!<br>
&gt;&gt; &gt;Thank you for your response, it&#39;s nice to hear that my proposal is rated<br>
&gt;&gt; &gt;positively.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;I first thought that creating our own Groovy parser which works directly<br>
&gt;&gt; on<br>
&gt;&gt; &gt;Groovy AST would be a good idea because that would give us more<br>
&gt;&gt; &gt;possibilities than existing solutions, but you are right - there is a risk<br>
&gt;&gt; &gt;that it might take more time than planned (although basic support could be<br>
&gt;&gt; &gt;provided which could be sufficient to work on Gradle project files).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;I have found this paper which gave me some insights on problems related to<br>
&gt;&gt; &gt;Groovy script parsing and modification:<br>
&gt;&gt; &gt;<a href="http://groovy.ifs.hsr.ch/groovy-refactoring.pdf" target="_blank">http://groovy.ifs.hsr.ch/groovy-refactoring.pdf</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;It seems that the biggest issue is how to rewrite code without changing<br>
&gt;&gt; its<br>
&gt;&gt; &gt;formatting and how to keep comments in code. Groovy AST doesn&#39;t contain<br>
&gt;&gt; &gt;comment nodes so if we want to use pure Groovy AST to parse it, we need to<br>
&gt;&gt; &gt;include all whitespace and comments in our model, what is possible because<br>
&gt;&gt; &gt;Groovy AST nodes include position in source information, so we could just<br>
&gt;&gt; &gt;substring our source between statements, but it&#39;s hard because we need to<br>
&gt;&gt; &gt;check thoroughly every expression as comments can appear between any<br>
&gt;&gt; nodes,<br>
&gt;&gt; &gt;like this:<br>
&gt;&gt; &gt;x = y + /* comment */ z<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;So as you said, it&#39;s better to use existing solution so we won&#39;t reinvent<br>
&gt;&gt; &gt;the wheel. I think that Groovy Eclipse plugin is the best candidate<br>
&gt;&gt; because<br>
&gt;&gt; &gt;it&#39;s API is similar to JDT plugin used in JavaParser (actually Groovy<br>
&gt;&gt; &gt;plugin uses JDT and it even seems to be a part of JDT), so it will be more<br>
&gt;&gt; &gt;convenient for other developers with JavaParser experience to maintain it.<br>
&gt;&gt; &gt;The are also alternatives like NetBeans or IntelliJ IDEA plugin, but I<br>
&gt;&gt; &gt;think Eclipse plugin is sufficient enough to work effectively with Groovy<br>
&gt;&gt; &gt;sources.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;Like you suggested I updated my proposal to give myself some time to<br>
&gt;&gt; &gt;understand Groovy Eclipse plugin API and start working on Gradle project<br>
&gt;&gt; &gt;support earlier.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;2013/5/7 Lincoln Baxter, III &lt;<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; Hey Adam,<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Thank you so much for your proposal! We have reviewed your submission<br>
&gt;&gt; and<br>
&gt;&gt; &gt;&gt; so far all the mentors have given it a high rating :)<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I took a look at your prototype groovy-manager project, which looks very<br>
&gt;&gt; &gt;&gt; interesting. You are doing source parsing for groovy, which is pretty<br>
&gt;&gt; &gt;&gt; challenging.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; While writing a parser from scratch can be a thrilling challenge, I have<br>
&gt;&gt; &gt;&gt; to say that it can be quite a burden! We started writing our own<br>
&gt;&gt; &gt;&gt; Java-parser for Forge, but quickly came to find that even parsing a<br>
&gt;&gt; &gt;&gt; type-safe language is incredibly difficult.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; We ended up using the Eclipse JDT as a base implementation for our<br>
&gt;&gt; &gt;&gt; JavaParser.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Have you looked for any Groovy parsers that may already exist today?<br>
&gt;&gt; This<br>
&gt;&gt; &gt;&gt; would give you a quick boost when working on this project. It may be the<br>
&gt;&gt; &gt;&gt; case that the parser would require some usability improvements to make<br>
&gt;&gt; &gt;&gt; integration with Forge simpler, and simpler for plugin devs, but I<br>
&gt;&gt; think it<br>
&gt;&gt; &gt;&gt; is safe to say that a search for existing parsers is warranted.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; If a suitable parser can be found, I would suggest that we revise your<br>
&gt;&gt; &gt;&gt; proposal to allow for several weeks to become familiar with that parser,<br>
&gt;&gt; &gt;&gt; and then allocate the rest of the time to actually working with it to<br>
&gt;&gt; &gt;&gt; implement the gradle support.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I&#39;d suggest starting here, with the Groovy Eclipse Plugin - they almost<br>
&gt;&gt; &gt;&gt; certainly already support groovy syntax:<br>
&gt;&gt; &gt;&gt; <a href="http://groovy.codehaus.org/Eclipse+Plugin#EclipsePlugin-KeyFeatures" target="_blank">http://groovy.codehaus.org/Eclipse+Plugin#EclipsePlugin-KeyFeatures</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; The problem with writing your own parser is that you have to maintain it<br>
&gt;&gt; &gt;&gt; :) Better to delegate.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; ~Lincoln<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Sun, May 5, 2013 at 5:05 PM, Adam Wyłuda &lt;<a href="mailto:adamwyl92@gmail.com">adamwyl92@gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Hello JBoss community,<br>
&gt;&gt; &gt;&gt;&gt; This year I want to participate in an OS project and GSoC gives me<br>
&gt;&gt; great<br>
&gt;&gt; &gt;&gt;&gt; opportunity to do so.<br>
&gt;&gt; &gt;&gt;&gt; Here is my idea as GSoC 2013 proposal:<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; <a href="http://www.google-melange.com/gsoc/proposal/review/google/gsoc2013/adamw/1" target="_blank">http://www.google-melange.com/gsoc/proposal/review/google/gsoc2013/adamw/1</a><br>
&gt;&gt; &gt;&gt;&gt; I&#39;d be very happy to hear your opinions (I hope it&#39;s not too late).<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt;&gt; forge-dev mailing list<br>
&gt;&gt; &gt;&gt;&gt; <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
&gt;&gt; &gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; Lincoln Baxter, III<br>
&gt;&gt; &gt;&gt; <a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>
&gt;&gt; &gt;&gt; &quot;Simpler is better.&quot;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; forge-dev mailing list<br>
&gt;&gt; &gt;&gt; <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
&gt;&gt; &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; &gt;_______________________________________________<br>
&gt;&gt; &gt;forge-dev mailing list<br>
&gt;&gt; &gt;<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
&gt;&gt; &gt;<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; forge-dev mailing list<br>
&gt;&gt; <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;--<br>
&gt;Lincoln Baxter, III<br>
&gt;<a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>
&gt;&quot;Simpler is better.&quot;<br>
<br>
&gt;_______________________________________________<br>
&gt;forge-dev mailing list<br>
&gt;<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
&gt;<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
<br>
_______________________________________________<br>
forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Lincoln Baxter, III<br>
<a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br>&quot;Simpler is better.&quot;
</div>