You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build.sbt: scalaVersion := "3.3.0"
sbt v1.9.3
Running in PowerShell in VS Code
steps
run sbt -error ~run
problem
Non error output that looks to come from the "watcher" is displayed
PS C:\MainFiles\ScalaDocs\hello-world> sbt -error ~run
Hello, World!
[info] 1. Monitoring source files for hello-world/run...
[info] Press to interrupt or '?' for more options.
[info] Build triggered by C:\MainFiles\ScalaDocs\hello-world\src\main\scala\Main.scala. Running 'run'.
Hello, World!
[success] Total time: 7 s, completed 13 Aug 2023, 18:12:13
[info] 2. Monitoring source files for hello-world/run...
[info] Press to interrupt or '?' for more options.
expectation
There would be no output aside from program output and errors.
notes
For reference here is the full output without -error. The first run [success] is not printed, but "watcher" output and subsequent [success]s are - I am guess that the task is run once and conforms, but the watcher spins up in a separate "thread", and performs subsequent runs non comformantly. (Output that is printed above in bold.)
PS C:\MainFiles\ScalaDocs\hello-world> sbt ~run
[info] welcome to sbt 1.9.2 (Amazon.com Inc. Java 18.0.2)
[info] loading settings for project hello-world-build-build from metals.sbt ...
[info] loading project definition from C:\MainFiles\ScalaDocs\hello-world\project\project
[info] loading settings for project hello-world-build from metals.sbt ...
[info] loading project definition from C:\MainFiles\ScalaDocs\hello-world\project
[success] Generated .bloop\hello-world-build.json
[success] Total time: 2 s, completed 13 Aug 2023, 18:05:59
[info] loading settings for project hello-world from build.sbt ...
[info] set current project to hello-world (in build file:/C:/MainFiles/ScalaDocs/hello-world/)
[info] sbt server started at local:sbt-server-f0eed868f6240def273b
[info] started sbt server
[info] running Main Hello, World!
[success] Total time: 2 s, completed 13 Aug 2023, 18:06:03 [info] 1. Monitoring source files for hello-world/run...
[info] Press to interrupt or '?' for more options.
[info] Build triggered by C:\MainFiles\ScalaDocs\hello-world\src\main\scala\Main.scala. Running 'run'.
[info] compiling 1 Scala source to C:\MainFiles\ScalaDocs\hello-world\target\scala-3.3.0\classes ...
[info] running Main
Hello, World!
[success] Total time: 7 s, completed 13 Aug 2023, 18:06:17
[info] 2. Monitoring source files for hello-world/run...
[info] Press to interrupt or '?' for more options.
Also tested with ~compile and -warn
PS C:\MainFiles\ScalaDocs\hello-world> sbt -error ~compile
[info] 1. Monitoring source files for hello-world/compile...
[info] Press to interrupt or '?' for more options.
[info] Build triggered by C:\MainFiles\ScalaDocs\hello-world\src\main\scala\Main.scala. Running 'compile'.
[success] Total time: 7 s, completed 13 Aug 2023, 17:50:33
[info] 2. Monitoring source files for hello-world/compile...
[info] Press to interrupt or '?' for more options.
PS C:\MainFiles\ScalaDocs\hello-world> sbt -warn ~run
Hello, World!
[info] 1. Monitoring source files for hello-world/run...
[info] Press to interrupt or '?' for more options.
[info] Build triggered by C:\MainFiles\ScalaDocs\hello-world\src\main\scala\Main.scala. Running 'run'.
Hello, World!
[success] Total time: 7 s, completed 13 Aug 2023, 18:13:40
[info] 2. Monitoring source files for hello-world/run...
[info] Press to interrupt or '?' for more options.
The text was updated successfully, but these errors were encountered:
Note that the same thing happens if you do everything interactively rather than passing args to sbt:
sbt:euler> error
sbt:euler> ~run
hi
[success] Total time: 0 s, completed Aug 13, 2023, 3:46:26 PM
[info] 1. Monitoring source files for euler/run...
[info] Press <enter> to interrupt or '?' for more options.
Hello, I'm new here and I might give it a try to solve it. Deleting the above mentioned line solves the problem at first sight, but I couldn't yet follow the code enough with the debugger to determine if this is the right solution (Hi @adpi2 ).
context
build.sbt:
scalaVersion := "3.3.0"
sbt v1.9.3
Running in PowerShell in VS Code
steps
run
sbt -error ~run
problem
Non error output that looks to come from the "watcher" is displayed
PS C:\MainFiles\ScalaDocs\hello-world> sbt -error ~run
Hello, World!
[info] 1. Monitoring source files for hello-world/run...
[info] Press to interrupt or '?' for more options.
[info] Build triggered by C:\MainFiles\ScalaDocs\hello-world\src\main\scala\Main.scala. Running 'run'.
Hello, World!
[success] Total time: 7 s, completed 13 Aug 2023, 18:12:13
[info] 2. Monitoring source files for hello-world/run...
[info] Press to interrupt or '?' for more options.
expectation
There would be no output aside from program output and errors.
notes
For reference here is the full output without -error. The first run [success] is not printed, but "watcher" output and subsequent [success]s are - I am guess that the task is run once and conforms, but the watcher spins up in a separate "thread", and performs subsequent
run
s non comformantly. (Output that is printed above in bold.)PS C:\MainFiles\ScalaDocs\hello-world> sbt ~run
[info] welcome to sbt 1.9.2 (Amazon.com Inc. Java 18.0.2)
[info] loading settings for project hello-world-build-build from metals.sbt ...
[info] loading project definition from C:\MainFiles\ScalaDocs\hello-world\project\project
[info] loading settings for project hello-world-build from metals.sbt ...
[info] loading project definition from C:\MainFiles\ScalaDocs\hello-world\project
[success] Generated .bloop\hello-world-build.json
[success] Total time: 2 s, completed 13 Aug 2023, 18:05:59
[info] loading settings for project hello-world from build.sbt ...
[info] set current project to hello-world (in build file:/C:/MainFiles/ScalaDocs/hello-world/)
[info] sbt server started at local:sbt-server-f0eed868f6240def273b
[info] started sbt server
[info] running Main
Hello, World!
[success] Total time: 2 s, completed 13 Aug 2023, 18:06:03
[info] 1. Monitoring source files for hello-world/run...
[info] Press to interrupt or '?' for more options.
[info] Build triggered by C:\MainFiles\ScalaDocs\hello-world\src\main\scala\Main.scala. Running 'run'.
[info] compiling 1 Scala source to C:\MainFiles\ScalaDocs\hello-world\target\scala-3.3.0\classes ...
[info] running Main
Hello, World!
[success] Total time: 7 s, completed 13 Aug 2023, 18:06:17
[info] 2. Monitoring source files for hello-world/run...
[info] Press to interrupt or '?' for more options.
Also tested with ~compile and -warn
PS C:\MainFiles\ScalaDocs\hello-world> sbt -error ~compile
[info] 1. Monitoring source files for hello-world/compile...
[info] Press to interrupt or '?' for more options.
[info] Build triggered by C:\MainFiles\ScalaDocs\hello-world\src\main\scala\Main.scala. Running 'compile'.
[success] Total time: 7 s, completed 13 Aug 2023, 17:50:33
[info] 2. Monitoring source files for hello-world/compile...
[info] Press to interrupt or '?' for more options.
PS C:\MainFiles\ScalaDocs\hello-world> sbt -warn ~run
Hello, World!
[info] 1. Monitoring source files for hello-world/run...
[info] Press to interrupt or '?' for more options.
[info] Build triggered by C:\MainFiles\ScalaDocs\hello-world\src\main\scala\Main.scala. Running 'run'.
Hello, World!
[success] Total time: 7 s, completed 13 Aug 2023, 18:13:40
[info] 2. Monitoring source files for hello-world/run...
[info] Press to interrupt or '?' for more options.
The text was updated successfully, but these errors were encountered: