From 5553862ce790bbbbb27e718c52001a2191ee488b Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Wed, 22 Aug 2018 02:33:31 +0900 Subject: [PATCH 1/3] Fix JLine dependencies jline-$VERSION.jar is a bundle that contains the content of jline-terminal-$VERSION.jar and other modules. jline-terminal-jna depends on jline-terminal. This means that the Dotty build depends on both jline and jline-terminal and classfiles may be read from either jar (dependencies on the classpath are usually not in a stable order). They should be identical so it's not a big problem, but it breaks Zinc incremental compilation. This commit fixes this by not using the jline bundle jar anymore. --- compiler/test/dotty/Jars.scala | 12 ++++++++---- .../test/dotty/tools/dotc/CompilationTests.scala | 2 +- dist/bin/common | 2 +- dist/bin/dotc | 2 +- project/Build.scala | 3 ++- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/compiler/test/dotty/Jars.scala b/compiler/test/dotty/Jars.scala index 4959fc95aa2f..68902e5f75b1 100644 --- a/compiler/test/dotty/Jars.scala +++ b/compiler/test/dotty/Jars.scala @@ -22,9 +22,13 @@ object Jars { lazy val scalaXml: String = findJarFromRuntime("scala-xml") - /** JLine Jar */ - lazy val jline: String = - findJarFromRuntime("jline-3.7.0") + /** jline-terminal jar */ + lazy val jlineTerminal: String = + findJarFromRuntime("jline-terminal-3.7.0") + + /** jline-reader jar */ + lazy val jlineReader: String = + findJarFromRuntime("jline-reader-3.7.0") /** Dotty extras classpath from env or properties */ val dottyExtras: List[String] = sys.env.get("DOTTY_EXTRAS") @@ -32,7 +36,7 @@ object Jars { /** Dotty test dependencies */ val dottyTestDeps: List[String] = - dottyLib :: dottyCompiler :: dottyInterfaces :: jline :: dottyExtras + dottyLib :: dottyCompiler :: dottyInterfaces :: jlineTerminal :: jlineReader :: dottyExtras /** Dotty runtime with compiler dependencies, used for quoted.Expr.run */ lazy val dottyRunWithCompiler: List[String] = diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index 931571cdf43a..5b2fc17e3c15 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -205,7 +205,7 @@ class CompilationTests extends ParallelTesting { // as well as bootstrapped compiler: defaultOutputDir + dotty1Group + "/dotty/:" + // and the other compiler dependecies: - Jars.dottyInterfaces + ":" + Jars.jline, + Jars.dottyInterfaces + ":" + Jars.jlineTerminal + ":" + Jars.jlineReader, Array("-Ycheck-reentrant", "-Yemit-tasty-in-class") ) diff --git a/dist/bin/common b/dist/bin/common index 37c6e8baea3f..2031b912a5dc 100755 --- a/dist/bin/common +++ b/dist/bin/common @@ -119,7 +119,7 @@ SCALA_ASM=$(find_lib "*scala-asm*") SCALA_LIB=$(find_lib "*scala-library*") SCALA_XML=$(find_lib "*scala-xml*") SBT_INTF=$(find_lib "*compiler-interface*") -JLINE=$(find_lib "*jline-3*") +JLINE_READER=$(find_lib "*jline-reader-3*") JLINE_TERMINAL=$(find_lib "*jline-terminal-3*") JLINE_TERMINAL_JNA=$(find_lib "*jline-terminal-jna-3*") diff --git a/dist/bin/dotc b/dist/bin/dotc index 07a95fb5b395..1724c93f9b22 100755 --- a/dist/bin/dotc +++ b/dist/bin/dotc @@ -66,7 +66,7 @@ classpathArgs () { toolchain+="$DOTTY_COMP$PSEP" # jine - toolchain+="$JLINE$PSEP" + toolchain+="$JLINE_READER$PSEP" toolchain+="$JLINE_TERMINAL$PSEP" toolchain+="$JLINE_TERMINAL_JNA" diff --git a/project/Build.scala b/project/Build.scala index 0b9c74474762..fa8a7cae4e5f 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -517,7 +517,8 @@ object Build { ("org.scala-lang.modules" %% "scala-xml" % "1.1.0").withDottyCompat(scalaVersion.value), "org.scala-lang" % "scala-library" % scalacVersion % "test", Dependencies.compilerInterface(sbtVersion.value), - "org.jline" % "jline" % "3.7.0", // used by the REPL + "org.jline" % "jline-reader" % "3.7.0", // used by the REPL + "org.jline" % "jline-terminal" % "3.7.0", "org.jline" % "jline-terminal-jna" % "3.7.0" // needed for Windows ), From 1bf04801a7cb74cf0d21f3e1c269498c4a52ceeb Mon Sep 17 00:00:00 2001 From: Allan Renucci Date: Wed, 22 Aug 2018 12:16:45 +0200 Subject: [PATCH 2/3] Upgrade JLine to 3.9 --- compiler/test/dotty/Jars.scala | 4 ++-- project/Build.scala | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/test/dotty/Jars.scala b/compiler/test/dotty/Jars.scala index 68902e5f75b1..2d0617ee3ecc 100644 --- a/compiler/test/dotty/Jars.scala +++ b/compiler/test/dotty/Jars.scala @@ -24,11 +24,11 @@ object Jars { /** jline-terminal jar */ lazy val jlineTerminal: String = - findJarFromRuntime("jline-terminal-3.7.0") + findJarFromRuntime("jline-terminal-3.9.0") /** jline-reader jar */ lazy val jlineReader: String = - findJarFromRuntime("jline-reader-3.7.0") + findJarFromRuntime("jline-reader-3.9.0") /** Dotty extras classpath from env or properties */ val dottyExtras: List[String] = sys.env.get("DOTTY_EXTRAS") diff --git a/project/Build.scala b/project/Build.scala index fa8a7cae4e5f..4a15546e2000 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -517,9 +517,9 @@ object Build { ("org.scala-lang.modules" %% "scala-xml" % "1.1.0").withDottyCompat(scalaVersion.value), "org.scala-lang" % "scala-library" % scalacVersion % "test", Dependencies.compilerInterface(sbtVersion.value), - "org.jline" % "jline-reader" % "3.7.0", // used by the REPL - "org.jline" % "jline-terminal" % "3.7.0", - "org.jline" % "jline-terminal-jna" % "3.7.0" // needed for Windows + "org.jline" % "jline-reader" % "3.9.0", // used by the REPL + "org.jline" % "jline-terminal" % "3.9.0", + "org.jline" % "jline-terminal-jna" % "3.9.0" // needed for Windows ), // For convenience, change the baseDirectory when running the compiler From e84ed0bd7d3ff014acee77e962683ac4bc06e301 Mon Sep 17 00:00:00 2001 From: Allan Renucci Date: Wed, 22 Aug 2018 12:38:52 +0200 Subject: [PATCH 3/3] Update drone image --- .drone.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5e06fefb030b..88e6fe8e4007 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,7 +23,7 @@ pipeline: # We run tests in parallel. Tests run in a copy of the working directory to avoid conflict test: group: test - image: lampepfl/dotty:2018-06-29 + image: lampepfl/dotty:2018-08-22 commands: - cp -R . /tmp/1/ && cd /tmp/1/ - ./project/scripts/sbt ";compile ;test" @@ -31,14 +31,14 @@ pipeline: test_bootstrapped: group: test - image: lampepfl/dotty:2018-06-29 + image: lampepfl/dotty:2018-08-22 commands: - cp -R . /tmp/2/ && cd /tmp/2/ - ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test" test_sbt: group: test - image: lampepfl/dotty:2018-06-29 + image: lampepfl/dotty:2018-08-22 commands: - cp -R . /tmp/4/ && cd /tmp/4/ - ./project/scripts/sbt sbt-dotty/scripted @@ -48,7 +48,7 @@ pipeline: # DOCUMENTATION: documentation: - image: lampepfl/dotty:2018-06-29 + image: lampepfl/dotty:2018-08-22 commands: - ./project/scripts/genDocs secrets: [ bot_pass ] @@ -60,7 +60,7 @@ pipeline: # PUBLISHING: # Publishing expect NIGHTLYBUILD or RELEASEBUILD to be set. See dottyVersion in Build.scala publish_nightly: - image: lampepfl/dotty:2018-06-29 + image: lampepfl/dotty:2018-08-22 environment: - NIGHTLYBUILD=yes commands: @@ -71,7 +71,7 @@ pipeline: environment: nightly publish_release: - image: lampepfl/dotty:2018-06-29 + image: lampepfl/dotty:2018-08-22 environment: - RELEASEBUILD=yes commands: @@ -95,7 +95,7 @@ pipeline: event: tag publish_sbt_release: - image: lampepfl/dotty:2018-06-29 + image: lampepfl/dotty:2018-08-22 environment: - RELEASEBUILD=yes commands: