groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Johnson <>
Subject Advice on compiler bug workaround
Date Sat, 20 Feb 2016 12:19:13 GMT
I'm working on a large Groovy project that is several years old.   We've
upgraded the Groovy compiler many times.  I upgraded to the last version
three or four months ago.

The system has three major packages.  There is a core library and two
applications that use it; a web app and a Swing app.  The library is quite
a bit larger than the apps.

In the past, I would sometime run into compiler errors.   I use Eclipse,
and Eclipse is controlling the build.   When this happened, I'd tell it to
clean all projects.  Each of the three packages I mentioned is a separate
Eclipse project.  Sometimes cleaning projects worked, sometimes it took a
bit of fiddling to figure out how to get around the error.

I've been happy with the latest version of Groovy, and hadn't had any
compiler problems with it til yesterday.  After 4-6 hours of fiddling, I am
still stuck.  So, I am trying to get ideas about what to do next.

The main problem is with the web app.  When I clean and rebuild, it ends up
in one of several states.  One state is where two of the files (out of
about 80) have errors, but the particular files change and the errors are
weird.   One file has dozens of errors, all of the form "Unexpected MOP
methods in the class node for$2$toString)"
where the xxx.YYY is always a different class in the web app (not in the
much bigger library), the number 2 is usually a different small integer,
and "toString" is often "toString" but often a different method name, like
"getStaticMetaClass", "setReadOnly", or "addItem".  The other file has just
one error, "internal compiler error".

Another state is where it tells me it can't build the library and so can't
build the apps.  But then it doesn't tell me anything about why it can't
build the library.

The system was working in the morning, and then it broke.  I know which
class I was editing, so I can go back to an earlier version if necessary.
However, the code was boring.   I haven't written any new metaprogramming
code for months, so I am pretty sure the "Unexpected MOP methods" error are
not my fault.  The error messages never happen in the classes I changed
yesterday, but always in classes I haven't changed for months.

Any suggestions about what to try next?

-Ralph Johnson

View raw message