-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[KSP2] Running from command line never finishes #2176
Comments
We found that integration-tests/src/test/kotlin/com/google/devtools/ksp/test/KSPCmdLineOptionsIT.kt has an example of running KSP2 from the command line, which is executed via Gradle TestKit in the integration tests. We tried to reproduce it directly in the command line, but it never completes. ksp version 2.0.21-1.0.26 /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/java -cp "/Users/myname/projects/ksp/integration-tests/../build/repos/test/com/google/devtools/ksp/symbol-processing-common-deps/2.0.255-SNAPSHOT/symbol-processing-common-deps-2.0.255-20241103.122206-9.jar:/Users/myname/projects/ksp/integration-tests/../build/repos/test/com/google/devtools/ksp/symbol-processing-aa-embeddable/2.0.255-SNAPSHOT/symbol-processing-aa-embeddable-2.0.255-20241103.122206-9.jar:/Users/myname/projects/ksp/integration-tests/../build/repos/test/com/google/devtools/ksp/symbol-processing-api/2.0.255-SNAPSHOT/symbol-processing-api-2.0.255-20241103.122206-9.jar:/Users/myname/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/2.0.21/618b539767b4899b4660a83006e052b63f1db551/kotlin-stdlib-2.0.21.jar" com.google.devtools.ksp.cmdline.KSPJvmMain -module-name=main -project-base-dir /var/folders/w3/fvm0bhqn3tnf576y1kcjc8tr0000gn/T/junit679361217183761514 -source-roots /var/folders/w3/fvm0bhqn3tnf576y1kcjc8tr0000gn/T/junit679361217183761514/workload/src/ -output-base-dir=/var/folders/w3/fvm0bhqn3tnf576y1kcjc8tr0000gn/T/junit679361217183761514/build/out -caches-dir=/var/folders/w3/fvm0bhqn3tnf576y1kcjc8tr0000gn/T/junit679361217183761514/build/out -class-output-dir=/var/folders/w3/fvm0bhqn3tnf576y1kcjc8tr0000gn/T/junit679361217183761514/build/out -kotlin-output-dir=/var/folders/w3/fvm0bhqn3tnf576y1kcjc8tr0000gn/T/junit679361217183761514/build/out -resource-output-dir /var/folders/w3/fvm0bhqn3tnf576y1kcjc8tr0000gn/T/junit679361217183761514/build/out -language-version=2.0 -api-version=2.0 -java-output-dir /var/folders/w3/fvm0bhqn3tnf576y1kcjc8tr0000gn/T/junit679361217183761514/build/out -jvm-target 11 /var/folders/w3/fvm0bhqn3tnf576y1kcjc8tr0000gn/T/junit679361217183761514/processors/build/libs/processors-1.0-SNAPSHOT.jar -processor-options error=true It works successfully when run with Gradle TestKit, but it doesn’t complete when using the command line. Even after adding |
I also noticed the CLI never ends when I tried upgrading KSP. I don't have a reproducer at hand but this is indeed a significant issue for us |
Thanks for reporting this issue. I can reproduce it. Something seems wrong when returning from |
we used to repeat ksp command when using ksp1, from args print by gradle with
--debug
optionsthe output like
but when we set
ksp.useKSP2=true
,--debug
do not generate any konanc args. I understand that's because ksp2 is no longer a compiler plugin like the docs said, but https://github.com/google/ksp/blob/2.0.21-1.0.26/docs/ksp2cmdline.md is not clear enough for a new ksp user without gradle in ci environment like me (for example i don't know what kotlin-analysis-api-2.0.0-1.0.21.jar is, and can't find it in kotlinc/kotlin-native/ksp downloaded). Can we still have a direct view on what command is exec now, pls... Thank you very much.The text was updated successfully, but these errors were encountered: