Skip to content

Commit 804b470

Browse files
committed
Bump using_directives to 1.1.2
1 parent 590d088 commit 804b470

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

modules/build/src/main/scala/scala/build/preprocessing/CustomDirectivesReporter.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import scala.build.errors.{Diagnostic, Severity}
88

99
class CustomDirectivesReporter(path: Either[String, os.Path], onDiagnostic: Diagnostic => Unit)
1010
extends Reporter {
11-
12-
private var errorCount = 0
11+
private var errorCount = 0
12+
private var warningCount = 0
1313

1414
private def toScalaCliPosition(position: DirectivePosition): Position = {
1515
val coords = (position.getLine, position.getColumn)
@@ -28,16 +28,21 @@ class CustomDirectivesReporter(path: Either[String, os.Path], onDiagnostic: Diag
2828
}
2929
override def warning(msg: String): Unit =
3030
onDiagnostic {
31+
warningCount += 1
3132
Diagnostic(msg, Severity.Warning)
3233
}
3334
override def warning(position: DirectivePosition, msg: String): Unit =
3435
onDiagnostic {
36+
warningCount += 1
3537
Diagnostic(msg, Severity.Warning, Seq(toScalaCliPosition(position)))
3638
}
3739

3840
override def hasErrors(): Boolean =
3941
errorCount != 0
4042

43+
override def hasWarnings(): Boolean =
44+
warningCount != 0
45+
4146
override def reset(): Unit = {
4247
errorCount = 0
4348
}

modules/integration/src/test/scala/scala/cli/integration/FixTests.scala

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ class FixTests extends ScalaCliSuite {
137137
val inputs = TestInputs(
138138
mainSubPath ->
139139
s"""//> using objectWrapper
140-
|//> using dep "com.lihaoyi::os-lib:0.9.1"
140+
|//> using dep com.lihaoyi::os-lib:0.9.1
141141
|
142-
|//> using test.dep "org.typelevel::cats-core:2.9.0"
142+
|//> using test.dep org.typelevel::cats-core:2.9.0
143143
|
144144
|package com.foo.main
145145
|
@@ -148,7 +148,7 @@ class FixTests extends ScalaCliSuite {
148148
|}
149149
|""".stripMargin,
150150
testSubPath ->
151-
s"""//> using options -Xasync, -Xfatal-warnings
151+
s"""//> using options -Xasync -Xfatal-warnings
152152
|//> using dep org.scalameta::munit::0.7.29
153153
|
154154
|package com.foo.test.bar
@@ -256,14 +256,14 @@ class FixTests extends ScalaCliSuite {
256256

257257
val inputs = TestInputs(
258258
mainSubPath ->
259-
s"""//> using platforms "jvm"
260-
|//> using scala "3.3.0"
261-
|//> using jvm "17"
259+
s"""//> using platforms jvm
260+
|//> using scala 3.3.0
261+
|//> using jvm 17
262262
|//> using objectWrapper
263263
|//> using dep com.lihaoyi::os-lib:0.9.1
264264
|//> using file $includePath
265265
|
266-
|//> using test.dep "org.typelevel::cats-core:2.9.0"
266+
|//> using test.dep org.typelevel::cats-core:2.9.0
267267
|
268268
|package com.foo.main
269269
|
@@ -274,8 +274,8 @@ class FixTests extends ScalaCliSuite {
274274
withUsedTargetSubPath -> withUsedTargetContents,
275275
withUnusedTargetSubPath -> withUnusedTargetContents,
276276
testSubPath ->
277-
s"""//> using options -Xasync, -Xfatal-warnings
278-
|//> using dep "org.scalameta::munit::0.7.29"
277+
s"""//> using options -Xasync -Xfatal-warnings
278+
|//> using dep org.scalameta::munit::0.7.29
279279
|//> using scala 3.2.2
280280
|
281281
|package com.foo.test.bar

project/deps.sc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ object Deps {
253253
val typelevelToolkitVersion = "0.1.29"
254254
def typelevelToolkit = ivy"org.typelevel:toolkit:$typelevelToolkitVersion"
255255
def typelevelToolkitTest = ivy"org.typelevel:toolkit-test:$typelevelToolkitVersion"
256-
def usingDirectives = ivy"org.virtuslab:using_directives:1.1.1"
256+
def usingDirectives = ivy"org.virtuslab:using_directives:1.1.2"
257257
// Lives at https://github.com/VirtusLab/no-crc32-zip-input-stream, see #865
258258
// This provides a ZipInputStream that doesn't verify CRC32 checksums, that users
259259
// can enable by setting SCALA_CLI_VENDORED_ZIS=true in the environment, to workaround

0 commit comments

Comments
 (0)