grails and IDEA 9.0.2, "cannot assign 'closure'..."

I've been using IDEA 7 and 8 for grails work without any issues; I upgraded to 9.0.1 a couple of months ago but other than just running it a couple of times I have done nothing until just now. And seeing that 9.0.2 was available I thought it best to upgrade before I resume the grails work in earnest.

But...I see everywhere: "Cannot assign 'Closure' to Object ..."

I can see that this is caused by a setting of the code Inspection parameters - but it's an odd setting for groovy/grails, isn't it ? After all, closures are used everywhere!

I have turned it off now but am obviously a little concerned that the default had it turned on - is it new in 9.0.2 ? (when I installed it just unherited the settings from the previous installation)

graham

4 comments
Comment actions Permalink

Do you have Groovy jar in your module dependencies (presumably in the
Grails SDK library)?

0
Comment actions Permalink

By the looks of it, no.

I upgraded to grails 1.3.1 as part of this work. So I've changed ProjectStructure->Libraries to point to grails\grails-1.3.1\dist. I notice that grails 1.2.2 (which I did use with IDEA v8) has the same jars in its dist directory. From memory I thought that there used to be a groovy-all.jar but it's not there now, but I cannot pretend to actually have checked these entries previously.

Other than that it's just standard grails 1.3.1

graham


0
Comment actions Permalink

There's a 'Grails Upgrade' action available in project view. It would do
everything for you. In particular, the Grails library should include not
only dist jars, but also every one from Grails' lib directory, where
groovy-all resides.

0
Comment actions Permalink

IDEA offered the upgrade automatically, so I let it do it, when I first loaded it after I changed the value of the grails library.

I've now added the grails lib directory to the ProjectSettings->GlobalLibraries and the message has gone.

I must admit I've always found the ProjectSettings->Libraries and Global Libraries slightly odd, well, I don't use it that often and it does seem to work a little oddly. Perhaps in the past it used to only need to be pointed to the 'grails' directory, but I noticed a version or so ago I had to point it to the grails/dist...or so it seemed.

graham

0

Please sign in to leave a comment.