tschuchortdev / kotlin-compile-testing

A library for testing Kotlin and Java annotation processors, compiler plugins and code generation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Kotlin 1.8.21

dariuszkuc opened this issue Β· 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!

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.

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