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
546 stars 128 forks source link

Do not create the directories ".bsp" and ".scala-build" when launching a JAR #2712

Open spacebanana420 opened 8 months ago

spacebanana420 commented 8 months ago

Is your feature request related to a problem? Please describe.

scala-cli will become the new "scala" tool soon, and so I will use it in place of the current tool. I occasionally launch lightweight JARs either created by scalac or by scala-cli with the library package format. This allows me to not have to run an assembly JAR or a self-executable JAR. However, when using scala-cli to run these JARs, the hidden directories ".bsp" and ".scala-build" are created in the current directory.

Describe the solution you'd like

Gedochao commented 8 months ago

I don't think we can skip creating .scala-build, as that's where bloop files / compiler output files go, among other things... maybe in certain circumstances we could skip it, but I'd rather not for consistent behaviour. I guess we could skip .bsp if we don't have inputs other than jars and they were passed explicitly instead of through their parent directory, as there's nothing to import to the IDE then.