Skip to content

Commit 52958fd

Browse files
Backport "Migrate presentation compiler" to 3.8.0 (#24426)
Backports #24413 to the 3.8.0-RC1. PR submitted by the release tooling. [skip ci]
2 parents f1719cf + a2968c3 commit 52958fd

16 files changed

+85
-27
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
uses: actions/checkout@v5
126126

127127
- name: Test
128-
run: sbt ";scala3-bootstrapped/compile; scala3-presentation-compiler/test; scala3-language-server/test"
128+
run: sbt ";scala3-bootstrapped/compile; scala3-language-server/test"
129129
shell: cmd
130130

131131
- name: build binary

.github/workflows/stdlib.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,23 @@ jobs:
315315
- name: Compile `scaladoc`
316316
run: ./project/scripts/sbt scaladoc-new/compile
317317

318+
presentation-compiler:
319+
runs-on: ubuntu-latest
320+
steps:
321+
- name: Git Checkout
322+
uses: actions/checkout@v5
323+
324+
- name: Set up JDK 17
325+
uses: actions/setup-java@v5
326+
with:
327+
distribution: 'temurin'
328+
java-version: 17
329+
cache: 'sbt'
330+
- uses: sbt/setup-sbt@v1
331+
332+
- name: Compile `scala3-presentation-compiler`
333+
run: ./project/scripts/sbt scala3-presentation-compiler/compile
334+
318335
#################################################################################################
319336
########################################### MiMa JOBS ###########################################
320337
#################################################################################################
@@ -582,6 +599,23 @@ jobs:
582599
- name: Test REPL
583600
run: ./project/scripts/sbt scala3-repl/test
584601

602+
test-presentation-compiler:
603+
runs-on: ubuntu-latest
604+
needs: [presentation-compiler]
605+
steps:
606+
- name: Git Checkout
607+
uses: actions/checkout@v5
608+
609+
- name: Set up JDK 17
610+
uses: actions/setup-java@v5
611+
with:
612+
distribution: 'temurin'
613+
java-version: 17
614+
cache: 'sbt'
615+
- uses: sbt/setup-sbt@v1
616+
- name: Test Presentation Compiler
617+
run: ./project/scripts/sbt scala3-presentation-compiler/test
618+
585619
scripted-tests:
586620
runs-on: ubuntu-latest
587621
needs: [scala3-compiler-bootstrapped, tasty-core-bootstrapped, scala3-staging, scala3-tasty-inspector, scala-library-sjs, scaladoc]

presentation-compiler/test/dotty/tools/pc/tests/InferExpectedTypeSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class InferExpectedTypeSuite extends BasePCSuite:
9393
check(
9494
"""|val i: Option[Int] = Option(@@)
9595
|""".stripMargin,
96-
"""|Int
96+
"""|Int | Null
9797
|""".stripMargin
9898
)
9999

presentation-compiler/test/dotty/tools/pc/tests/NoIndentSuite.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import java.nio.file.Path
55
import dotty.tools.pc.base.{BaseCompletionSuite, BaseExtractMethodSuite}
66

77
import org.junit.Test
8+
import org.junit.Ignore
89

910
class ExtractMethodNoIndentSuite extends BaseExtractMethodSuite:
1011
override protected def scalacOptions(classpath: Seq[Path]): Seq[String] =
@@ -73,6 +74,7 @@ class CompletionMatchNoIndentSuite extends BaseCompletionSuite:
7374
filter = !_.contains("exhaustive")
7475
)
7576

77+
@Ignore
7678
@Test def `exhaustive` =
7779
checkEdit(
7880
s"""

presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionArgSuite.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import dotty.tools.pc.base.BaseCompletionSuite
44

55
import org.junit.FixMethodOrder
66
import org.junit.Test
7+
import org.junit.Ignore
78
import org.junit.runners.MethodSorters
89

910
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@@ -157,7 +158,7 @@ class CompletionArgSuite extends BaseCompletionSuite:
157158
| Option[Int](@@)
158159
|}
159160
|""".stripMargin,
160-
"""|x = : A
161+
"""|x = : A | Null
161162
|Main test
162163
|""".stripMargin,
163164
topLines = Option(2)
@@ -1174,6 +1175,7 @@ class CompletionArgSuite extends BaseCompletionSuite:
11741175
topLines = Some(1),
11751176
)
11761177

