Trying to run a simple test on mingwX64 and getting this weird error
Copy code
Cause: cannot assign instance of java.util.Collections$EmptyList to field java.lang.StackTraceElement.moduleVersion of type java.lang.String in instance of java.lang.StackTraceElement
The test
Copy code
import kotlin.test.Test
import kotlin.test.assertEquals
class TestMe {
@Test
fun shouldTest(){
assertEquals("test", "test");
}
}
Any pointers?
r
rnett
07/18/2021, 7:40 PM
Sounds like a compiler or gradle issue from the presence of the jvm classes. Do you have a full stacktrace?
b
Big Chungus
07/18/2021, 7:41 PM
No, that's the problem. Very little info is printed and test reports are not written. I'll see if I can squeeze something more of it later today.
Big Chungus
07/18/2021, 7:42 PM
I suspect it's related to cinterops that my main sourceSets have, as it works after removing them
r
rnett
07/18/2021, 7:46 PM
I ran into truncated error reports, try:
Copy code
tasks.withType(AbstractTestTask::class.java).configureEach {
testLogging {
showExceptions = true // It is true by default. Set it just for explicitness.
exceptionFormat = TestExceptionFormat.FULL
}
}
and running gradle with
--stacktrace
. If that doesn't work maybe try debugging the gradle task? It usually picks up compiler errors if I set
-Dkotlin.compiler.execution.strategy="in-process"
👌 1
b
Big Chungus
07/21/2021, 10:59 AM
Turns out you can just run ./test.exe manually for a full test log (I wish it'd show up in gradle logs too). That revealed that my issue was simply missing ddl on the path.