Skip to content

Commit

Permalink
Update scalafmt-core to 3.7.15 (#3254)
Browse files Browse the repository at this point in the history
## About this PR
πŸ“¦ Updates
[org.scalameta:scalafmt-core](https://github.com/scalameta/scalafmt)
from `3.7.14` to `3.7.15`

πŸ“œ [GitHub Release
Notes](https://github.com/scalameta/scalafmt/releases/tag/v3.7.15) -
[Version
Diff](scalameta/scalafmt@v3.7.14...v3.7.15)

## Usage
βœ… **Please merge!**

I'll automatically update this PR to resolve conflicts as long as you
don't change it yourself.

If you'd like to skip this version, you can just close this PR. If you
have any feedback, just mention me in the comments below.

Configure Scala Steward for your repository with a
[`.scala-steward.conf`](https://github.com/scala-steward-org/scala-steward/blob/b83aae55d9dd000548c3b3c9b63d79636e7b3c8b/docs/repo-specific-configuration.md)
file.

_Have a fantastic day writing Scala!_

<details>
<summary>βš™ Adjust future updates</summary>

Add this to your `.scala-steward.conf` file to ignore future updates of
this dependency:
```
updates.ignore = [ { groupId = "org.scalameta", artifactId = "scalafmt-core" } ]
```
Or, add this to slow down future updates of this dependency:
```
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "org.scalameta", artifactId = "scalafmt-core" }
}]
```
</details>

<sup>
labels: library-update
</sup>

---------

Co-authored-by: Taro L. Saito <leo@xerial.org>
  • Loading branch information
xerial-bot and xerial authored Oct 29, 2023
1 parent fb7ee61 commit 8d433f7
Show file tree
Hide file tree
Showing 29 changed files with 79 additions and 73 deletions.
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ fadb726e4d1855de746b61ed1bd3bb229f7e3f95

# Scala Steward: Reformat with scalafmt 3.7.5
6fc8adf4498d80bb3a9fcd8673b82cac985a4b00

# Scala Steward: Reformat with scalafmt 3.7.15
378dadaf4b2e49d8db41e310e67c82e4162edc5d
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.7.14
version = 3.7.15
project.layout = StandardConvention
runner.dialect = scala3
maxColumn = 120
Expand Down
2 changes: 1 addition & 1 deletion airframe-dotty-test/src/main/scala/dotty/test/DITest.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dotty.test

import wvlet.log.{LogFormatter, LogLevel, LogSupport, Logger}
import wvlet.airframe._
import wvlet.airframe.*
import wvlet.airframe.surface.Surface

object DITest extends LogSupport {
Expand Down
27 changes: 13 additions & 14 deletions airframe-dotty-test/src/main/scala/dotty/test/Surface3Test.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@ package dotty.test

import wvlet.airframe.surface.Surface
import wvlet.log.LogSupport
import wvlet.airframe.surface.tag._
import wvlet.airframe.surface.tag.*

object Surface3Test extends LogSupport {
import scala.quoted._
import scala.quoted.*

inline def test(s:Surface, expected: String): Unit = {
inline def test(s: Surface, expected: String): Unit = {
s match {
case null =>
warn(s"Surface: expected: ${expected}, but null")
case _ =>
val str = s.toString
// info(s"${s}: ${s.getClass}")
if(str != expected) {
if (str != expected) {
warn(s"Surface: expected: ${expected}, but ${str}")
}
}
}

inline def assert(v: Any, expected: Any): Unit = {
if(v != expected) {
if (v != expected) {
warn(s"Expected: ${expected}, but ${v}")
}
}

case class Person(id:Int = -1, name:String)
case class Person(id: Int = -1, name: String)

trait Label
trait Label
type MyString = String

trait Holder[M[_]] {
Expand All @@ -38,18 +38,18 @@ object Surface3Test extends LogSupport {
trait Task[A]

class Hello {
def hello(msg:String): String = msg
private def hiddemMethod: Int = 1
def hello(msg: String): String = msg
private def hiddemMethod: Int = 1
protected def hiddenMethod2: Option[Int] = None
}

class HelloExt extends Hello {
def hello2: String = "hello2"
}

case class MyOpt(a:Option[String])
case class MyOpt(a: Option[String])

def run:Unit = {
def run: Unit = {
test(Surface.of[Int], "Int")
test(Surface.of[Boolean], "Boolean")
test(Surface.of[Long], "Long")
Expand Down Expand Up @@ -84,7 +84,7 @@ object Surface3Test extends LogSupport {
// Case class surface tests
val s = Surface.of[Person]
assert(s.params.mkString(","), "id:Int,name:String")
val p = Person(1, "leo")
val p = Person(1, "leo")
val p0 = s.params(0)
assert(p0.name, "id")
assert(p0.getDefaultValue, Some(-1))
Expand All @@ -94,7 +94,7 @@ object Surface3Test extends LogSupport {

val ms = Surface.methodsOf[Hello]
debug(ms)
val h = new Hello
val h = new Hello
val res = ms(0).call(h, "hello surface")
assert(res, "hello surface")

Expand All @@ -109,5 +109,4 @@ object Surface3Test extends LogSupport {
info(sc.params)
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ object MessageFormat {
def of(code: Byte): MessageFormat = formatTable(code & 0xff)

/**
* Converting a byte value into MessageFormat. For faster performance, use {@link #valueOf}
* Converting a byte value into MessageFormat. For faster performance, use [[valueOf(byte)]] instead.
*
* @param b
* MessageFormat of the given byte
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
package wvlet.airframe

import org.scalatest._
import org.scalatest.*
import wvlet.log.LogFormatter.SourceCodeLogFormatter
import wvlet.log.{LogSupport, Logger}

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
16 changes: 8 additions & 8 deletions airspec/src/main/scala-3/wvlet/airspec/AirSpecSpiCompat.scala
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ object AirSpecTestBuilder extends wvlet.log.LogSupport {
}

private[airspec] object AirSpecMacros {
import scala.quoted._
import scala.quoted.*

def test0Impl[R](self: Expr[AirSpecTestBuilder], body: Expr[R])(using Type[R], Quotes): Expr[Unit] = {
'{
import AirSpecTestBuilder._
import AirSpecTestBuilder.*
${ self }.addF0(LazyF0(${ body }))
}
}
Expand All @@ -93,12 +93,12 @@ private[airspec] object AirSpecMacros {
// Nil or Seq[_], Scala 3 complier passes Function1[Int, R] as a body even if the code block take no argument.
case '{ $x: t } if TypeRepr.of[t] =:= TypeRepr.of[Nil.type] || TypeRepr.of[t] <:< TypeRepr.of[Seq[_]] =>
'{
import AirSpecTestBuilder._
import AirSpecTestBuilder.*
${ self }.addF0(LazyF0.apply(${ body }))
}
case _ =>
'{
import AirSpecTestBuilder._
import AirSpecTestBuilder.*
${ self }.addF1(Surface.of[D1], ${ body })
}
}
Expand All @@ -109,7 +109,7 @@ private[airspec] object AirSpecMacros {
body: Expr[(D1, D2) => R]
)(using Type[D1], Type[D2], Type[R], Quotes): Expr[Unit] = {
'{
import AirSpecTestBuilder._
import AirSpecTestBuilder.*
${ self }.addF2(Surface.of[D1], Surface.of[D2], ${ body })
}
}
Expand All @@ -119,7 +119,7 @@ private[airspec] object AirSpecMacros {
body: Expr[(D1, D2, D3) => R]
)(using Type[D1], Type[D2], Type[D3], Type[R], Quotes): Expr[Unit] = {
'{
import AirSpecTestBuilder._
import AirSpecTestBuilder.*
${ self }.addF3(Surface.of[D1], Surface.of[D2], Surface.of[D3], ${ body })
}
}
Expand All @@ -129,7 +129,7 @@ private[airspec] object AirSpecMacros {
body: Expr[(D1, D2, D3, D4) => R]
)(using Type[D1], Type[D2], Type[D3], Type[D4], Type[R], Quotes): Expr[Unit] = {
'{
import AirSpecTestBuilder._
import AirSpecTestBuilder.*
${ self }.addF4(Surface.of[D1], Surface.of[D2], Surface.of[D3], Surface.of[D4], ${ body })
}
}
Expand All @@ -139,7 +139,7 @@ private[airspec] object AirSpecMacros {
body: Expr[(D1, D2, D3, D4, D5) => R]
)(using Type[D1], Type[D2], Type[D3], Type[D4], Type[D5], Type[R], Quotes): Expr[Unit] = {
'{
import AirSpecTestBuilder._
import AirSpecTestBuilder.*
${ self }.addF5(
Surface.of[D1],
Surface.of[D2],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package greeter.api

import wvlet.airframe.http._
import wvlet.airframe.http.*
import wvlet.log.LogSupport

@RPC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package greeter

import greeter.api.{GreeterApi, GreeterRPC}
import wvlet.airframe.http._
import wvlet.airframe.http.*
import wvlet.airframe.http.netty.Netty
import wvlet.airframe.launcher.{Launcher, command, option}
import wvlet.log.{LogSupport, Logger}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ t * See the License for the specific language governing permissions and
*/
package example.api

import wvlet.airframe.http._
import wvlet.airframe.http.*

@RPC
trait HelloApi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
package example.server

import wvlet.airframe.http._
import wvlet.airframe.http.*
import wvlet.airframe.launcher.{Launcher, command, option}
import wvlet.log.{LogSupport, Logger}
import wvlet.airframe.http.netty.{Netty, NettyServer}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ package example.ui
import example.api.ServiceRPC
import org.scalajs.dom
import org.scalajs.dom.MouseEvent
import wvlet.airframe.http._
import wvlet.airframe.http.*
import wvlet.airframe.rx.{Rx, RxOption}
import wvlet.airframe.rx.html.{DOMRenderer, RxElement}

import scala.scalajs.js.annotation.JSExport
import wvlet.airframe.rx.html._
import wvlet.airframe.rx.html.all._
import wvlet.airframe.rx.html.*
import wvlet.airframe.rx.html.all.*
import wvlet.log.{LogLevel, LogSupport, Logger}

/**
Expand Down
18 changes: 9 additions & 9 deletions examples/rx-demo/gallery/src/main/scala/Gallery.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package wvlet.airframe.rx.html.widget.demo
import org.scalajs.dom
import org.scalajs.dom.document
import wvlet.airframe.rx.Rx
import wvlet.airframe.rx.html.all._
import wvlet.airframe.rx.html.all.*
import wvlet.airframe.rx.html.{DOMRenderer, RxCode, RxComponent, RxElement, tags}
import wvlet.airframe.rx.html.HtmlCompat.extractCode
import wvlet.log.{LogLevel, LogSupport, Logger}
Expand Down Expand Up @@ -125,7 +125,7 @@ object Gallery extends LogSupport {
def buttonSmallDemo: Example = Example(
"Small buttons",
extractCode {
import wvlet.airframe.rx.html.all._
import wvlet.airframe.rx.html.all.*

def smallButton(style: String) =
button(tpe -> "button", cls -> s"btn btn-sm btn-${style}", style)
Expand Down Expand Up @@ -196,7 +196,7 @@ object Gallery extends LogSupport {

// Creating a new canvas
val c = newCanvas(50, 50)
import c._
import c.*
context.fillStyle = "#99CCFF"
context.fillRect(0, 0, c.canvas.width, c.canvas.height)
context.strokeStyle = "#336699"
Expand All @@ -210,8 +210,8 @@ object Gallery extends LogSupport {
def svgDemo = Example(
"SVG",
extractCode {
import wvlet.airframe.rx.html.svgAttrs._
import wvlet.airframe.rx.html.svgTags._
import wvlet.airframe.rx.html.svgAttrs.*
import wvlet.airframe.rx.html.svgTags.*

val circleColor = Rx.variable("white")

Expand Down Expand Up @@ -245,7 +245,7 @@ object Gallery extends LogSupport {
def elementGallery = Example(
"RxElement",
extractCode {
import wvlet.airframe.rx.html.all._
import wvlet.airframe.rx.html.all.*

class MyButton(name: String) extends RxElement {
def render: RxElement = button(cls -> "btn btn-outline-primary", name)
Expand All @@ -258,7 +258,7 @@ object Gallery extends LogSupport {
def customElementGallery = Example(
"Customize RxElement",
extractCode {
import wvlet.airframe.rx.html.all._
import wvlet.airframe.rx.html.all.*

def myButton = button(cls -> "btn btn-outline-primary")

Expand All @@ -270,7 +270,7 @@ object Gallery extends LogSupport {
def componentGallery = Example(
"RxComponent",
extractCode {
import wvlet.airframe.rx.html.all._
import wvlet.airframe.rx.html.all.*

// RxComponent is the unit of a reactive widget that can enclose other components or elements.
class MyComponent extends RxComponent {
Expand All @@ -285,7 +285,7 @@ object Gallery extends LogSupport {
def timer = Example(
"Timer",
extractCode {
import wvlet.airframe.rx.html.all._
import wvlet.airframe.rx.html.all.*
var i = 0

// Run the code every 1 second (1000 milliseconds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ package wvlet.airframe.sbt.http
import java.io.{File, FileInputStream}
import java.nio.file.Files
import java.util.zip.GZIPInputStream
import coursier._
import coursier.*
import coursier.core.Extension
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream
import org.apache.commons.compress.utils.IOUtils
import sbt._
import sbt.*
import wvlet.airframe.codec.MessageCodec
import wvlet.airframe.control.OS
import wvlet.log.LogSupport
import wvlet.log.io.IOUtil.withResource

import scala.sys.process._
import scala.sys.process.*

/**
* sbt plugin for supporting Airframe HTTP development.
Expand All @@ -43,7 +43,7 @@ object AirframeHttpPlugin extends AutoPlugin with LogSupport {

object autoImport extends Keys

import autoImport._
import autoImport.*

override def requires: Plugins = sbt.plugins.JvmPlugin
override def trigger = noTrigger
Expand Down Expand Up @@ -90,7 +90,7 @@ object AirframeHttpPlugin extends AutoPlugin with LogSupport {
private val cacheFileName = "generated.cache"

def httpProjectSettings = {
import sbt.Keys._
import sbt.Keys.*
Seq(
airframeHttpClients := Seq.empty,
airframeHttpClasspass := {
Expand Down Expand Up @@ -127,7 +127,7 @@ object AirframeHttpPlugin extends AutoPlugin with LogSupport {

if (needsUpdate) {
// Download airframe-http.tgz with coursier
import coursier._
import coursier.*
val moduleName = s"airframe-http-codegen_${scalaBinaryVersion.value}"
val d =
Dependency(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package myapp.server

import wvlet.airframe.http._
import wvlet.airframe.http.*
import wvlet.airframe.http.client.SyncClient
import wvlet.airframe.http.netty.Netty
import wvlet.log.LogSupport
import myapp.spi.MyService
import myapp.spi.MyRPC._
import myapp.spi.MyRPC.*

class MyServiceImpl extends myapp.spi.MyService {
override def hello(id: Int): String = s"hello ${id}"
Expand Down
Loading

0 comments on commit 8d433f7

Please sign in to comment.