bmuschko / gradle-clover-plugin

Gradle plugin for generating a code coverage report using Clover
Apache License 2.0
74 stars 49 forks source link

Getting Signature Parse error with Grails project #141

Open seanleblanc opened 5 years ago

seanleblanc commented 5 years ago

I'm seeing this when I try to run coverage. Any suggestions on things to try?

java.lang.reflect.GenericSignatureFormatError: Signature Parse error: Failure to make progress!

Alex-Vol-SV commented 5 years ago

This is a very unhelpful issue report. Need a full stack trace to fix or even attempt to root cause it.

seanleblanc commented 5 years ago

Apologies. Does this help?

FAILURE: Build failed with an exception.

Alex-Vol-SV commented 5 years ago

Not much, this looks like a failure in your own code. Please do as the error says and use --stacktrace

Alex-Vol-SV commented 5 years ago

Are you using reflection in your code/unit tests? Are you using other plugins with AST transformations? Need more info and a full stacktrace.

seanleblanc commented 5 years ago

FAILURE: Build failed with an exception.

BUILD FAILED

seanleblanc commented 5 years ago

As far as use of reflection and/or AST, I believe Grails does AST itself and I found at least one used import of Method from java.lang.reflect in a controller somewhere.

Alex-Vol-SV commented 5 years ago

I am afraid this is outside the scope of this plugin. The Groovy ANT compiler task it processing code and it almost seems as if there is an ANT parser failure. I will try to trace into the ANT tools source to see if this makes sense but I do not see how this is fixable from the Clover plugin viewpoint. Is the TradeTransaction class one of your own code? I cannot tell what this class is about and it is not one of this plugin.

One possibility is classpath name collision with some JAR files in your classpath for tests.

seanleblanc commented 5 years ago

That class is one of our own. I've looked at it and things that use it for something that looks like that signature, or for code that seems unusual in some way but nothing comes to mind yet.

Thanks for looking at it, though. I did post something on the OpenClover issues site, too, but so far, no response.

ukbarr commented 4 years ago

hi,

i got this error too, i have found the why in my case.

i have a hasMany [titi: Titi] used like this in a method :

titi?.first()?.field

this code generate the "java.lang.reflect.GenericSignatureFormatError: Signature Parse error: Failure to make progress!" because titi it's not a Set class but a Titi class

so i use an intermediate method to hide it and it's work 👍

getFirstField(titi)

private Field getFirstField(titi){ titi?.first()?.field }

hope it will help someone because i have lost 3 days on this problem