lazy bug report: I had a query `SomefooQuery` with...
# apollo-kotlin
w
lazy bug report: I had a query
SomefooQuery
with generated Kotlin classes. I renamed it to
SomeFooQuery
, and
compileKotlin
failed with
Redeclaration: SomeFooQuery
and
Redeclaration: SomefooQuery
errors. Seems like the lowercase file was kept and shouldn’t,
--rerun-tasks
fixed the issue
👀 1
m
This is super weird, the first thing the GraphQL compiler is doing is removing the whole output directory...
Also shouldn't the Kotlin compiler be case sensitive and allow both
SomefooQuery
and
SomeFooQuery
?
Eh I can reproduce 🤔
Could it be some weird incremental Kotlin compiler issue on MacOS case insensitive filesystem?
I've been hit by this recently: https://youtrack.jetbrains.com/issue/KT-48797
w
I can’t reproduce it when renaming a regular class in a similar fashion. But kapt runs on that module too, let me try a simpler one
Yeah it doesn’t happen just when I rename a class from
Somefoo
to
SomeFoo
, even if it’s in the same module that generates apollo classes in our project
👀 1
m
Mmm I can reproduce renaming a regular class/file.
Copy code
Options for KOTLIN DAEMON: IncrementalCompilationOptions(super=CompilationOptions(compilerMode=INCREMENTAL_COMPILER, targetPlatform=JVM, reportCategories=[0], reportSeverity=2, requestedCompilationResults=[0]kotlinScriptExtensions=[kt, kts, java, java]), areFileChangesKnown=true, modifiedFiles=[/Users/mbonnin/git/apollo-android/tests/models-compat/src/commonMain/kotlin/main.kt, /Users/mbonnin/git/apollo-android/tests/models-compat/src/commonMain/kotlin/main.kt], deletedFiles=[/Users/mbonnin/git/apollo-android/tests/models-compat/src/commonMain/kotlin/Main.kt, /Users/mbonnin/git/apollo-android/tests/models-compat/src/commonMain/kotlin/Main.kt], workingDir=/Users/mbonnin/git/apollo-android/tests/models-compat/build/kotlin/compileKotlinJvm, multiModuleICSettings=MultiModuleICSettings(buildHistoryFile=/Users/mbonnin/git/apollo-android/tests/models-compat/build/kotlin/compileKotlinJvm/build-history.bin, useModuleDetection=false), usePreciseJavaTracking=trueoutputFiles=[/Users/mbonnin/git/apollo-android/tests/models-compat/build/classes/kotlin/jvm/main, /Users/mbonnin/git/apollo-android/tests/models-compat/build/kotlin/compileKotlinJvm])
e: /Users/mbonnin/git/apollo-android/tests/models-compat/src/commonMain/kotlin/Main.kt: (1, 8): Redeclaration: main
e: /Users/mbonnin/git/apollo-android/tests/models-compat/src/commonMain/kotlin/main.kt: (1, 8): Redeclaration: main
I think incremental compilation + MacOS case insensitive filesystem aren't really friends
I'll try to make a reproducer for Youtrack
🙏 1