google / ksp

Kotlin Symbol Processing API
https://github.com/google/ksp
Apache License 2.0
2.9k stars 276 forks source link

Spaces in path names do not work #2076

Open Emill opened 2 months ago

Emill commented 2 months ago

It seems KSP does not handle spaces correctly in path names, as this error is thrown: https://github.com/google/ksp/blob/6af707744124998f61fa71bbf4e218e3d7a024bc/gradle-plugin/src/main/kotlin/com/google/devtools/ksp/gradle/KspSubplugin.kt#L182

This causes issues like these: https://slack-chats.kotlinlang.org/t/22922140/hii-all-can-someone-help-me-out-figuring-this-error-ksp-apop https://github.com/android/nowinandroid/issues/604

I suggest fixing the regex/parser to handle spaces in path names instead of forcing the user to move the project to a directory without spaces.

See https://androidx.tech/artifacts/room/room-gradle-plugin/2.6.1-source/androidx/room/gradle/RoomGradlePlugin.kt.html for where in Room this room.internal.schemaInput argument is created.

xicotet commented 1 month ago

It kind of sucks because in my case I cannot simply move the project to another directory: my Windows user root folder contains a whitespace. So the alternative for me is to create another user in my computer and migrate everything there...