Overcompilation when no files have changed #3198
Labels
duplicate
This issue or pull request already exists
performance
Issues concerning performance of the CLI.
Scala Native
scripting
Issues tied to *.sc script inputs.
Version(s)
1.5.0
Describe the bug
When doing
scala-cli run . --native
, it seems that the project is being recompiled (I can see warnings being re-emitted) even though nothing has changed:This adds overhead to the command, where actually running the binary takes 2ms on my laptop, but running
scala-cli run . --native
takes 30ms, even though it literally just runs the binary (or at least should). A user reports even higher overhead on a non-trivial program.I don't know if Bloop actually compiles anything, but this certainly takes quite a bit of time (in relative terms)
To Reproduce
Then run
scala-cli run . --native
a bunch of times. Warnings are re-emitted every time. Running with-v -v
actually shows the bloop request being sent.Expected behaviour
When no input files or parameters have changed, I expect the overhead of
scala-cli run
to be much lower.The text was updated successfully, but these errors were encountered: