From b1a6a1dea7b8667141b03968df62d283ae43d095 Mon Sep 17 00:00:00 2001 From: bitloi Date: Fri, 10 Apr 2026 10:14:24 +0200 Subject: [PATCH] refactor: hoist io.syntax import; clarify reboot dev help for global base --- main-command/src/main/scala/sbt/BasicCommandStrings.scala | 6 +++--- main/src/main/scala/sbt/MainLoop.scala | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/main-command/src/main/scala/sbt/BasicCommandStrings.scala b/main-command/src/main/scala/sbt/BasicCommandStrings.scala index c76d70e33..0034d48de 100644 --- a/main-command/src/main/scala/sbt/BasicCommandStrings.scala +++ b/main-command/src/main/scala/sbt/BasicCommandStrings.scala @@ -149,9 +149,9 @@ $HelpCommand remaining commands with the exception that the JVM is not shut down. If 'dev' is specified, the current sbt artifacts from the boot directory - (`~/.sbt/boot` by default) are deleted before restarting, and the compiler bridge - secondary cache (`zinc/org.scala-sbt` under the global sbt directory, respecting - `sbt.global.base` and `sbt.global.zinc`) is removed. + (under the default global base; `sbt.global.base` selects that location) are deleted + before restarting, and the compiler bridge secondary cache at `zinc/org.scala-sbt` + (honoring `sbt.global.base` and `sbt.global.zinc`) is removed. This forces an update of sbt and Scala, which is useful when working with development versions of sbt. If 'full' is specified, the boot directory is wiped out before restarting. diff --git a/main/src/main/scala/sbt/MainLoop.scala b/main/src/main/scala/sbt/MainLoop.scala index a94ae9c33..0108160cb 100644 --- a/main/src/main/scala/sbt/MainLoop.scala +++ b/main/src/main/scala/sbt/MainLoop.scala @@ -22,6 +22,7 @@ import sbt.internal.util.{ Terminal as ITerminal } import sbt.io.{ IO, Using } +import sbt.io.syntax.* import sbt.librarymanagement.SbtArtifacts import sbt.protocol.* import sbt.util.{ Logger, LoggerContext } @@ -91,7 +92,6 @@ private[sbt] object MainLoop: /** Deletes the current sbt artifacts from boot. */ private[sbt] def deleteCurrentArtifacts(state: State): Unit = { - import sbt.io.syntax.* val provider = state.configuration.provider val appId = provider.id // If we can obtain boot directory more accurately it'd be better. @@ -113,7 +113,6 @@ private[sbt] object MainLoop: /** Removes the Zinc compiler bridge secondary cache (`…/zinc/org.scala-sbt`). */ private[sbt] def deleteZincBridgeSecondaryCache(state: State): Unit = - import sbt.io.syntax.* val zincDir = BuildPaths.getZincDirectory(state, BuildPaths.getGlobalBase(state)) val bridgeCache = zincDir / SbtArtifacts.Organization if bridgeCache.exists() then