Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scalafmt-core to 3.8.4 #3780

Merged
merged 3 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ fadb726e4d1855de746b61ed1bd3bb229f7e3f95

# Scala Steward: Reformat with scalafmt 3.8.3
6a75de98b210cf0cc9cd4bf8693ac80bf3ab32ab

# Scala Steward: Reformat with scalafmt 3.8.4
c94b1327f346ed0dddc374c7844aaa55080dc84f
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.8.3
version = 3.8.4
project.layout = StandardConvention
runner.dialect = scala3
maxColumn = 120
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package wvlet.airframe.log

import java.util.{logging as jl}
import java.util.logging as jl

import wvlet.airframe.log.JSConsoleLogHandler.JSLogColorPalette

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ object IOUtil:

def findPath(path: File): Option[File] =
if path.exists() then Some(path)
else {
else
val defaultPath = new File(new File(System.getProperty("prog.home", "")), path.getPath)
if defaultPath.exists() then Some(defaultPath)
else None
}

def readAsString(f: File): String =
readAsString(f.toURI.toURL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import java.io.Flushable
import java.util
import java.util.concurrent.atomic.AtomicBoolean
import java.util.concurrent.{Executors, ThreadFactory, TimeUnit}
import java.util.{logging as jl}
import java.util.logging as jl

/**
* Logging using a background thread
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package wvlet.airframe.log
import java.io.{File, Flushable}
import java.nio.charset.StandardCharsets
import java.util.logging.ErrorManager
import java.util.{logging as jl}
import java.util.logging as jl
import ch.qos.logback.core.ContextBase
import ch.qos.logback.core.encoder.EncoderBase
import ch.qos.logback.core.rolling.{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package wvlet.airframe.log

import java.io.{PrintStream, PrintWriter}
import java.util.{logging as jl}
import java.util.logging as jl

/**
* Output log to stderr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import wvlet.airframe.log.AnsiColorPalette
import java.io.{PrintWriter, StringWriter}
import java.util.logging.Formatter
import java.util.regex.Pattern
import java.util.{logging as jl}
import java.util.logging as jl
import wvlet.airframe.log.LogLevel.{DEBUG, ERROR, INFO, TRACE, WARN}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
package wvlet.airframe.log

import java.util.{logging as jl}
import java.util.logging as jl

object LogRecord:
def apply(record: jl.LogRecord): LogRecord =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,7 @@ object Router extends router.RouterObjectBase with LogSupport {

private[http] def isFuture(s: Surface): Boolean = {
s match {
case h: HigherKindedTypeSurface
if h.typeArgs.size == 1 && h.name == "F" => // Only support 'F' for tagless-final pattern
case h: HigherKindedTypeSurface if h.typeArgs.size == 1 && h.name == "F" => // Only support 'F' for tagless-final pattern
true
case s: Surface
if s.rawType == classOf[scala.concurrent.Future[_]] || s.rawType.getName == "com.twitter.util.Future" =>
Expand All @@ -233,8 +232,7 @@ object Router extends router.RouterObjectBase with LogSupport {

private[http] def unwrapFuture(s: Surface): Surface = {
s match {
case h: HigherKindedTypeSurface
if h.typeArgs.size == 1 && h.name == "F" => // Only support 'F' for tagless-final pattern
case h: HigherKindedTypeSurface if h.typeArgs.size == 1 && h.name == "F" => // Only support 'F' for tagless-final pattern
h.typeArgs.head
case s: Surface
if s.rawType == classOf[scala.concurrent.Future[_]] || s.rawType.getName == "com.twitter.util.Future" =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ trait GlobalAttrs {
* Specifies the text direction for the content in an element. The valid values are:
*
* - `ltr` Default. Left-to-right text direction
*
* - `rtl` Right-to-left text direction
*
* - `auto` Let the browser figure out the text direction, based on the content, (only recommended if the text
* direction is unknown)
*/
Expand Down Expand Up @@ -759,7 +757,6 @@ trait InputAttrs extends GlobalAttrs {
*
* - post: Corresponds to the HTTP POST method ; form data are included in the body of the form and sent to the
* server.
*
* - get: Corresponds to the HTTP GET method; form data are appended to the action attribute URI with a '?' as a
* separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and
* contains only ASCII characters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,7 @@ private[surface] class CompileTimeSurfaceFactory[Q <: Quotes](using quotes: Q):
private def isPathDependentType(t: TypeRepr): Boolean =
!t.typeSymbol.flags.is(Flags.JavaStatic) && (t match
case t: TypeBounds => true
case _ => false
)
case _ => false)

private def genericTypeFactory: Factory = {
case t if t =:= TypeRepr.of[Any] =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import scala.language.implicitConversions
/**
* This code is from com.softwaremill.tagging
*
* Tag instances with arbitrary types. The tags are usually empty `trait`s. Tags have no runtime overhead and are only
* Tag instances with arbitrary types. The tags are usually empty `trait` s. Tags have no runtime overhead and are only
* used at compile-time for additional type safety.
*
* For example:
Expand Down
3 changes: 2 additions & 1 deletion airspec/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ def excludePomDependency(excludes: Seq[String]) = { node: XmlNode =>
}).transform(node).head
}

/** AirSpec build definitions.
/**
* AirSpec build definitions.
*
* To make AirSpec a standalone library without any cyclic project references, AirSpec embeds the source code of
* airframe-log, di, surface, etc.
Expand Down
2 changes: 1 addition & 1 deletion airspec/project/plugin.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.1")
addDependencyTreePlugin

// For Scala.js
val SCALAJS_VERSION = sys.env.getOrElse("SCALAJS_VERSION", "1.18.1")
val SCALAJS_VERSION = sys.env.getOrElse("SCALAJS_VERSION", "1.18.1")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % SCALAJS_VERSION)
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.21.1")
libraryDependencies ++= (
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ lazy val fluentd =
"org.komamitsu" % "fluency-fluentd" % FLUENCY_VERSION,
"org.komamitsu" % "fluency-treasuredata" % FLUENCY_VERSION
// td-client-java -> json-simple happened to include junit 4.10 [CVE-2020-15250]
exclude ("junit", "junit"),
exclude ("junit", "junit"),
// Necessary for td-client-java, which is used in fluency-treasuredata
"com.fasterxml.jackson.datatype" % "jackson-datatype-json-org" % "2.18.2" % Provided,
"com.fasterxml.jackson.datatype" % "jackson-datatype-jdk8" % "2.18.2" % Provided,
Expand Down
2 changes: 1 addition & 1 deletion project/plugin.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ addSbtPlugin("org.wvlet.airframe" % "sbt-airframe" % SBT_AIRFRAME_VERSION)
addDependencyTreePlugin

// For Scala.js
val SCALAJS_VERSION = sys.env.getOrElse("SCALAJS_VERSION", "1.18.1")
val SCALAJS_VERSION = sys.env.getOrElse("SCALAJS_VERSION", "1.18.1")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % SCALAJS_VERSION)
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.21.1")
libraryDependencies ++= (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ sys.props.get("plugin.version") match {
// For Scala.js
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
val SCALAJS_VERSION = sys.env.getOrElse("SCALAJS_VERSION", "1.18.1")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % SCALAJS_VERSION)
addSbtPlugin("org.scala-js" % "sbt-scalajs" % SCALAJS_VERSION)
Loading