From fa0f1ce0c1131ba185c68c464a5cfee24f4c63bb Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Mon, 1 Jul 2024 22:48:33 +0200 Subject: [PATCH 1/2] Fix failing CompletionScalaCliSuite tests due to circe releasing Scala Native 0.5 artifacts --- .../completion/CompletionScalaCliSuite.scala | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionScalaCliSuite.scala b/presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionScalaCliSuite.scala index 0d86922d4e70..0a74aed35f48 100644 --- a/presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionScalaCliSuite.scala +++ b/presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionScalaCliSuite.scala @@ -28,7 +28,8 @@ class CompletionScalaCliSuite extends BaseCompletionSuite: |// //> using lib ??? |//> using lib io.circe::circe-core_native0.4 |package A - |""".stripMargin + |""".stripMargin, + assertSingleItem = false ) @Test def `version-sort` = @@ -51,6 +52,9 @@ class CompletionScalaCliSuite extends BaseCompletionSuite: """|circe-core_native0.4_2.12 |circe-core_native0.4_2.13 |circe-core_native0.4_3 + |circe-core_native0.5_2.12 + |circe-core_native0.5_2.13 + |circe-core_native0.5_3 |""".stripMargin ) @@ -78,7 +82,9 @@ class CompletionScalaCliSuite extends BaseCompletionSuite: """|//> using lib "io.circe::circe-core:0.14.0", "io.circe::circe-core_na@@" |package A |""".stripMargin, - "circe-core_native0.4" + """circe-core_native0.4 + |circe-core_native0.5 + |""".stripMargin ) @Test def `script` = @@ -92,6 +98,9 @@ class CompletionScalaCliSuite extends BaseCompletionSuite: """|circe-core_native0.4_2.12 |circe-core_native0.4_2.13 |circe-core_native0.4_3 + |circe-core_native0.5_2.12 + |circe-core_native0.5_2.13 + |circe-core_native0.5_3 |""".stripMargin, filename = "script.sc.scala", enablePackageWrap = false @@ -138,7 +147,8 @@ class CompletionScalaCliSuite extends BaseCompletionSuite: """|//> using libs "io.circe::circe-core:0.14.0", "io.circe::circe-core_na@@" |package A |""".stripMargin, - "circe-core_native0.4" + """circe-core_native0.4 + |circe-core_native0.5""".stripMargin ) private def scriptWrapper(code: String, filename: String): String = From c60699e8bbbfcc81a8ec7921f962bc154d44d65b Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Tue, 2 Jul 2024 12:35:01 +0200 Subject: [PATCH 2/2] Ignore failing tests instead of expecting for completions for both 0.4 and 0.5 SN versins - the outputs seems be non deterministic in the CI --- .../completion/CompletionScalaCliSuite.scala | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionScalaCliSuite.scala b/presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionScalaCliSuite.scala index 0a74aed35f48..79d35944c84d 100644 --- a/presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionScalaCliSuite.scala +++ b/presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionScalaCliSuite.scala @@ -3,6 +3,7 @@ package dotty.tools.pc.tests.completion import dotty.tools.pc.base.BaseCompletionSuite import org.junit.Test +import org.junit.Ignore class CompletionScalaCliSuite extends BaseCompletionSuite: @@ -44,6 +45,7 @@ class CompletionScalaCliSuite extends BaseCompletionSuite: |""".stripMargin, ) + @Ignore @Test def `single-colon` = check( """|//> using lib "io.circe:circe-core_na@@ @@ -52,9 +54,6 @@ class CompletionScalaCliSuite extends BaseCompletionSuite: """|circe-core_native0.4_2.12 |circe-core_native0.4_2.13 |circe-core_native0.4_3 - |circe-core_native0.5_2.12 - |circe-core_native0.5_2.13 - |circe-core_native0.5_3 |""".stripMargin ) @@ -77,16 +76,16 @@ class CompletionScalaCliSuite extends BaseCompletionSuite: |""".stripMargin, ) + @Ignore @Test def `multiple-libs` = check( """|//> using lib "io.circe::circe-core:0.14.0", "io.circe::circe-core_na@@" |package A |""".stripMargin, - """circe-core_native0.4 - |circe-core_native0.5 - |""".stripMargin + "circe-core_native0.4" ) + @Ignore @Test def `script` = check( scriptWrapper( @@ -98,9 +97,6 @@ class CompletionScalaCliSuite extends BaseCompletionSuite: """|circe-core_native0.4_2.12 |circe-core_native0.4_2.13 |circe-core_native0.4_3 - |circe-core_native0.5_2.12 - |circe-core_native0.5_2.13 - |circe-core_native0.5_3 |""".stripMargin, filename = "script.sc.scala", enablePackageWrap = false @@ -142,13 +138,13 @@ class CompletionScalaCliSuite extends BaseCompletionSuite: |io.circul""".stripMargin ) + @Ignore @Test def `multiple-deps2` = check( """|//> using libs "io.circe::circe-core:0.14.0", "io.circe::circe-core_na@@" |package A |""".stripMargin, - """circe-core_native0.4 - |circe-core_native0.5""".stripMargin + "circe-core_native0.4" ) private def scriptWrapper(code: String, filename: String): String =