kotlin-compile-testing icon indicating copy to clipboard operation
kotlin-compile-testing copied to clipboard

Support Kotlin 1.8.21

Open dariuszkuc opened this issue 2 years ago • 2 comments

Hello 👋

Awesome work on the library! By any chance there will be a new version released soon that supports Kotlin v1.8.21?

I tried updating it (link) but sadly there is some change in behavior in v1.8.20 that breaks JS compiler. Nothing jumps out from the release notes - they did add alpha support for new JS IR compiler but that "shouldn't" affect the legacy compiler.

After updating to v1.8.20+ JS compilation fails asking to set some IR properties (-ir-output-dir and -ir-output-name). I tried updating the default KotlinJsCompilation#jsArgs() args to include those but that didn't work either, i.e. I added the following

args.moduleName = "KCT"
args.outputDir = outputDir.toString()

With the above JS compilation runs but does not produce any outputs.... Any help would be appreciated!

dariuszkuc avatar May 24 '23 21:05 dariuszkuc

I'm glad to hear that you like it. In cases like this, I find it often helps to grep the Kotlin repository to look for any changes that suggest how to use the new options.

With the above JS compilation runs but does not produce any outputs

With that change are your tests failing or are they green? In the linked PR, all tests are green and they seem to do some rudimentary tests for the contents of the generated JS file.

tschuchortdev avatar May 26 '23 19:05 tschuchortdev

With that change are your tests failing or are they green? In the linked PR, all tests are green and they seem to do some rudimentary tests for the contents of the generated JS file.

Tests were failing on my machine - there were no generated JS files so assertions were failing. Thanks for taking a look!


edit: Doh! I did a toString on a file vs using absolute path

dariuszkuc avatar May 26 '23 19:05 dariuszkuc