https://kotlinlang.org logo
#javascript
Title
# javascript
t

Tom Yuval

08/20/2022, 1:24 PM
Related but slightly different, and possibly just as n00by: I’m building a multi-platform library, and my tests fail on JS IR, though they pass on all other platforms – including JS Legacy. Where can I find the two generated JS versions of the code so that I can compare them and gain any insight into what’s going on there?
t

turansky

08/20/2022, 4:03 PM
:root:/build/js/packages
t

Tom Yuval

08/20/2022, 7:16 PM
Thanks for the lead, @turansky! For others stumbling upon this, here’s what I found more specifically, having cleared the
build
directory and then run all tests with Gradle: • For JS IR, I’ve found that all generated JS code – including both main and test, and including other libraries depended on – is under
build/js/packages/<my-package>-js-ir-test/kotlin
. • For JS Legacy, the generated JS code is found in several places: ◦ The main code is under
build/js/packages/<my-package>-js-legacy/kotlin
. ◦ The test code is under
build/js/packages/<my-package>-js-legacy-test/kotlin
. ◦ Each dependency is under
build/js/packages_imported/<dependency>/<version>
. That answers my original question 🙂 (Now, depending on what I find in the code, there may or may not be some follow-up questions…)
2 Views