geb / issues

Repository for Geb's issue tracker
12 stars 4 forks source link

Can't compile tests after ugprading to recent snapshot with implicit assertions #176

Closed geb-bot closed 9 years ago

geb-bot commented 12 years ago

Originally created by Christoph Neuroth.

I just pulled from github, cleaned and built geb-core, geb-junit4, geb-spock and implicit-assertion jars. When compiling our test base against the new JARs I get one warning caused by a NPE (only once during the clean build, stacktrace below). After the build, all JUnit tests fail with "no runnable test methods", specs fail with a more useful error: "was not compiled properly (Spock AST transform was not run); try to do a clean build". Clean build doesn't seem to help though.

Stacktrace from compile-time warning:

java.lang.NullPointerException at org.codehaus.groovy.classgen.asm.AssertionWriter.record(AssertionWriter.java:211) at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethodCallExpression(AsmClassGenerator.java:662) at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:75) at org.codehaus.groovy.classgen.asm.CallSiteWriter.makeCallSite(CallSiteWriter.java:301) at org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:182) at org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:87) at org.codehaus.groovy.classgen.asm.InvocationWriter.makeInvokeMethodCall(InvocationWriter.java:71) at org.codehaus.groovy.classgen.asm.InvocationWriter.writeInvokeMethod(InvocationWriter.java:287) at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethodCallExpression(AsmClassGenerator.java:661) at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:75) at org.codehaus.groovy.classgen.AsmClassGenerator.visitBooleanExpression(AsmClassGenerator.java:654) at org.codehaus.groovy.ast.expr.BooleanExpression.visit(BooleanExpression.java:40) at org.codehaus.groovy.classgen.asm.AssertionWriter.writeAssertStatement(AssertionWriter.java:84) at org.codehaus.groovy.classgen.asm.StatementWriter.writeAssert(StatementWriter.java:542) at org.codehaus.groovy.classgen.AsmClassGenerator.visitAssertStatement(AsmClassGenerator.java:426) at org.codehaus.groovy.ast.stmt.AssertStatement.visit(AssertStatement.java:47) at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:292) at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:254) at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:422) at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:41) at org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:80) at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:151) at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:406) at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:101) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:112) at org.codehaus.groovy.classgen.AsmClassGenerator.visitStdMethod(AsmClassGenerator.java:289) at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:268) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:123) at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:366) at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1056) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:50) at org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:174) at org.codehaus.groovy.control.CompilationUnit$13.call(CompilationUnit.java:763) at org.codehaus.groovy.control.CompilationUnit$13.call(CompilationUnit.java:780) at org.codehaus.groovy.control.CompilationUnit$13.call(CompilationUnit.java:780) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:957) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:542) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:520) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:497) at org.jetbrains.groovy.compiler.rt.GroovyCompilerWrapper.compile(GroovyCompilerWrapper.java:43) at org.jetbrains.groovy.compiler.rt.GroovycRunner.main(GroovycRunner.java:146) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:75)

geb-bot commented 12 years ago

Originally posted by Luke Daley.

The latest snapshot just pushed should solve this. Please try it out and report back.

geb-bot commented 12 years ago

Originally posted by Christoph Neuroth.

yup, fixed, thanks.

geb-bot commented 12 years ago

Resolved