You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@groovy.apache.org by Peter Ledbrook <pe...@cacoethes.co.uk> on 2015/05/27 10:27:08 UTC
Unit tests from IDE
Hi,
When trying to run one of the unit tests in GroovyCharSequenceMethodsTest
from IntelliJ IDEA, I encountered a build error from AntlrParserPlugin:
Error:(127, 29) java: no suitable constructor found for
GroovyLexer(org.codehaus.groovy.antlr.UnicodeLexerSharedInputState)
constructor
org.codehaus.groovy.antlr.parser.GroovyLexer.GroovyLexer(java.io.InputStream)
is not applicable
(argument mismatch;
org.codehaus.groovy.antlr.UnicodeLexerSharedInputState cannot be converted
to java.io.InputStream)
constructor
org.codehaus.groovy.antlr.parser.GroovyLexer.GroovyLexer(java.io.Reader) is
not applicable
(argument mismatch;
org.codehaus.groovy.antlr.UnicodeLexerSharedInputState cannot be converted
to java.io.Reader)
constructor
org.codehaus.groovy.antlr.parser.GroovyLexer.GroovyLexer(groovyjarjarantlr.InputBuffer)
is not applicable
(argument mismatch;
org.codehaus.groovy.antlr.UnicodeLexerSharedInputState cannot be converted
to groovyjarjarantlr.InputBuffer)
constructor
org.codehaus.groovy.antlr.parser.GroovyLexer.GroovyLexer(groovyjarjarantlr.LexerSharedInputState)
is not applicable
(argument mismatch;
org.codehaus.groovy.antlr.UnicodeLexerSharedInputState cannot be converted
to groovyjarjarantlr.LexerSharedInputState)
Is this to be expected? Can we not run unit tests from an IDE? That would
be a shame as the ":test" task takes a couple of minutes to complete, which
means I don't want to run it frequently.
Thanks,
Peter
Re: Unit tests from IDE
Posted by Peter Ledbrook <pe...@cacoethes.co.uk>.
Thanks, the ./gradlew jar does fix the problem. I'll send a pull request
updating the README.
Peter
> I started with
>
> ./gradlew jarAll idea
>
> and then opened the project in the IDE. Since then, I think I've only run
>
> ./gradlew test
>
> since then. Note that the project README says to run `jarAll` and `idea`
> together. Is the information incorrect?
>
> It is likely outdated. I think it should be `jar` and `idea` together.
>
> Thanks,
>
> Peter
>
>
Re: Unit tests from IDE
Posted by Cédric Champeau <ce...@gmail.com>.
On 05/27/2015 11:01 AM, Peter Ledbrook wrote:
>
> What Gradle tasks did you run before? It's worth knowing that if
> you run
> ./gradlew jarAll or any task that depends on it, the jar will be
> modified (jarjared) and it will break IDE support. Fixing is as
> easy as
> running ./gradlew jar.
>
>
> I started with
>
> ./gradlew jarAll idea
>
> and then opened the project in the IDE. Since then, I think I've only run
>
> ./gradlew test
>
> since then. Note that the project README says to run `jarAll` and
> `idea` together. Is the information incorrect?
>
It is likely outdated. I think it should be `jar` and `idea` together.
> Thanks,
>
> Peter
--
Cédric Champeau
Groovy language developer
http://twitter.com/CedricChampeau
http://melix.github.io/blog
Re: Unit tests from IDE
Posted by Peter Ledbrook <pe...@cacoethes.co.uk>.
>
> What Gradle tasks did you run before? It's worth knowing that if you run
> ./gradlew jarAll or any task that depends on it, the jar will be
> modified (jarjared) and it will break IDE support. Fixing is as easy as
> running ./gradlew jar.
>
I started with
./gradlew jarAll idea
and then opened the project in the IDE. Since then, I think I've only run
./gradlew test
since then. Note that the project README says to run `jarAll` and `idea`
together. Is the information incorrect?
Thanks,
Peter
Re: Unit tests from IDE
Posted by Cédric Champeau <ce...@gmail.com>.
On 05/27/2015 10:27 AM, Peter Ledbrook wrote:
> Hi,
>
> When trying to run one of the unit tests in
> GroovyCharSequenceMethodsTest from IntelliJ IDEA, I encountered a
> build error from AntlrParserPlugin:
>
> Error:(127, 29) java: no suitable constructor found for
> GroovyLexer(org.codehaus.groovy.antlr.UnicodeLexerSharedInputState)
> constructor
> org.codehaus.groovy.antlr.parser.GroovyLexer.GroovyLexer(java.io.InputStream)
> is not applicable
> (argument mismatch;
> org.codehaus.groovy.antlr.UnicodeLexerSharedInputState cannot be
> converted to java.io.InputStream)
> constructor
> org.codehaus.groovy.antlr.parser.GroovyLexer.GroovyLexer(java.io.Reader)
> is not applicable
> (argument mismatch;
> org.codehaus.groovy.antlr.UnicodeLexerSharedInputState cannot be
> converted to java.io.Reader)
> constructor
> org.codehaus.groovy.antlr.parser.GroovyLexer.GroovyLexer(groovyjarjarantlr.InputBuffer)
> is not applicable
> (argument mismatch;
> org.codehaus.groovy.antlr.UnicodeLexerSharedInputState cannot be
> converted to groovyjarjarantlr.InputBuffer)
> constructor
> org.codehaus.groovy.antlr.parser.GroovyLexer.GroovyLexer(groovyjarjarantlr.LexerSharedInputState)
> is not applicable
> (argument mismatch;
> org.codehaus.groovy.antlr.UnicodeLexerSharedInputState cannot be
> converted to groovyjarjarantlr.LexerSharedInputState)
>
> Is this to be expected? Can we not run unit tests from an IDE? That
> would be a shame as the ":test" task takes a couple of minutes to
> complete, which means I don't want to run it frequently.
>
> Thanks,
>
> Peter
What Gradle tasks did you run before? It's worth knowing that if you run
./gradlew jarAll or any task that depends on it, the jar will be
modified (jarjared) and it will break IDE support. Fixing is as easy as
running ./gradlew jar.
--
Cédric Champeau
Groovy language developer
http://twitter.com/CedricChampeau
http://melix.github.io/blog