From bd247d6d25e3d58c224a1bee3d59e12d186bab75 Mon Sep 17 00:00:00 2001 From: Piotr Chabelski Date: Thu, 12 Dec 2024 13:17:55 +0100 Subject: [PATCH 1/2] Bump `using_directives` to 1.1.3 --- project/deps.sc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/deps.sc b/project/deps.sc index 317b7a37f6..01ca424c31 100644 --- a/project/deps.sc +++ b/project/deps.sc @@ -253,7 +253,7 @@ object Deps { val typelevelToolkitVersion = "0.1.29" def typelevelToolkit = ivy"org.typelevel:toolkit:$typelevelToolkitVersion" def typelevelToolkitTest = ivy"org.typelevel:toolkit-test:$typelevelToolkitVersion" - def usingDirectives = ivy"org.virtuslab:using_directives:1.1.2" + def usingDirectives = ivy"org.virtuslab:using_directives:1.1.3" // Lives at https://github.com/VirtusLab/no-crc32-zip-input-stream, see #865 // This provides a ZipInputStream that doesn't verify CRC32 checksums, that users // can enable by setting SCALA_CLI_VENDORED_ZIS=true in the environment, to workaround From 94c5fe2a615dfe376f28f05e79f3e638bdff3893 Mon Sep 17 00:00:00 2001 From: Piotr Chabelski Date: Thu, 12 Dec 2024 13:19:01 +0100 Subject: [PATCH 2/2] Test for correct number of deprecation warnings when commas are used as separators for using directive values --- .../scala/scala/cli/integration/RunTestsDefault.scala | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala b/modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala index 9816e4012d..4a08471b5d 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala @@ -115,14 +115,16 @@ class RunTestsDefault extends RunTestDefinitions ) { val inputPath = os.rel / "example.sc" TestInputs(inputPath -> - """//> using options -Werror, -Wconf:cat=deprecation:e + """//> using options -Werror, -Wconf:cat=deprecation:e, -Wconf:cat=unused:e |println("Deprecation warnings should have been printed") |""".stripMargin) .fromRoot { root => val res = os.proc(TestUtil.cli, "run", extraOptions, inputPath) .call(cwd = root, stderr = os.Pipe) - val err = res.err.trim() - expect(err.contains("Use of commas as separators is deprecated")) + val err = res.err.trim() + val expectedWarning = "Use of commas as separators is deprecated" + expect(err.contains(expectedWarning)) + expect(err.linesIterator.count(_.contains(expectedWarning)) == 2) } } }