Skip to content

Commit 2cb678a

Browse files
authored
Merge pull request #5175 from dotty-staging/upgrade-2.12.7
Upgrade to Scala 2.12.7, fix compilation and running tests on Java 11
2 parents 776bf47 + 890e09a commit 2cb678a

File tree

18 files changed

+56
-90
lines changed

18 files changed

+56
-90
lines changed

.drone.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ pipeline:
2323
# We run tests in parallel. Tests run in a copy of the working directory to avoid conflict
2424
test:
2525
group: test
26-
image: lampepfl/dotty:2018-09-14-2
26+
image: lampepfl/dotty:2018-10-01
2727
commands:
2828
- cp -R . /tmp/1/ && cd /tmp/1/
2929
- ./project/scripts/sbt ";compile ;test"
3030
- ./project/scripts/cmdTests
3131

3232
test_bootstrapped:
3333
group: test
34-
image: lampepfl/dotty:2018-09-14-2
34+
image: lampepfl/dotty:2018-10-01
3535
commands:
3636
- cp -R . /tmp/2/ && cd /tmp/2/
3737
- ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test"
3838
- ./project/scripts/bootstrapCmdTests
3939

4040
test_sbt:
4141
group: test
42-
image: lampepfl/dotty:2018-09-14-2
42+
image: lampepfl/dotty:2018-10-01
4343
commands:
4444
- cp -R . /tmp/4/ && cd /tmp/4/
4545
- ./project/scripts/sbt sbt-dotty/scripted
@@ -49,7 +49,7 @@ pipeline:
4949

5050
# DOCUMENTATION:
5151
documentation:
52-
image: lampepfl/dotty:2018-09-14-2
52+
image: lampepfl/dotty:2018-10-01
5353
commands:
5454
- ./project/scripts/genDocs
5555
secrets: [ bot_pass ]
@@ -61,7 +61,7 @@ pipeline:
6161
# PUBLISHING:
6262
# Publishing expect NIGHTLYBUILD or RELEASEBUILD to be set. See dottyVersion in Build.scala
6363
publish_nightly:
64-
image: lampepfl/dotty:2018-09-14-2
64+
image: lampepfl/dotty:2018-10-01
6565
environment:
6666
- NIGHTLYBUILD=yes
6767
commands:
@@ -72,7 +72,7 @@ pipeline:
7272
environment: nightly
7373

7474
publish_release:
75-
image: lampepfl/dotty:2018-09-14-2
75+
image: lampepfl/dotty:2018-10-01
7676
environment:
7777
- RELEASEBUILD=yes
7878
commands:
@@ -96,7 +96,7 @@ pipeline:
9696
event: tag
9797

9898
publish_sbt_release:
99-
image: lampepfl/dotty:2018-09-14-2
99+
image: lampepfl/dotty:2018-10-01
100100
environment:
101101
- RELEASEBUILD=yes
102102
commands:

compiler/src/dotty/tools/dotc/reporting/MessageRendering.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ trait MessageRendering {
9191
* @return aligned error message
9292
*/
9393
def errorMsg(pos: SourcePosition, msg: String, offset: Int)(implicit ctx: Context): String = {
94-
val padding = msg.lines.foldLeft(pos.startColumnPadding) { (pad, line) =>
94+
val padding = msg.linesIterator.foldLeft(pos.startColumnPadding) { (pad, line) =>
9595
val lineLength = stripColor(line).length
9696
val maxPad = math.max(0, ctx.settings.pageWidth.value - offset - lineLength) - offset
9797

9898
if (maxPad < pad.length) " " * maxPad
9999
else pad
100100
}
101101

102-
msg.lines
102+
msg.linesIterator
103103
.map { line => " " * (offset - 1) + "|" + padding + line}
104104
.mkString(sys.props("line.separator"))
105105
}

compiler/test-resources/type-printer/prefixless

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ val res2: Seq[Char] = List(a, b)
77
scala> Set(4, 5)
88
val res3: Set[Int] = Set(4, 5)
99
scala> Iterator(1)
10-
val res4: Iterator[Int] = non-empty iterator
10+
val res4: Iterator[Int] = <iterator>

compiler/test/dotty/tools/vulpix/ParallelTesting.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
613613
else runMain(testSource.runClassPath) match {
614614
case Success(_) if !checkFile.isDefined || !checkFile.get.exists => // success!
615615
case Success(output) => {
616-
val outputLines = output.lines.toArray :+ DiffUtil.EOF
616+
val outputLines = output.linesIterator.toArray :+ DiffUtil.EOF
617617
val checkLines: Array[String] = Source.fromFile(checkFile.get).getLines().toArray :+ DiffUtil.EOF
618618
val sourceTitle = testSource.title
619619

@@ -1027,7 +1027,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
10271027
case test.TimeoutFailure(title) =>
10281028
s" - test '$title' timed out"
10291029
case test.JavaCompilationFailure(msg) =>
1030-
s" - java compilation failed with:\n${ msg.lines.map(" " + _).mkString("\n") }"
1030+
s" - java compilation failed with:\n${ msg.linesIterator.map(" " + _).mkString("\n") }"
10311031
}.mkString("\n")
10321032
}
10331033

dist/bin/common

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,6 @@ if [ ! -x "$JAVACMD" ] ; then
6161
exit 1
6262
fi
6363

64-
# parses 1.7, 1.8, 9, etc out of java version "1.8.0_91"
65-
JAVA_VERSION=$("$JAVACMD" -version 2>&1 | grep ' version "' | tr '\r' '\n' | sed 's/.*version "\([0-9]*\)\(\.[0-9]*\)\{0,1\}\(.*\)*"/\1\2/; 1q')
66-
67-
if [ "$JAVA_VERSION" != "1.8" ] ; then
68-
echo "Error: Java 8 is required, actual $JAVA_VERSION"
69-
exit 1
70-
fi
71-
7264
if [ -z "$JAVA_HOME" ] ; then
7365
echo "Warning: JAVA_HOME environment variable is not set."
7466
fi

doc-tool/src/dotty/tools/dottydoc/model/comment/CommentCleaner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ trait CommentCleaner {
2121
SafeTags.replaceAllIn(javadoclessComment, { mtch =>
2222
Matcher.quoteReplacement(safeTagMarker + mtch.matched + safeTagMarker)
2323
})
24-
markedTagComment.lines.toList map (cleanLine)
24+
markedTagComment.linesIterator.toList map (cleanLine)
2525
}
2626
}

doc-tool/src/dotty/tools/dottydoc/staticsite/Page.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ trait Page {
115115
val withoutYaml = virtualFile(
116116
if (content.startsWith("---\n")) {
117117
val str =
118-
content.lines
118+
content.linesIterator
119119
.drop(1)
120120
.dropWhile(line => line != "---" && line != "...")
121121
.drop(1).mkString("\n")

project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ object ExposedValues extends AutoPlugin {
3636
object Build {
3737

3838
val baseVersion = "0.10.0"
39-
val scalacVersion = "2.12.6"
39+
val scalacVersion = "2.12.7"
4040

4141
val dottyOrganization = "ch.epfl.lamp"
4242
val dottyGithubUrl = "https://github.com/lampepfl/dotty"

sbt-dotty/sbt-test/source-dependencies/ext/A.scala

Lines changed: 0 additions & 5 deletions
This file was deleted.

sbt-dotty/sbt-test/source-dependencies/ext/build.sbt

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)