Dotty contains preliminary support for Scala.js under the flag -scalajs. Or rather, it contains the infrastructure for preliminary support. It is far from being actually usable, but this is where you can help!
I have written a tutorial that walks you through a few steps that you can do to further the support of Scala.js in Dotty. Even if you do not typically contribute to a compiler, this can be your chance. It is not very difficult, given that there already exists an extensive test suite, as well as a working implementation for scalac.
Read the tutorial, and get going!
I noted that often when adding and then removing a test suite I'd get errors like it was still trying to compile the removed test suite
I solved it by explicitly deleting the files with
rm -Rf tests/out/bootstrap/sjsJUnitTests
The following two tests from javalib.lang fail without dotty alteration (the rest of the tests from the package are added in #7255):
The following tests from javalib.io fail without dotty alteration (only three tests from javalib.io are successful so far #7271)
javalib/io/ByteArrayInputStreamTest.scala: error log linkjavalib/io/ByteArrayOutputStreamTest.scala: error log linkjavalib/io/DataInputStreamTest.scala: error log linkjavalib/io/DataOutputStreamTest.scala: error log linkjavalib/io/InputStreamTest.scala: error log linkjavalib/io/OutputStreamWriterTest.scala: error log linkjavalib/io/PrintStreamTest.scala: error log linkjavalib/io/ReadersTest.scala: error log linkAll the tests from javalib.math have been enabled, no failing tests were discovered #7272
The following test from the javalib.net fails:
The second test in the group javalib/net/URLDecoderTest.scala has been enabled #7273
I may dig into that URITest failure.
Edit: Looking at some of the other failures as well.
@Lacaranian , good, please do it
Thanks to all of you who have contributed to the support of Scala.js in Dotty.
Since I've been allocated time at the Scala Center to finish it, it is now almost done, and so I think this issue can be closed.
Most helpful comment
Thanks to all of you who have contributed to the support of Scala.js in Dotty.
Since I've been allocated time at the Scala Center to finish it, it is now almost done, and so I think this issue can be closed.