mirror of https://github.com/sbt/sbt.git
Update to Scalafmt 3.7.14
This commit is contained in:
parent
bb26faaa2e
commit
e87e1d6e0d
|
|
@ -1,4 +1,4 @@
|
|||
version = 3.6.0
|
||||
version = 3.7.14
|
||||
runner.dialect = scala3
|
||||
|
||||
maxColumn = 100
|
||||
|
|
@ -26,5 +26,6 @@ trailingCommas = preserve
|
|||
|
||||
# TODO update scalafmt and enable Scala 3
|
||||
project.excludeFilters = [
|
||||
"internal/util-position/src/main/scala-3/sbt/internal/util/SourcePositionMacro.scala"
|
||||
"internal/util-position/src/main/scala-3/sbt/internal/util/SourcePositionMacro.scala",
|
||||
"main-settings/src/main/scala/sbt/Def.scala",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ object Append:
|
|||
override def appendValue(a: List[A1], b: V): List[A1] = a :+ (b: A1)
|
||||
|
||||
given appendVectorImplicit[A1, V](using ev: Conversion[V, A1]): Sequence[Vector[A1], Vector[V], V]
|
||||
with
|
||||
with
|
||||
override def appendValues(a: Vector[A1], b: Vector[V]): Vector[A1] = a ++ b.map(x => (x: A1))
|
||||
override def appendValue(a: Vector[A1], b: V): Vector[A1] = a :+ (b: A1)
|
||||
|
||||
|
|
|
|||
|
|
@ -373,6 +373,8 @@ object Scoped:
|
|||
}
|
||||
|
||||
private[sbt] trait Syntax:
|
||||
|
||||
// format: off
|
||||
// richInitialize
|
||||
extension [A1](init: Initialize[A1])
|
||||
@targetName("mapTaskInitialize")
|
||||
|
|
@ -380,6 +382,7 @@ object Scoped:
|
|||
|
||||
@targetName("flatMapValueInitialize")
|
||||
def flatMapTaskValue[A2](f: A1 => Task[A2]): Initialize[Task[A2]] = init(f)
|
||||
// format: on
|
||||
|
||||
// richInitializeTask
|
||||
extension [A1](init: Initialize[Task[A1]])
|
||||
|
|
|
|||
|
|
@ -2523,12 +2523,11 @@ object Defaults extends BuildCommon {
|
|||
|
||||
mappers.foldRight({ (p: Position) =>
|
||||
withAbsoluteSource(p) // Fallback if sourcePositionMappers is empty
|
||||
}) {
|
||||
(mapper, previousPosition) =>
|
||||
{ (p: Position) =>
|
||||
// To each mapper we pass the position with the absolute source (only if reportAbsolutePath = true of course)
|
||||
mapper(withAbsoluteSource(p)).getOrElse(previousPosition(p))
|
||||
}
|
||||
}) { (mapper, previousPosition) =>
|
||||
{ (p: Position) =>
|
||||
// To each mapper we pass the position with the absolute source (only if reportAbsolutePath = true of course)
|
||||
mapper(withAbsoluteSource(p)).getOrElse(previousPosition(p))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import scala.quoted.*
|
|||
*/
|
||||
object FileChangesMacro:
|
||||
|
||||
// format: off
|
||||
extension [A](in: TaskKey[A])
|
||||
@compileTimeOnly(
|
||||
"`inputFileChanges` can only be called on a task within a task definition macro, such as :=, +=, ++=, or Def.task."
|
||||
|
|
@ -47,7 +48,7 @@ object FileChangesMacro:
|
|||
)
|
||||
inline def outputFiles: Seq[NioPath] =
|
||||
${ FileChangesMacro.outputFilesImpl[A]('in) }
|
||||
|
||||
// format: on
|
||||
def changedInputFilesImpl[A: Type](in: Expr[TaskKey[A]])(using qctx: Quotes): Expr[FileChanges] =
|
||||
impl[A](
|
||||
in = in,
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ private[sbt] final case class LangServerError(code: Long, message: String)
|
|||
|
||||
private[sbt] object LanguageServerProtocol {
|
||||
private val internalJsonProtocol = new sbt.internal.langserver.codec.JsonProtocol
|
||||
with sbt.protocol.codec.JsonProtocol with sjsonnew.BasicJsonProtocol with InitializeOptionFormats
|
||||
with sbt.protocol.codec.JsonProtocol
|
||||
with sjsonnew.BasicJsonProtocol
|
||||
with InitializeOptionFormats
|
||||
|
||||
import internalJsonProtocol._
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue