With Kotlin 2.2.0 I'm seeing a ton of ```> Task :k...
# javascript
c
With Kotlin 2.2.0 I'm seeing a ton of
Copy code
> Task :kotlinNpmInstall FAILED
error <https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz>: Extracting tar content of undefined failed, the file appears to be corrupt: "ENOENT: no such file or directory, open '/usr/local/share/.cache/yarn/v6/npm-webpack-merge-4.2.2-a27c52ea783d1398afd2087f547d7b9d2f43634d-integrity/node_modules/webpack-merge/lib/join-arrays.js.map'"
across all my projects, across all CI runners, with different packages. Do we know what could cause this? At the moment, it's hard to upgrade because all JS pipelines fail more than ~50% of the time
r
I've got the same problems.
Can't build directly on github actions but also can't in a docker container.
After some attempts today I assumed there is something wrong with github.
But as you are probably running Gitlab CI ...
t
We use NPM instead of Yarn and have no such problems
c
Yep, GitLab CI on my side, also reproducible locally
r
I'm trying with
kotlin.js.yarn=false
now ...
Seems to work now
😜 1
e
Tho it should still be working with Yarn. npm is not the default yet. Worth reporting
c
I'm trying it as well…
Yep, no problems either with NPM
o
c
I do use build cache, but it's not enabled in my CIs at the moment…
o
Hmm, in my case it is clearing the GH action cache that makes a failed build work again... But though I've applied the above workaround, this thing is still hitting me now and then. Maybe it's time to abandon Yarn in KGP.
e
Doesn't that (
--network-concurrency 1
) mean installing packages will take longer?
And it would have been interesting to understand why it did not happen in previous releases.
o
To me it seems that the
--mutex network
option is the important one. Otherwise, Gradle could spawn parallel Yarn invocations via KGP, and these invocations would not synchronize with each other, leading to file corruption. Could it be a factor that Gradle is increasingly using parallelism where it did not use it before? In my case, Gradle 8.14.2 runs parallel tasks even with
org.gradle.parallel=false
.
e
Yup I agree with you. Are you going to post a comment there about it, or I'm gonna go for it?
o
The comment idea is yours, so feel free!
thank you color 1
e
Posted, let's see.
❤️ 1
r
This is an old Yarn issue - https://github.com/yarnpkg/yarn/issues/2629 . But I wonder why it is showing up now for us? Perhaps because KGP 2.2.0 runs two Yarn processes - for js and for wamsJS targets?
o
That makes sense. The Wasm/JS and JS separation is new.
e
But does that mean the problem appears only when both targets are enabled? @CLOVIS what's your setup?
a
@Ilya Goncharov [JB] ^^
o
Quick update: Still had GH cache issues after applying the workaround for Yarn. Switched to Npm. No issues so far.