Closed Alankar0416 closed 2 years ago
You always have to use the version of kotlin-compiler-embeddable and KSP that matches the KCT version. If I check out the 1.4.2 tag, it says in the readme that the matching compatible compiler version at that time was 1.5.10, so it's natural that you receive binary incompatibility errors. You should use KCT version 1.4.5 or use KSP 1.5.10.
Thanks for your reply
I tried using KCT version 1.4.5 along with kotlin-compiler-embeddable:1.5.31 and KSP:1.5.31-1.0.1 as per your suggestion. But still getting the same error.
I tried changing the dependencies as per this example.
Here we are using -
KCT:1.4.4
kotlin-compiler-embeddable:1.5.31
KSP:1.5.31-1.0.0
Now the tests are working. Do you know why it should not work with 1.4.5?
It is also throwing the same error with these set of versions
KCT:1.4.4 kotlin-compiler-embeddable:1.5.31 KSP:1.5.31-1.0.1
So we can say KCT:1.4.4 is working with compiler version 1.0.0 but not with 1.0.1
That's weird. It must have worked with that version (1.5.31-1.0.0) at the time of publishing, demonstrably, or else the CI pipeline would have failed. I've checked out the repository you linked and its tests passed for me both with KCT 1.4.5, 1.4.4, 1.4.2 and surprisingly 1.4.8. KCT 1.4.5 also worked for me with KSP 1.5.31-1.0.1. Perhaps there are weird things going on with caching, but even invalidating the IDE caches doesn't change the result.
The same is true for KCT:1.4.5
Works :
KCT:1.4.5 kotlin-compiler-embeddable:1.5.31 KSP:1.5.31-1.0.0
Does not work: KCT:1.4.5 kotlin-compiler-embeddable:1.5.31 KSP:1.5.31-1.0.1
I was also suspecting caching but then I cloned the repository and added dependencies again to verify if this is due to caching. Same results
I can't personally reproduce this, so I'm just gonna trust you that the issue is with KSP 1.5.31-1.0.1 while the library was built with KSP 1.5.31-1.0.0. Unfortunately, I can't amend the documentation retroactively to point this out, but I hope that it's working for you now, at least.
Yes, @tschuchortdev we moved our stack to
KSP: 1.6.21-1.0.5 kotlin-compiler-embeddable:1.6.21 KCT: 1.4.8 KCT-KSP: 1.4.8
I have verified that it's working fine now with this stack.
Thanks for taking a look at this.
I am trying to run some tests using kotlin-compile-testing-ksp:1.4.2 but end up getting this error. Not able to figure out the reason.
Looks like something is missing from KSP. The version that I am using is 1.5.31-1.0.1