refactor: hoist io.syntax import; clarify reboot dev help for global base

This commit is contained in:
bitloi 2026-04-10 10:14:24 +02:00
parent 47302ccfc2
commit b1a6a1dea7
No known key found for this signature in database
GPG Key ID: DB743C90C0FE29BA
2 changed files with 4 additions and 5 deletions

View File

@ -149,9 +149,9 @@ $HelpCommand <regular expression>
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.

View File

@ -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