I have different kotlin multiplatform libraries an...
# library-development
a
I have different kotlin multiplatform libraries and I am publishing them on github CI. I keep getting flaky fails with the error
Copy code
* What went wrong:
Execution failed for task ':kotlinStorePackageLock'.
> Lock file was changed. Run the `kotlinUpgradePackageLock` task to actualize lock file
Simply rerunning the action makes the build pass. To mitigate this, I have tried running the task
kotlinUpgradePackageLock
on CI, before running the build task, but even, that task itself fails sometimes. Anyone facing this issue? How do I solve this?
j
The only times it happened to me were legitimate, like only in CI builds for PRs that bump Kotlin, for example
e
I've had this for a while (there's an issue filed somewhere but I can't find it right now). I resolve it by running it again with
--rerun-tasks
. Very annoying
a
I will try the
--rerun-tasks
flag for now. But I think it does defeat the purpose for
package.lock
. Can you remember what seemed to be causing the issue?
e
Something to do with test dependencies IIRC
a
Thanks @eygraber
its funny how this also failed
Copy code
kevlar-builder:
    runs-on: 'macos-latest'
    steps:
    - id: 'step-0'
      uses: 'actions/checkout@v3'
      with:
        submodules: 'true'
    - id: 'step-1'
      uses: 'actions/setup-java@v3'
      with:
        java-version: '18'
        distribution: 'corretto'
    - id: 'step-2'
      name: 'Make ./gradlew executable'
      working-directory: 'kevlar'
      run: 'chmod +x ./gradlew'
    - id: 'step-3'
      name: 'Updating package.lock'
      uses: 'gradle/gradle-build-action@v2'
      with:
        build-root-directory: './kevlar'
        cache-disabled: 'true'
        arguments: 'kotlinUpgradePackageLock'
    - id: 'step-4'
      name: 'Assuring package.lock is well updated'
      uses: 'gradle/gradle-build-action@v2'
      with:
        build-root-directory: './kevlar'
        cache-disabled: 'true'
        arguments: 'kotlinUpgradePackageLock --rerun-tasks'
    - id: 'step-5'
      name: 'building kevlar-core'
      uses: 'gradle/gradle-build-action@v2'
      with:
        build-root-directory: './kevlar'
        cache-disabled: 'true'
        arguments: ':kevlar-core:build'
😔