Skip to content

Commit 0a49594

Browse files
[autofix.ci] apply automated fixes
1 parent d02361e commit 0a49594

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

core/api/src/mill/api/MappedRoots.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ trait MappedRootsImpl {
8787
for {
8888
singleKey <- key
8989
} {
90-
if (!map.contains(singleKey)) throw new NoSuchElementException(s"No root path mapping defined for '${key}'")
90+
if (!map.contains(singleKey))
91+
throw new NoSuchElementException(s"No root path mapping defined for '${key}'")
9192
}
9293
}
9394

runner/daemon/src/mill/daemon/MillBuildBootstrap.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ class MillBuildBootstrap(
274274
selectiveExecution = selectiveExecution,
275275
offline = offline,
276276
workerCache = newWorkerCache,
277-
codeSignatures = nestedState.frames.headOption.map(_.codeSignatures).getOrElse(Map.empty),
277+
codeSignatures =
278+
nestedState.frames.headOption.map(_.codeSignatures).getOrElse(Map.empty),
278279
rootModule = buildFileApi.rootModule,
279280
// We want to use the grandparent buildHash, rather than the parent
280281
// buildHash, because the parent build changes are instead detected

runner/daemon/src/mill/daemon/MillMain0.scala

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -111,22 +111,22 @@ object MillMain0 {
111111
outLock: Lock,
112112
outDir: os.Path
113113
): (Boolean, RunnerState) = MappedRoots.withMillDefaults(outPath = outDir) {
114-
mill.api.daemon.internal.MillScalaParser.current.withValue(MillScalaParserImpl) {
115-
os.SubProcess.env.withValue(env) {
116-
val parserResult = MillCliConfig.parse(args)
117-
// Detect when we're running in BSP mode as early as possible,
118-
// and ensure we don't log to the default stdout or use the default
119-
// stdin, meant to be used for BSP JSONRPC communication, where those
120-
// logs would be lost.
121-
// This is especially helpful if anything unexpectedly goes wrong
122-
// early on, when developing on Mill or debugging things for example.
123-
val bspMode = parserResult.toOption.exists(_.bsp.value)
124-
withStreams(bspMode, streams0, outDir) { streams =>
125-
parserResult match {
126-
// Cannot parse args
127-
case Result.Failure(msg) =>
128-
streams.err.println(msg)
129-
(false, RunnerState.empty)
114+
mill.api.daemon.internal.MillScalaParser.current.withValue(MillScalaParserImpl) {
115+
os.SubProcess.env.withValue(env) {
116+
val parserResult = MillCliConfig.parse(args)
117+
// Detect when we're running in BSP mode as early as possible,
118+
// and ensure we don't log to the default stdout or use the default
119+
// stdin, meant to be used for BSP JSONRPC communication, where those
120+
// logs would be lost.
121+
// This is especially helpful if anything unexpectedly goes wrong
122+
// early on, when developing on Mill or debugging things for example.
123+
val bspMode = parserResult.toOption.exists(_.bsp.value)
124+
withStreams(bspMode, streams0, outDir) { streams =>
125+
parserResult match {
126+
// Cannot parse args
127+
case Result.Failure(msg) =>
128+
streams.err.println(msg)
129+
(false, RunnerState.empty)
130130

131131
case Result.Success(config) if config.help.value =>
132132
streams.out.println(MillCliConfig.longUsageText)

0 commit comments

Comments
 (0)