Skip to content

Commit f66c63d

Browse files
authored
scala 3.7.0 (#209)
1 parent f875bcd commit f66c63d

File tree

5 files changed

+720
-5
lines changed

5 files changed

+720
-5
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,8 +643,9 @@ First, get relevant diff from dotty repo:
643643
cd /path/to/dotty
644644
git fetch
645645

646-
OLD=3.5.2-RC2 # set to version that was used before you bumped it
647-
NEW=3.6.4 # set to version that you bumped it to
646+
OLD=3.6.4 # set to version that was used before you bumped it
647+
NEW=3.7.0 # set to version that you bumped it to
648+
tig $OLD..$NEW compiler/src/dotty/tools/repl
648649
git diff $OLD..$NEW compiler/src/dotty/tools/repl
649650
```
650651
Check if any of those changes need to be reapplied to this repo - some files have been copied and slightly adjusted, the majority of functionality is reused.

build.sbt

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,25 @@ name := "scala-repl-pp-root"
22
ThisBuild/organization := "com.michaelpollmeier"
33
publish/skip := true
44

5-
lazy val scalaVersions = Seq("3.5.2", "3.6.4")
5+
lazy val scalaVersions = Seq("3.5.2", "3.6.4", "3.7.0")
66
ThisBuild/scalaVersion := scalaVersions.max
77
lazy val Slf4jVersion = "2.0.16"
88

99
lazy val releasePackage = taskKey[File]("package up a downloadable release")
1010
releasePackage := {
1111
// same as in `.github/workflows/release.yml`
1212
val releaseFile = target.value / "srp.zip"
13-
IO.copyFile((core_364/Universal/packageBin).value, releaseFile)
13+
IO.copyFile((core_370/Universal/packageBin).value, releaseFile)
1414
streams.value.log.info(s"packaged up a release in $releaseFile")
1515
releaseFile
1616
}
1717

18+
lazy val core_370 = Build
19+
.newProject("core", "3.7.0", "scala-repl-pp")
20+
.dependsOn(shadedLibs)
21+
.enablePlugins(JavaAppPackaging)
22+
.settings(coreSettings)
23+
1824
lazy val core_364 = Build
1925
.newProject("core", "3.6.4", "scala-repl-pp")
2026
.dependsOn(shadedLibs)
@@ -46,6 +52,12 @@ lazy val shadedLibs = project.in(file("shaded-libs")).settings(
4652
commonSettings,
4753
)
4854

55+
lazy val server_370 = Build
56+
.newProject("server", "3.7.0", "scala-repl-pp-server")
57+
.dependsOn(core_370)
58+
.enablePlugins(JavaAppPackaging)
59+
.settings(serverSettings)
60+
4961
lazy val server_364 = Build
5062
.newProject("server", "3.6.4", "scala-repl-pp-server")
5163
.dependsOn(core_364)
@@ -71,7 +83,7 @@ lazy val serverSettings = commonSettings ++ Seq(
7183
)
7284

7385
lazy val integrationTests = project.in(file("integration-tests"))
74-
.dependsOn(server_364)
86+
.dependsOn(server_370)
7587
.settings(
7688
name := "integration-tests",
7789
fork := true, // important: otherwise we run into classloader issues
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package replpp
2+
3+
import dotty.tools.dotc.reporting.{HideNonSensicalMessages, StoreReporter, UniqueMessagePositions}
4+
import dotty.tools.repl.*
5+
6+
private[replpp] object DottyRandomStuff {
7+
8+
/** Create empty outer store reporter - copied from
9+
* https://github.com/scala/scala3/blob/c92e20e6be2117365361abfd0b7e6cb72720d5db/compiler/src/dotty/tools/repl/package.scala#L7
10+
* only change: removed [private] classifier so we can access it...
11+
*/
12+
def newStoreReporter: StoreReporter = {
13+
new StoreReporter(null) with UniqueMessagePositions with HideNonSensicalMessages
14+
}
15+
16+
/** copied from https://github.com/scala/scala3/blob/3.7.0/compiler/src/dotty/tools/repl/ParseResult.scala#L162
17+
* only change: removed [private] classifier so we can access it...
18+
* alternatively we could use reflection...
19+
*/
20+
object ParseResult {
21+
val commands: List[(String, String => ParseResult)] = List(
22+
Quit.command -> (_ => Quit),
23+
Quit.alias -> (_ => Quit),
24+
Help.command -> (_ => Help),
25+
Reset.command -> (arg => Reset(arg)),
26+
Imports.command -> (_ => Imports),
27+
JarCmd.command -> (arg => JarCmd(arg)),
28+
KindOf.command -> (arg => KindOf(arg)),
29+
Load.command -> (arg => Load(arg)),
30+
Require.command -> (arg => Require(arg)),
31+
TypeOf.command -> (arg => TypeOf(arg)),
32+
DocOf.command -> (arg => DocOf(arg)),
33+
Settings.command -> (arg => Settings(arg)),
34+
Sh.command -> (arg => Sh(arg)),
35+
Silent.command -> (_ => Silent),
36+
)
37+
}
38+
}

0 commit comments

Comments
 (0)