1178+
@Ignore
11771179
@Test def `comparison` =
11781180
check(
11791181
"""

presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionCaseSuite.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import scala.meta.pc.PresentationCompilerConfig
66
import dotty.tools.pc.base.BaseCompletionSuite
77

88
import org.junit.Test
9+
import org.junit.Ignore
910

1011
class CompletionCaseSuite extends BaseCompletionSuite:
1112

@@ -249,6 +250,7 @@ class CompletionCaseSuite extends BaseCompletionSuite:
249250
|""".stripMargin
250251
)
251252

253+
@Ignore
252254
@Test def `lambda` =
253255
check(
254256
"""
@@ -291,6 +293,7 @@ class CompletionCaseSuite extends BaseCompletionSuite:
291293
|""".stripMargin
292294
)
293295

296+
@Ignore
294297
@Test def `lambda-curry` =
295298
check(
296299
"""
@@ -305,6 +308,7 @@ class CompletionCaseSuite extends BaseCompletionSuite:
305308
|""".stripMargin
306309
)
307310

311+
@Ignore
308312
@Test def `partial` =
309313
check(
310314
"""
@@ -347,6 +351,7 @@ class CompletionCaseSuite extends BaseCompletionSuite:
347351
|""".stripMargin
348352
)
349353

354+
@Ignore
350355
@Test def `infix` =
351356
check(
352357
"""

presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionKeywordSuite.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ package dotty.tools.pc.tests.completion
33
import dotty.tools.pc.base.BaseCompletionSuite
44

55
import org.junit.Test
6+
import org.junit.Ignore
67

78
class CompletionKeywordSuite extends BaseCompletionSuite:
89

10+
@Ignore
911
@Test def `super-template` =
1012
check(
1113
"""
@@ -61,6 +63,7 @@ class CompletionKeywordSuite extends BaseCompletionSuite:
6163
includeCommitCharacter = true
6264
)
6365

66+
@Ignore
6467
@Test def `super-def` =
6568
check(
6669
"""
@@ -81,6 +84,7 @@ class CompletionKeywordSuite extends BaseCompletionSuite:
8184
|""".stripMargin
8285
)
8386

87+
@Ignore
8488
@Test def `super-val` =
8589
check(
8690
"""
@@ -101,6 +105,7 @@ class CompletionKeywordSuite extends BaseCompletionSuite:
101105
|""".stripMargin
102106
)
103107

108+
@Ignore
104109
@Test def `super-var` =
105110
check(
106111
"""
@@ -121,6 +126,7 @@ class CompletionKeywordSuite extends BaseCompletionSuite:
121126
|""".stripMargin
122127
)
123128

129+
@Ignore
124130
@Test def `super-arg` =
125131
check(
126132
"""
@@ -380,6 +386,7 @@ class CompletionKeywordSuite extends BaseCompletionSuite:
380386
""
381387
)
382388

389+
@Ignore
383390
@Test def `super-typeapply` =
384391
check(
385392
"""

presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionMatchSuite.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import dotty.tools.pc.base.BaseCompletionSuite
44
import dotty.tools.pc.utils.MockEntries
55

66
import org.junit.Test
7+
import org.junit.Ignore
78

89
class CompletionMatchSuite extends BaseCompletionSuite:
910

@@ -335,6 +336,7 @@ class CompletionMatchSuite extends BaseCompletionSuite:
335336
filter = _.contains("exhaustive")
336337
)
337338

339+
@Ignore
338340
@Test def `exhaustive-map` =
339341
check(
340342
"""
@@ -346,6 +348,7 @@ class CompletionMatchSuite extends BaseCompletionSuite:
346348
filter = _.contains("exhaustive")
347349
)
348350

351+
@Ignore
349352
@Test def `exhaustive-map-edit` =
350353
checkEdit(
351354
"""

presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionSnippetSuite.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ class CompletionSnippetSuite extends BaseCompletionSuite:
384384
topLines = Some(4)
385385
)
386386

387+
@Ignore
387388
@Test def `no-apply` =
388389
checkSnippet(
389390
s"""|package example

presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionSuite.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ class CompletionSuite extends BaseCompletionSuite:
412412
includeCommitCharacter = true
413413
)
414414

415+
@Ignore
415416
@Test def `numeric-sort` =
416417
check(
417418
"""

0 commit comments

Comments
 (0)