https://kotlinlang.org logo
Title
p

Paul Woitaschek

11/09/2021, 2:26 PM
Found it! Just write the exact same file twice in ksp and it breaks :kspKotlinMetadata
It's very strange, an integration test I created fails with this
Caused by: kotlin.io.FileAlreadyExistsException: /tmp/junit17700583748346553475/workload/build/generated/ksp/main/kotlin/meop/Goo.kt
	at com.google.devtools.ksp.processing.impl.CodeGeneratorImpl.createNewFile(CodeGeneratorImpl.kt:74)
But in my own project that works just fine
(and fails with the obscure error
e

elihart

11/09/2021, 5:06 PM
write the exact same file twice in ksp
this is expected behavior - it isn’t supported to write to the same file twice. The error message could be improved though
p

Paul Woitaschek

11/09/2021, 5:08 PM
No the issue is that the wrong error message gets created