Skip to content

Commit 823b650

Browse files
committed
Upgrade to scala 3.0.0-RC1
1 parent 0057744 commit 823b650

File tree

6 files changed

+32
-32
lines changed

6 files changed

+32
-32
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ scala:
66
- 2.11.12
77
- 2.12.13
88
- 2.13.4
9-
- 3.0.0-M3
9+
- 3.0.0-RC1
1010
env:
1111
- ADOPTOPENJDK=8
1212
- ADOPTOPENJDK=11

project/Dependencies.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import sbt._
22

33
object Version {
44
val logback = "1.2.3"
5-
val mockito = "3.2.4.0-M1"
6-
val scalaTest = "3.2.4-M1"
5+
val mockito = "3.2.4.0"
6+
val scalaTest = "3.2.4"
77
val slf4j = "1.7.30"
88
}
99

src/main/scala-3.x/com/typesafe/scalalogging/LoggerImpl.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.typesafe.scalalogging
22

3-
import org.slf4j.{Marker, Logger => Underlying }
3+
import org.slf4j.{Marker, Logger as Underlying }
44

55
trait LoggerImpl {
66
def underlying: Underlying

src/main/scala-3.x/com/typesafe/scalalogging/LoggerMacro.scala

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.typesafe.scalalogging
22

33
import org.slf4j.Marker
4-
import scala.quoted._
5-
import org.slf4j.{ Logger => Underlying }
4+
import scala.quoted.*
5+
import org.slf4j.{ Logger as Underlying }
66

77
private[scalalogging] object LoggerMacro {
88

@@ -23,7 +23,7 @@ private[scalalogging] object LoggerMacro {
2323
else if(anyRefArgs.length == 1)
2424
'{ if ($underlying.isErrorEnabled) $underlying.error($message, ${anyRefArgs.head}) }
2525
else
26-
'{ if ($underlying.isErrorEnabled) $underlying.error($message, ${Expr.ofSeq(anyRefArgs)}:_*) }
26+
'{ if ($underlying.isErrorEnabled) $underlying.error($message, ${Expr.ofSeq(anyRefArgs)}*) }
2727
}
2828

2929
def errorMessageMarker(underlying: Expr[Underlying], marker: Expr[Marker], message: Expr[String]) (using Quotes) = {
@@ -41,7 +41,7 @@ private[scalalogging] object LoggerMacro {
4141
else if(anyRefArgs.length == 1)
4242
'{if ($underlying.isErrorEnabled($marker)) $underlying.error($marker, $message, ${anyRefArgs.head}) }
4343
else
44-
'{ if ($underlying.isErrorEnabled($marker)) $underlying.error($marker, $message, ${Expr.ofSeq(anyRefArgs)}:_*) }
44+
'{ if ($underlying.isErrorEnabled($marker)) $underlying.error($marker, $message, ${Expr.ofSeq(anyRefArgs)}*) }
4545
}
4646

4747
def errorCode(underlying: Expr[Underlying], body: Expr[Unit]) (using Quotes) =
@@ -67,7 +67,7 @@ private[scalalogging] object LoggerMacro {
6767
else if(anyRefArgs.length == 1)
6868
'{ if ($underlying.isWarnEnabled) $underlying.warn($message, ${anyRefArgs.head}) }
6969
else
70-
'{ if ($underlying.isWarnEnabled) $underlying.warn($message, ${Expr.ofSeq(anyRefArgs)}:_*) }
70+
'{ if ($underlying.isWarnEnabled) $underlying.warn($message, ${Expr.ofSeq(anyRefArgs)}*) }
7171
}
7272

7373
def warnMessageMarker(underlying: Expr[Underlying], marker: Expr[Marker], message: Expr[String]) (using Quotes) = {
@@ -85,7 +85,7 @@ private[scalalogging] object LoggerMacro {
8585
else if(anyRefArgs.length == 1)
8686
'{if ($underlying.isWarnEnabled($marker)) $underlying.warn($marker, $message, ${anyRefArgs.head}) }
8787
else
88-
'{ if ($underlying.isWarnEnabled($marker)) $underlying.warn($marker, $message, ${Expr.ofSeq(anyRefArgs)}:_*) }
88+
'{ if ($underlying.isWarnEnabled($marker)) $underlying.warn($marker, $message, ${Expr.ofSeq(anyRefArgs)}*) }
8989
}
9090

9191
def warnCode(underlying: Expr[Underlying], body: Expr[Unit]) (using Quotes) =
@@ -111,7 +111,7 @@ private[scalalogging] object LoggerMacro {
111111
else if(anyRefArgs.length == 1)
112112
'{ if ($underlying.isInfoEnabled) $underlying.info($message, ${anyRefArgs.head}) }
113113
else
114-
'{ if ($underlying.isInfoEnabled) $underlying.info($message, ${Expr.ofSeq(anyRefArgs)}:_*) }
114+
'{ if ($underlying.isInfoEnabled) $underlying.info($message, ${Expr.ofSeq(anyRefArgs)}*) }
115115
}
116116

117117
def infoMessageMarker(underlying: Expr[Underlying], marker: Expr[Marker], message: Expr[String]) (using Quotes) = {
@@ -129,7 +129,7 @@ private[scalalogging] object LoggerMacro {
129129
else if(anyRefArgs.length == 1)
130130
'{if ($underlying.isInfoEnabled($marker)) $underlying.info($marker, $message, ${anyRefArgs.head}) }
131131
else
132-
'{ if ($underlying.isInfoEnabled($marker)) $underlying.info($marker, $message, ${Expr.ofSeq(anyRefArgs)}:_*) }
132+
'{ if ($underlying.isInfoEnabled($marker)) $underlying.info($marker, $message, ${Expr.ofSeq(anyRefArgs)}*) }
133133
}
134134

135135
def infoCode(underlying: Expr[Underlying], body: Expr[Unit]) (using Quotes) =
@@ -156,7 +156,7 @@ private[scalalogging] object LoggerMacro {
156156
else if(anyRefArgs.length == 1)
157157
'{ if ($underlying.isDebugEnabled) $underlying.debug($message, ${anyRefArgs.head}) }
158158
else
159-
'{ if ($underlying.isDebugEnabled) $underlying.debug($message, ${Expr.ofSeq(anyRefArgs)}:_*) }
159+
'{ if ($underlying.isDebugEnabled) $underlying.debug($message, ${Expr.ofSeq(anyRefArgs)}*) }
160160
}
161161

162162
def debugMessageMarker(underlying: Expr[Underlying], marker: Expr[Marker], message: Expr[String]) (using Quotes) = {
@@ -174,7 +174,7 @@ private[scalalogging] object LoggerMacro {
174174
else if(anyRefArgs.length == 1)
175175
'{if ($underlying.isDebugEnabled($marker)) $underlying.debug($marker, $message, ${anyRefArgs.head}) }
176176
else
177-
'{ if ($underlying.isDebugEnabled($marker)) $underlying.debug($marker, $message, ${Expr.ofSeq(anyRefArgs)}:_*) }
177+
'{ if ($underlying.isDebugEnabled($marker)) $underlying.debug($marker, $message, ${Expr.ofSeq(anyRefArgs)}*) }
178178
}
179179

180180
def debugCode(underlying: Expr[Underlying], body: Expr[Unit]) (using Quotes) =
@@ -200,7 +200,7 @@ private[scalalogging] object LoggerMacro {
200200
else if(anyRefArgs.length == 1)
201201
'{ if ($underlying.isTraceEnabled) $underlying.trace($message, ${anyRefArgs.head}) }
202202
else
203-
'{ if ($underlying.isTraceEnabled) $underlying.trace($message, ${Expr.ofSeq(anyRefArgs)}:_*) }
203+
'{ if ($underlying.isTraceEnabled) $underlying.trace($message, ${Expr.ofSeq(anyRefArgs)}*) }
204204
}
205205

206206
def traceMessageMarker(underlying: Expr[Underlying], marker: Expr[Marker], message: Expr[String]) (using Quotes) = {
@@ -218,7 +218,7 @@ private[scalalogging] object LoggerMacro {
218218
else if(anyRefArgs.length == 1)
219219
'{if ($underlying.isTraceEnabled($marker)) $underlying.trace($marker, $message, ${anyRefArgs.head}) }
220220
else
221-
'{ if ($underlying.isTraceEnabled($marker)) $underlying.trace($marker, $message, ${Expr.ofSeq(anyRefArgs)}:_*) }
221+
'{ if ($underlying.isTraceEnabled($marker)) $underlying.trace($marker, $message, ${Expr.ofSeq(anyRefArgs)}*) }
222222
}
223223

224224
def traceCode(underlying: Expr[Underlying], body: Expr[Unit]) (using Quotes) =
@@ -228,8 +228,8 @@ private[scalalogging] object LoggerMacro {
228228

229229
/** Checks whether `message` is an interpolated string and transforms it into SLF4J string interpolation. */
230230
private def deconstructInterpolatedMessage(message: Expr[String])(using Quotes): (Expr[String], Seq[Expr[Any]]) = {
231-
import quotes.reflect._
232-
import util._
231+
import quotes.reflect.*
232+
import util.*
233233

234234
message.asTerm match{
235235
case Inlined(_, _, Apply(Select(Apply(Select(Select(_, "StringContext"), _), messageNode), _), argumentsNode)) =>
@@ -262,8 +262,8 @@ private[scalalogging] object LoggerMacro {
262262
}
263263
}
264264
def formatArgs(args: Expr[Seq[Any]])(using q: Quotes): Seq[Expr[AnyRef]] = {
265-
import quotes.reflect._
266-
import util._
265+
import quotes.reflect.*
266+
import util.*
267267

268268
args.asTerm match {
269269
case p@Inlined(_, _, Typed(Repeated(v, _),_)) =>

src/main/scala-3.x/com/typesafe/scalalogging/LoggerTakingImplicitImpl.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.typesafe.scalalogging
22

3-
import org.slf4j.{Marker, Logger => Underlying }
3+
import org.slf4j.{Marker, Logger as Underlying }
44

55
trait LoggerTakingImplicitImpl[A] {
66
def underlying: Underlying

src/main/scala-3.x/com/typesafe/scalalogging/LoggerTakingImplicitMacro.scala

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package com.typesafe.scalalogging
22

33
import org.slf4j.{ Marker, Logger => Underlying }
44

5-
import scala.quoted._
5+
import scala.quoted.*
66

77
private[scalalogging] object LoggerTakingImplicitMacro {
88

@@ -29,7 +29,7 @@ private[scalalogging] object LoggerTakingImplicitMacro {
2929
}}
3030
else
3131
'{if ($underlying.isErrorEnabled) {
32-
$underlying.error($canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}: _*)
32+
$underlying.error($canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}*)
3333
$canLogEv.afterLog($a)
3434
}}
3535
}
@@ -55,7 +55,7 @@ private[scalalogging] object LoggerTakingImplicitMacro {
5555
}}
5656
else
5757
'{if ($underlying.isErrorEnabled($marker)) {
58-
$underlying.error($marker, $canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}: _*)
58+
$underlying.error($marker, $canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}*)
5959
$canLogEv.afterLog($a)
6060
}}
6161
}
@@ -86,7 +86,7 @@ private[scalalogging] object LoggerTakingImplicitMacro {
8686
}}
8787
else
8888
'{if ($underlying.isWarnEnabled) {
89-
$underlying.warn($canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}: _*)
89+
$underlying.warn($canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}*)
9090
$canLogEv.afterLog($a)
9191
}}
9292
}
@@ -112,7 +112,7 @@ private[scalalogging] object LoggerTakingImplicitMacro {
112112
}}
113113
else
114114
'{if ($underlying.isWarnEnabled($marker)) {
115-
$underlying.warn($marker, $canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}: _*)
115+
$underlying.warn($marker, $canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}*)
116116
$canLogEv.afterLog($a)
117117
}}
118118
}
@@ -143,7 +143,7 @@ private[scalalogging] object LoggerTakingImplicitMacro {
143143
}}
144144
else
145145
'{if ($underlying.isInfoEnabled) {
146-
$underlying.info($canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}: _*)
146+
$underlying.info($canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}*)
147147
$canLogEv.afterLog($a)
148148
}}
149149
}
@@ -169,7 +169,7 @@ private[scalalogging] object LoggerTakingImplicitMacro {
169169
}}
170170
else
171171
'{if ($underlying.isInfoEnabled($marker)) {
172-
$underlying.info($marker, $canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}: _*)
172+
$underlying.info($marker, $canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}*)
173173
$canLogEv.afterLog($a)
174174
}}
175175
}
@@ -200,7 +200,7 @@ private[scalalogging] object LoggerTakingImplicitMacro {
200200
}}
201201
else
202202
'{if ($underlying.isDebugEnabled) {
203-
$underlying.debug($canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}: _*)
203+
$underlying.debug($canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}*)
204204
$canLogEv.afterLog($a)
205205
}}
206206
}
@@ -226,7 +226,7 @@ private[scalalogging] object LoggerTakingImplicitMacro {
226226
}}
227227
else
228228
'{if ($underlying.isDebugEnabled($marker)) {
229-
$underlying.debug($marker, $canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}: _*)
229+
$underlying.debug($marker, $canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}*)
230230
$canLogEv.afterLog($a)
231231
}}
232232
}
@@ -257,7 +257,7 @@ private[scalalogging] object LoggerTakingImplicitMacro {
257257
}}
258258
else
259259
'{if ($underlying.isTraceEnabled) {
260-
$underlying.trace($canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}: _*)
260+
$underlying.trace($canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}*)
261261
$canLogEv.afterLog($a)
262262
}}
263263
}
@@ -283,7 +283,7 @@ private[scalalogging] object LoggerTakingImplicitMacro {
283283
}}
284284
else
285285
'{if ($underlying.isTraceEnabled($marker)) {
286-
$underlying.trace($marker, $canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}: _*)
286+
$underlying.trace($marker, $canLogEv.logMessage($message, $a), ${Expr.ofSeq(formatedArgs)}*)
287287
$canLogEv.afterLog($a)
288288
}}
289289
}

0 commit comments

Comments
 (0)