Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Upgrade to sbt 1.3.6, release sbt-dotty 0.4.0 #7953
[info] Fast optimizing /tmp/2/tests/sjs-junit/../out/bootstrap/sjsJUnitTests/scala-0.22/sjsjunittests-test-fastopt.js [error] Referring to non-existent class dotty.runtime.Arrays$ [error] called from org.scalajs.testsuite.compiler.ArrayTest.setArrayIndexOutOfBounds()void
Locally at least, the classpath seems OK, wdyt ?
[dotty@upgrade/sbt-1.3.6]> show sjsJUnitTests/test:fullClasspath [info] Checking out Scala.js source version 1.0.0-RC2 [info] * Attributed(/home/smarter/opt/dotty/tests/sjs-junit/../out/bootstrap/sjsJUnitTests/scala-0.22/test-classes) [info] * Attributed(/home/smarter/opt/dotty/tests/sjs-junit/../out/bootstrap/sjsJUnitTests/scala-0.22/classes) [info] * Attributed(/home/smarter/opt/dotty/library-js/../out/bootstrap/dotty-library-bootstrappedJS/scala-0.22/classes) [info] * Attributed(/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.1/scala-library-2.13.1.jar) [info] * Attributed(/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-js/scalajs-test-interface_2.13/1.0.0-RC2/scalajs-test-interface_2.13-1.0.0-RC2.jar) [info] * Attributed(/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-js/scalajs-junit-test-runtime_2.13/1.0.0-RC2/scalajs-junit-test-runtime_2.13-1.0.0-RC2.jar) [info] * Attributed(/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-js/scalajs-test-bridge_2.13/1.0.0-RC2/scalajs-test-bridge_2.13-1.0.0-RC2.jar) [info] * Attributed(/home/smarter/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-js/scalajs-library_2.13/1.0.0-RC2/scalajs-library_2.13-1.0.0-RC2.jar) [success] Total time: 1 s, completed 14 janv. 2020 23:57:43 [dotty@upgrade/sbt-1.3.6]> show sjsJUnitTests/test:scalacOptions [info] * -feature [info] * -unchecked [info] * -encoding [info] * UTF8 [info] * -language:existentials,higherKinds,implicitConversions [info] * -bootclasspath [info] * /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jfr.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/classes [info] * -scalajs [success] Total time: 0 s, completed 14 janv. 2020 23:57:46
Switching to sbt 1.3 allows us to pass both the scala-library and dotty-library jars as standard library jars to `ScalaInstance` whereas before we could only pass one of them which could have weird consequences.
dotty-library-bootstrappedJS scalacOptions handling was broken, I fixed it by upgrading the reference compiler to simplify the handling of -Yerased-terms, but I also removed all scalajs projects from IDE startup as explained in the comment.
This fixes the sbt-dotty/quoted-example-project scripted test after the previous commit. Getting a classpath from a classloader is impossible in general, so we really shouldn't be relying on it, but I fixed the thing we currently use to at least work with sbt >= 1.3, sbt now uses multiple layers of classloaders so we have to recurse on the parent of the classloader to find all the URLs. I also made it more correct by not appending System.getProperty("java.class.path") to the classpath, this is incorrect in general and can lead to classpath pollution (e.g., when launched from sbt where java.class.path will contain the jars used by sbt itself, which might include a different version of scala-library than the one we use).
tasty-core is a dotty project, so when bootstrapping it needs to be recompiled and cannot be reused as is, the test did not fail so far since we didn't break anything, but it could be made to break by bumping the tasty version in TastyFormat. Also use change the names of the output directories of lib, dotty1 and dotty2 to match the group name.
This was broken after I stopped appending `System.getProperty("java.class.path")` to the constructed classpath. Fixed with a hack, but this is still better than looking at java.class.path.
- Move build-no-fork.sbt in a subdirectory, otherwise it would be loaded by sbt. - Call reload after changing build.sbt, otherwise nothing would actually change. - Remove build.properties, no longer needed since we now use sbt 1.3.6 by default.