Skip to content

Stale error reports are sometimes shown #1054

@romanowski

Description

@romanowski

Version(s)

0.1.6

Describe the bug

When I run echo 'println("Hello")' | scala-cli _ and then echo 'println("Hello")' | scala-cli _ .sc I get:

> echo 'println("Hello")' | scala-cli _                                                                                                
Compiling project (Scala 3.1.2, JVM)
[error] <stdin>:1:1: Illegal start of toplevel definition
Error compiling project (Scala 3.1.2, JVM)
Compilation failed
> echo 'println("Hello")' | scala-cli _.sc 
[error] /Users/kromanowski/Library/Caches/ScalaCli/virtual-projects/7d/project-34b8e93c/.scala-build/project_103be31561_103be31561/src_generated/main/stdin.scala:1:1: Illegal start of toplevel definition
[error] ^^^^^^^
Hello

To Reproduce

Run:

echo 'println("Hello")' | scala-cli _   
echo 'println("Hello")' | scala-cli _.sc      

Expected behaviour
No error message in the 2nd run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrequires scopingIssue requires a spike to revalidate it and assign an up-to date scope for its requirements.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions