VirtusLab / scala-cli

Scala CLI is a command-line tool to interact with the Scala language. It lets you compile, run, test, and package your Scala code (and more!)
https://scala-cli.virtuslab.org
Apache License 2.0
545 stars 127 forks source link

Exclude directive is not honored for directories under Windows #2973

Open nemoo opened 3 months ago

nemoo commented 3 months ago

Scala-cli 1.2.0 Windows 11

Describe the bug The "exclude" directive is not honored for directories under Windows.

To Reproduce create Main.scala:

//> using exclude "input"

@main def go = println("Hello")

create input/Source.scala:

a

When running in Windows 11, produced the error:

[error] .\input/Source.scala:1:1
[error] Illegal start of toplevel definition
[error] a
[error] ^

Expected behaviour It should not try to compile files underneath the input directory because I have explicitly excluded the whole directory via the exclude directive. Also writing it like that is ignored: //> using exclude "input/*"

bishabosha commented 3 months ago

I dont think its just windows - I also can't get it to work in https://github.com/bishabosha/ops-mirror (im using macOS)