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
Same as #5154, with a cleaner
git history to ease review
---
When Mill runs as a BSP server, this makes it log in a similar way as
when running Mill from the command-line, with `[…] ` prefixes.
For example, the small BSP session run in the test added in this PR logs
the following to stderr:
```text
[bsp] Trying to load BSP server...
[bsp] BSP server started
[1-buildInitialize] Entered buildInitialize
[1-buildInitialize] buildInitialize took 2 msec
[2-workspaceBuildTargets] Entered workspaceBuildTargets
[bsp-init-build.mill-61] [info] compiling 3 Scala sources to /Users/alexandre/projects/mill/mill-class-loading/out/integration/ide/bsp-server/local/daemon/testForked.dest/sandbox/run-1/out/mill-build/compile.dest/classes ...
[bsp-init-build.mill-61] [warn] package scala contains object and package with same name: caps.
[bsp-init-build.mill-61] [warn] This indicates that there are several versions of the Scala standard library on the classpath.
[bsp-init-build.mill-61] [warn] The build should be reconfigured so that only one version of the standard library is on the classpath.
[bsp-init-build.mill-61] [warn] one warning found
[bsp-init-build.mill-61] [info] done compiling
[bsp-init] SNAPSHOT
[2-workspaceBuildTargets] Evaluating 5 tasks
[2-workspaceBuildTargets] Done
[2-workspaceBuildTargets] Evaluating 1 task
[2-workspaceBuildTargets] Done
[2-workspaceBuildTargets] workspaceBuildTargets took 4197 msec
[3-loggingTest] Entered loggingTest
[3-loggingTest] Evaluating 1 task
[3-loggingTest-1] bspLoggingTest from System.out
[3-loggingTest-1] bspLoggingTest from System.err
[3-loggingTest-1] bspLoggingTest from Console.out
[3-loggingTest-1] bspLoggingTest from Console.err
[3-loggingTest-1] bspLoggingTest from Task.log.info
[3-loggingTest] Done
[3-loggingTest] loggingTest took 11 msec
[4-buildShutdown] Entered buildShutdown
[5-onBuildExit] Entered onBuildExit
Reload finished, result: mill.api.internal.BspServerResult$Shutdown$@6726cc69
Shutting down executor
[bsp] BSP session returned with mill.api.internal.BspServerResult$Shutdown$@6726cc69
Stopping server via handle...
[bsp] Exiting BSP runner loop. Stopping BSP server. Last result: Success(mill.api.internal.BspServerResult$Shutdown$@6726cc69)
```
This helps make sense of what's going on when working on BSP-releated
features, but could also help Mill BSP users in case anything goes
wrong.
0 commit comments