Skip to content

sbt disc cache does not work with coverage #124

Description

@ArtyomGabeev

Hi,

Running next step on GHA with disc-cache enabled:

      - name: Build and Test
        shell: bash
        run: |
          sbt -mem 2048 "clean; scalafmtCheckAll; scalafmtSbtCheck; scalafixAll --check; coverage; testFull; coverageOff; coverageAggregate;

Getting following error:

Caused by: java.io.FileNotFoundException: /home/runner/_work/..../target/out/jvm/scala-3.8.4/common/scoverage-data/scoverage.measurements.39b6c629-b211-4a28-8da2-cf46a2524066.883 (No such file or directory)
[error] 	at java.base/java.io.FileOutputStream.open0(Native Method)
[error] 	at java.base/java.io.FileOutputStream.open(FileOutputStream.java:255)
[error] 	at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:210)
[error] 	at java.base/java.io.FileWriter.<init>(FileWriter.java:116)
[error] 	at scala.runtime.coverage.Invoker$.$anonfun$2(Invoker.scala:47)
[error] 	at scala.collection.mutable.HashMap.getOrElseUpdate(HashMap.scala:475)
[error] 	at scala.runtime.coverage.Invoker$.invoked(Invoker.scala:47)
....

Disabling disc-cache solves the issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions