Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to sbt 1.3.6, release sbt-dotty 0.4.0 #7953

Merged
merged 11 commits into from Jan 16, 2020

Conversation

@smarter
Copy link
Member

smarter commented Jan 9, 2020

No description provided.

@smarter smarter force-pushed the dotty-staging:upgrade/sbt-1.3.6 branch 2 times, most recently from 0c03eb0 to 8f5f4d3 Jan 9, 2020
@smarter smarter force-pushed the dotty-staging:upgrade/sbt-1.3.6 branch from 8f5f4d3 to 388f889 Jan 10, 2020
@smarter smarter marked this pull request as ready for review Jan 10, 2020
@smarter smarter requested a review from nicolasstucki Jan 10, 2020
@nicolasstucki

This comment has been minimized.

Copy link
Contributor

nicolasstucki commented Jan 10, 2020

@smarter sjsJUnitTests is failing

@gzoller

This comment has been minimized.

Copy link
Contributor

gzoller commented Jan 10, 2020

Hello! The classpath discovery fix needs to also go in dotty.tools.dotc.consumetasty.ConsumeTasty. The original code is the same there as in QuoteDriver.

@smarter smarter force-pushed the dotty-staging:upgrade/sbt-1.3.6 branch 3 times, most recently from 604c9ce to 1cc2379 Jan 13, 2020
@smarter

This comment was marked as resolved.

Copy link
Member Author

smarter commented Jan 14, 2020

sjsJUnitTests/test fails linking on the CI because it can't find dotty-library, but it's working fine locally so I have no idea what could be going wrong, any hint on how to debug this @sjrd ?

[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
@smarter

This comment was marked as resolved.

Copy link
Member Author

smarter commented Jan 14, 2020

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
@smarter smarter force-pushed the dotty-staging:upgrade/sbt-1.3.6 branch from 1cc2379 to caf498d Jan 15, 2020
@smarter smarter requested a review from nicolasstucki Jan 15, 2020
@smarter smarter assigned nicolasstucki and unassigned smarter Jan 15, 2020
Copy link
Contributor

nicolasstucki left a comment

Otherwise LGTM

sbt-dotty/sbt-test/sbt-dotty/i7897/test Show resolved Hide resolved
smarter added 5 commits May 16, 2019
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.
smarter and others added 6 commits Jan 9, 2020
For the same reason that it was removed from sbt:
sbt/sbt@ffa69ea
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.
The tests ensure that we've fixed #7897.

Co-Authored-By: Guillaume Martres <smarter@ubuntu.com>
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.
@smarter smarter force-pushed the dotty-staging:upgrade/sbt-1.3.6 branch from caf498d to 6333954 Jan 16, 2020
@nicolasstucki nicolasstucki merged commit 0af8c1e into lampepfl:master Jan 16, 2020
1 check passed
1 check passed
continuous-integration/drone/pr Build is passing
Details
@nicolasstucki nicolasstucki deleted the dotty-staging:upgrade/sbt-1.3.6 branch Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.