From f79b2343000e03dfff34020723f42d9cf8397763 Mon Sep 17 00:00:00 2001 From: rochala Date: Thu, 29 Feb 2024 17:19:29 +0100 Subject: [PATCH 1/2] Fix CI to make up for latest changes in dotty --- .../pc/CompletionInterpolatorSuite.scala | 16 ++++++------ .../tests/pc/CompletionKeywordSuite.scala | 25 ++++++++++--------- .../tests/pc/CompletionPatternSuite.scala | 3 ++- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/tests/cross/src/test/scala/tests/pc/CompletionInterpolatorSuite.scala b/tests/cross/src/test/scala/tests/pc/CompletionInterpolatorSuite.scala index e648d6c5062..5c36f115c73 100644 --- a/tests/cross/src/test/scala/tests/pc/CompletionInterpolatorSuite.scala +++ b/tests/cross/src/test/scala/tests/pc/CompletionInterpolatorSuite.scala @@ -54,11 +54,11 @@ class CompletionInterpolatorSuite extends BaseCompletionSuite { checkEdit( "string2", - s"""|object Main { - | val myName = "" - | def message = "$$myNa@@me" - |} - |""".stripMargin, + """|object Main { + | val myName = "" + | def message = "$myNa@@me" + |} + |""".stripMargin, """|object Main { | val myName = "" | def message = s"${myName$0}me" @@ -371,7 +371,7 @@ class CompletionInterpolatorSuite extends BaseCompletionSuite { ) ), """|object Main { - | + | | s"Hello $List.e@@ " |} |""".stripMargin, @@ -593,8 +593,10 @@ class CompletionInterpolatorSuite extends BaseCompletionSuite { filter = _.contains("hello") ) + // This case will not be supported as every modern editor automatically insterts closing brace + // and it is non trivial to correctly find completion query for this scenario. checkEditLine( - "brace-token-error-pos", + "brace-token-error-pos".tag(IgnoreForScala3CompilerPC), """|object Main { | val hello = "" | ___ diff --git a/tests/cross/src/test/scala/tests/pc/CompletionKeywordSuite.scala b/tests/cross/src/test/scala/tests/pc/CompletionKeywordSuite.scala index 1d380f5178a..ca65f55c279 100644 --- a/tests/cross/src/test/scala/tests/pc/CompletionKeywordSuite.scala +++ b/tests/cross/src/test/scala/tests/pc/CompletionKeywordSuite.scala @@ -46,7 +46,8 @@ class CompletionKeywordSuite extends BaseCompletionSuite { |""".stripMargin, ">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" -> """|transparentTrait - scala.annotation (commit: '') - |""".stripMargin + |""".stripMargin, + ">=3.4.2-RC1-bin-20240228-hash-NIGHTLY" -> "" ), includeCommitCharacter = true ) @@ -77,7 +78,8 @@ class CompletionKeywordSuite extends BaseCompletionSuite { |""".stripMargin, ">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" -> """|transparentTrait - scala.annotation (commit: '') - |""".stripMargin + |""".stripMargin, + ">=3.4.2-RC1-bin-20240228-hash-NIGHTLY" -> "" ), includeCommitCharacter = true ) @@ -488,7 +490,8 @@ class CompletionKeywordSuite extends BaseCompletionSuite { """|def |derived - scala.CanEqual |deprecated - scala.runtime.stdLibPatches.language - |""".stripMargin + |""".stripMargin, + ">=3.4.2-RC1-bin-20240228-hash-NIGHTLY" -> "def" ) ) @@ -513,7 +516,10 @@ class CompletionKeywordSuite extends BaseCompletionSuite { "3.4" -> """|val |var |varargs - scala.annotation - |""".stripMargin + |""".stripMargin, + ">=3.4.2-RC1-bin-20240228-hash-NIGHTLY" -> + """|val + |var""".stripMargin ) ) @@ -605,7 +611,8 @@ class CompletionKeywordSuite extends BaseCompletionSuite { |unsafeNulls - scala.runtime.stdLibPatches.language (commit: '') |unused - scala.annotation (commit: '') |unshared - scala.annotation.internal (commit: '') - |""".stripMargin + |""".stripMargin, + ">=3.4.2-RC1-bin-20240228-hash-NIGHTLY" -> "using (commit: '')" ), topLines = Some(5) ) @@ -643,13 +650,7 @@ class CompletionKeywordSuite extends BaseCompletionSuite { |unsafeNulls - scala.runtime.stdLibPatches.language |unused - scala.annotation |""".stripMargin, - ">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" -> - """|unsafe - scala.caps - |unsafeNulls - scala.runtime.stdLibPatches.language - |unused - scala.annotation - |unshared - scala.annotation.internal - |unspecialized - scala.annotation - |""".stripMargin + ">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" -> "" ), topLines = Some(5) ) diff --git a/tests/cross/src/test/scala/tests/pc/CompletionPatternSuite.scala b/tests/cross/src/test/scala/tests/pc/CompletionPatternSuite.scala index f9b9c7c3f60..093a8745ee8 100644 --- a/tests/cross/src/test/scala/tests/pc/CompletionPatternSuite.scala +++ b/tests/cross/src/test/scala/tests/pc/CompletionPatternSuite.scala @@ -82,7 +82,8 @@ class CompletionPatternSuite extends BaseCompletionSuite { ">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" -> """|macros - scala.languageFeature.experimental |macroImpl - scala.reflect.macros.internal - |""".stripMargin + |""".stripMargin, + ">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" -> "" ) ) From e444b2dc95368addba2a92dc83de8535264692b5 Mon Sep 17 00:00:00 2001 From: rochala Date: Fri, 1 Mar 2024 14:45:53 +0100 Subject: [PATCH 2/2] Properly mark nightly versions --- .../tests/pc/CompletionKeywordSuite.scala | 19 +++++++++++++------ .../tests/pc/CompletionPatternSuite.scala | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/tests/cross/src/test/scala/tests/pc/CompletionKeywordSuite.scala b/tests/cross/src/test/scala/tests/pc/CompletionKeywordSuite.scala index ca65f55c279..3db96d02b7b 100644 --- a/tests/cross/src/test/scala/tests/pc/CompletionKeywordSuite.scala +++ b/tests/cross/src/test/scala/tests/pc/CompletionKeywordSuite.scala @@ -47,7 +47,7 @@ class CompletionKeywordSuite extends BaseCompletionSuite { ">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" -> """|transparentTrait - scala.annotation (commit: '') |""".stripMargin, - ">=3.4.2-RC1-bin-20240228-hash-NIGHTLY" -> "" + ">=3.4.2-RC1-bin-20240301-hash-NIGHTLY" -> "" ), includeCommitCharacter = true ) @@ -79,7 +79,7 @@ class CompletionKeywordSuite extends BaseCompletionSuite { ">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" -> """|transparentTrait - scala.annotation (commit: '') |""".stripMargin, - ">=3.4.2-RC1-bin-20240228-hash-NIGHTLY" -> "" + ">=3.4.2-RC1-bin-20240301-hash-NIGHTLY" -> "" ), includeCommitCharacter = true ) @@ -491,7 +491,7 @@ class CompletionKeywordSuite extends BaseCompletionSuite { |derived - scala.CanEqual |deprecated - scala.runtime.stdLibPatches.language |""".stripMargin, - ">=3.4.2-RC1-bin-20240228-hash-NIGHTLY" -> "def" + ">=3.4.2-RC1-bin-20240301-hash-NIGHTLY" -> "def" ) ) @@ -517,7 +517,7 @@ class CompletionKeywordSuite extends BaseCompletionSuite { |var |varargs - scala.annotation |""".stripMargin, - ">=3.4.2-RC1-bin-20240228-hash-NIGHTLY" -> + ">=3.4.2-RC1-bin-20240301-hash-NIGHTLY" -> """|val |var""".stripMargin ) @@ -612,7 +612,7 @@ class CompletionKeywordSuite extends BaseCompletionSuite { |unused - scala.annotation (commit: '') |unshared - scala.annotation.internal (commit: '') |""".stripMargin, - ">=3.4.2-RC1-bin-20240228-hash-NIGHTLY" -> "using (commit: '')" + ">=3.4.2-RC1-bin-20240301-hash-NIGHTLY" -> "using (commit: '')" ), topLines = Some(5) ) @@ -650,7 +650,14 @@ class CompletionKeywordSuite extends BaseCompletionSuite { |unsafeNulls - scala.runtime.stdLibPatches.language |unused - scala.annotation |""".stripMargin, - ">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" -> "" + ">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" -> + """|unsafe - scala.caps + |unsafeNulls - scala.runtime.stdLibPatches.language + |unused - scala.annotation + |unshared - scala.annotation.internal + |unspecialized - scala.annotation + |""".stripMargin, + ">=3.4.2-RC1-bin-20240301-hash-NIGHTLY" -> "" ), topLines = Some(5) ) diff --git a/tests/cross/src/test/scala/tests/pc/CompletionPatternSuite.scala b/tests/cross/src/test/scala/tests/pc/CompletionPatternSuite.scala index 093a8745ee8..010c9d28a95 100644 --- a/tests/cross/src/test/scala/tests/pc/CompletionPatternSuite.scala +++ b/tests/cross/src/test/scala/tests/pc/CompletionPatternSuite.scala @@ -83,7 +83,7 @@ class CompletionPatternSuite extends BaseCompletionSuite { """|macros - scala.languageFeature.experimental |macroImpl - scala.reflect.macros.internal |""".stripMargin, - ">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" -> "" + ">=3.4.2-RC1-bin-20240301-hash-NIGHTLY" -> "" ) )