Hi everyone, I want to migrate to Kotlin `1.9.0` from `1.8.22` . It all works well on my machine but...
d
Hi everyone, I want to migrate to Kotlin
1.9.0
from
1.8.22
. It all works well on my machine but fails during a build on CI with:
Copy code
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':kotlinStoreYarnLock'.
> yarn.lock was changed. Run the `kotlinUpgradeYarnLock` task to actualize yarn.lock file
I tried running
kotlinUpgradeYarnLock
on my machine but there is no change to yarn lock.
h
Do you use a different os? I often just delete the yarn lock file and rerun the task.
Or node version?
Ultimate hack: expose the yarn file as ci artifact and compare it locally
d
There is an OS difference between CI and my machine but there was no issue with
1.8.22
I will try your hack
This is a machine yarn.lock
And this one CI
no difference 😕
For test purpose I added
./gradlew kotlinUpgradeYarnLock
before build and looks like lock files are different 😕
Any idea why this happens with
1.9.0
and didn’t with
1.8.22
. Also how to mitigate that.
a
One of the variant, is it possible that you run different compiler version locally and on CI? It could be that you commit the yarn.lock that was generated by one version of the compiler and on the CI, you use another version that requires to update your lock file.
d
There is no difference between the local code and CI’s branch. To be specific the Kotlin update PR branch that CI use was created by renovate and I fetched it. Then removed
yarn.lock
run
./gradlew kotlinStoreYarnLock
and committed changes.
a
Such a weird situation. We will try to investigate the problem on our side, but, if you will find a solution or work-around - please, notify us
d
Sure
Let me know if you need more details
i
Could you please check
build/js/packages_imported/kotlin-test-js-runner/package.json
? Does it contain block
devDependencies
? It has not to be in
1.9.0
If yes, please try to run
clean
firstly
d
Copy code
{
  "name": "kotlin-test-js-runner",
  "version": "0.0.1",
  "main": "lib/index.js",
  "types": "lib/index.d.ts",
  "devDependencies": {
    "@types/node": "^12.12.14",
    "rimraf": "^3.0.0",
    "rollup": "^2.68.0",
    "@rollup/plugin-commonjs": "^21.0.1",
    "@rollup/plugin-node-resolve": "^13.1.3",
    "rollup-plugin-sourcemaps": "^0.6.3",
    "@rollup/plugin-typescript": "^8.3.0",
    "rollup-plugin-terser": "^7.0.2",
    "typescript": "^3.7.2",
    "format-util": "^1.0.5",
    "tslib": "^2.3.1",
    "is-wsl": "^2.2.0"
  },
  "dependencies": {}
}
after running
clean
build
failed due to lock change
i
Yes, looks like locally something was not updated with such
kotlin-test-js-runner
It should not contain
devDependencies
d
I run
kotlinStoreYarnLock
and pushed
i
So, I think we can do things better here. As I can see we did not update
version
for this package (it is synthetic, not real, but better update, so it will be point to fail gradle’s up-to-date check)
👍 1
d
I will know in a couple of minutes if CI build passed
It’s all good now 🙂
Thanks!
a
Also bumped into this issue,
clean
helped. Thanks!
👆 1
1012 Views