Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allTests Gradle task fails after adding v0.6.0-RC.2 dependency #379

Closed
erikhuizinga opened this issue Apr 10, 2024 · 3 comments
Closed

allTests Gradle task fails after adding v0.6.0-RC.2 dependency #379

erikhuizinga opened this issue Apr 10, 2024 · 3 comments

Comments

@erikhuizinga
Copy link

In my KMP JB-Compose (https://github.com/JetBrains/compose-multiplatform/releases/tag/v1.6.1) project, after adding the kotlinx.datetime 0.6.0-RC.2 dependency, the Gradle task allTests fails with the following error in the Gradle logs. This issue does not occur with kotlinx.datetime v0.5.0.

404: /absolute/var/folders/wr/cwkk1nld4yx87g2y0g152vqr0000gp/T/_karma_webpack_121626/node_modules_js-joda_core_dist_js-joda_esm_js.js
  (error: /var/folders/wr/cwkk1nld4yx87g2y0g152vqr0000gp/T/_karma_webpack_121626/node_modules_js-joda_core_dist_js-joda_esm_js.js)
      at __webpack_require__.f.j (/var/folders/wr/cwkk1nld4yx87g2y0g152vqr0000gp/T/_karma_webpack_121626/runtime.js:292:29)
      at /var/folders/wr/cwkk1nld4yx87g2y0g152vqr0000gp/T/_karma_webpack_121626/runtime.js:153:40
      at Array.reduce (<anonymous>)
      at __webpack_require__.e (/var/folders/wr/cwkk1nld4yx87g2y0g152vqr0000gp/T/_karma_webpack_121626/runtime.js:152:67)
      at instantiate (/Users/username/github/company/project-prototype/kmp/build/js/packages/ProjectPoCLibraryAndDemo-shared-wasm-js-test/kotlin/ProjectPoCLibraryAndDemo-shared-wasm-js-test.uninstantiated.mjs:13:73 <- load.579565371.js:47:93)
      at /Users/username/github/company/project-prototype/kmp/build/js/packages/ProjectPoCLibraryAndDemo-shared-wasm-js-test/kotlin/ProjectPoCLibraryAndDemo-shared-wasm-js-test.mjs:3:34 <- load.579565371.js:18:178
      at __webpack_require__.a (/var/folders/wr/cwkk1nld4yx87g2y0g152vqr0000gp/T/_karma_webpack_121626/runtime.js:83:13)
      at ./kotlin/ProjectPoCLibraryAndDemo-shared-wasm-js-test.mjs (load.579565371.js:10:21)
      at Function.__webpack_require__ (/var/folders/wr/cwkk1nld4yx87g2y0g152vqr0000gp/T/_karma_webpack_121626/runtime.js:23:41)
java.lang.IllegalStateException: command '/Users/username/.gradle/nodejs/node-v18.12.1-darwin-arm64/bin/node' exited with errors (exit code: 1)

> Task :shared:allTests FAILED

Maybe useful to reproduce the issue: my libs.versions.toml file (note that not all deps are actually used, partially because this project still contains a lot of the config generated by https://kmp.jetbrains.com/):

[versions]
agp = "8.2.0"
android-compileSdk = "34"
android-minSdk = "24"
android-targetSdk = "34"
androidx-activityCompose = "1.8.2"
androidx-appcompat = "1.6.1"
androidx-constraintlayout = "2.1.4"
androidx-core-ktx = "1.12.0"
androidx-espresso-core = "3.5.1"
androidx-material = "1.11.0"
androidx-test-junit = "1.1.5"
compose = "1.6.3"
compose-plugin = "1.6.1"
junit = "4.13.2"
kotlin = "1.9.23"
kotlinx-datetime = "0.6.0-RC.2"
ktor = "2.3.9"
logback = "1.5.3"
structurizr-cli = "1.9.0"

[libraries]
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidx-core-ktx" }
androidx-test-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-junit" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidx-espresso-core" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidx-appcompat" }
androidx-material = { group = "com.google.android.material", name = "material", version.ref = "androidx-material" }
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "androidx-constraintlayout" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
logback = { module = "ch.qos.logback:logback-classic", version.ref = "logback" }
ktor-server-core = { module = "io.ktor:ktor-server-core-jvm", version.ref = "ktor" }
ktor-server-netty = { module = "io.ktor:ktor-server-netty-jvm", version.ref = "ktor" }
ktor-server-tests = { module = "io.ktor:ktor-server-tests-jvm", version.ref = "ktor" }

[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
androidLibrary = { id = "com.android.library", version.ref = "agp" }
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
ktor = { id = "io.ktor.plugin", version.ref = "ktor" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
structurizrCli = { id = "pl.zalas.structurizr-cli", version.ref = "structurizr-cli" }
@dkhalanskyjb
Copy link
Collaborator

Sorry, no idea what's going on without a reproducer. This could be a problem with the tooling, or a mismatch between compiler versions, or anything, really.

@erikhuizinga
Copy link
Author

I'll try to create simple steps to reproduce now.

@erikhuizinga
Copy link
Author

While trying to create steps to reproduce, I identified a similar issue unrelated to kotlinx.datetime in an early step (before adding the dependency on kotlinx.datetime), so it's probably unrelated to this repo. Thanks for responding quickly and sorry to bother you. I'll try to find the correct repository to report this in. Probably https://github.com/JetBrains/compose-multiplatform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants