Skip to content

Got error when running scala-cli in a directory with .scala-build with previous scala-compiler version #4013

@dragove

Description

@dragove

Version(s)
Scala CLI version: 1.11.0
Scala version (default): 3.7.4

Describe the bug
got error when running scala-cli

[E] Scala instance jar /home/dove/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.7.1/scala3-compiler_3-3.7.1.jar doesn't exist!

To Reproduce

mkdir re && cd re
printf "//> using jvm 21\n//> using scala 3.7.1" > project.scala
echo 'println("hi")' > demo.sc
scala-cli .
# after running finished
jps | grep BloopServer | cut -d " " -f 1 | xargs kill
sed -i 's/3.7.1/3.7.4/' project.scala
rm ~/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.7.1/scala3-compiler_3-3.7.1.jar
scala-cli .

Expected behaviour

There should not report an error since the compiler version has already changed.

Additional Information

This problem can not be reproduced without kill the bloop server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BloopIssues tied with Bloop integration.Community help wantedIssues that idicate features that are nice-to-have but core team does not have time to work on itbugSomething isn't workingpriority: low

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions