Kotlin / dukat

Converter of <any kind of declarations> to Kotlin external declarations
552 stars 44 forks source link

All Node.js definitions are generated (broken) when adding @actions/cache #397

Open Vampire opened 3 years ago

Vampire commented 3 years ago

When I added @actions/cache here: https://github.com/Vampire/setup-wsl/blob/master/buildSrc/src/main/kotlin/net/kautler/node.gradle.kts#L119, Dukat started to generate definitions for all of Node.js even with me using kotlinx-nodejs. Those generated definitions have many problems and they should probably not be there at all. Even with generateExternals = false they were generated (https://youtrack.jetbrains.com/issue/KT-41232). My work-around was to delete all generated *.module_node.kt files: https://github.com/Vampire/setup-wsl/blob/master/buildSrc/src/main/kotlin/net/kautler/node.gradle.kts#L141-L144

Vampire commented 3 years ago

Actually it seems to not be @actions/cache alone, but in combination with something else. If you take https://github.com/Vampire/setup-wsl/ as playground, you can use the :generateExternals task to see what is generated. In buildSrc/src/main/kotlin/net/kautler/node.gradle.kts you can configure which dependencies are included. It seems that if you have @actions/cache and @actions/http-client included, then all the wrong files are generated but not if you only have one of them.

Vampire commented 3 years ago

And @actions/cache together with @actions/exec also produces some, but not as many.