-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Advance the support for Scala.js #7113
Comments
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 |
The following two tests from |
The following tests from
|
All the tests from |
The following test from the The second test in the group |
I may dig into that URITest failure. Edit: Looking at some of the other failures as well. |
@Lacaranian , good, please do it |
- Fix an issue where non-null parameters with default arguments of null would generate default parameter functions returning a type of null, which is unknown to the ScalaJS backend. Use the type of the non-null parameter as the return type - Enable the URITest for Scala.js, which was blocked by the previous issue
- Fix the encoding of the NullClass and NothingClass in JSEncoding to correctly map to the corresponding Scala.js IR Symbols - Enable the URITest for Scala.js, which was blocked by the previous issue
- Fix the encoding of the NullClass and NothingClass in JSEncoding to correctly map to the corresponding Scala.js IR Symbols - Enable the URITest for Scala.js, which was blocked by the previous issue
- Fix an issue where BoxedUnit's TYPE member was not being correctly rewritten as java.lang.Void in Scala.js IR - Enable the ClassTest for Scala.js, which uses the scala.runtime.BoxedUnit.TYPE value in one of its tests
- Fix an issue where BoxedUnit's TYPE member was not being correctly rewritten as java.lang.Void in Scala.js IR - Enable the ClassTest for Scala.js, which uses the scala.runtime.BoxedUnit.TYPE value in one of its tests
- Fix an issue where BoxedUnit's TYPE member was not being correctly rewritten as java.lang.Void in Scala.js IR - Enable the ClassTest for Scala.js, which uses the scala.runtime.BoxedUnit.TYPE value in one of its tests
- `scala.runtime.BoxedUnit.TYPE` is now intercepted by `JSCodeGen` as a primitive for `ClassOf(ClassRef("V"))`, which Scala.js recognizes as `java.lang.Void` - Enable the javalib/lang/ClassTest for Scala.js, which contains a test that uses `BoxedUnit.TYPE`
- Fix the encoding of the NullClass and NothingClass in JSEncoding to correctly map to the corresponding Scala.js IR Symbols - Enable the URITest for Scala.js, which was blocked by the previous issue
- Fix the encoding of the `NullClass` and `NothingClass` in `JSEncoding` to correctly map to the corresponding Scala.js IR Symbols - Enable the `javalib/net/URITest` for Scala.js, which uses default arguments with `null` values, which in turn are used as the return type of the default getters.
In order to return from a tail recursive tree in Scala.js IR, a label must be placed outside the loop to serve as a jump/break point. While a fresh return label had been generated for such methods (in the LocalNameGenerator), it had not been placed at the top level of its method, and was otherwise unused. After generating a method's body, if a enclosing return label had been generated, use it to wrap the method body (just as Scala 2's JS codegen does) for such breaks. Enable the tests of ReadersTest.scala of the Scala.js test suite, of which InputStreamReaderTest used a tail-recursive method that depended on this fix.
In order to use an explicit return statement in Scala.js IR, a label must be placed wrapping the whole function body to serve as a jump/break point for all control structures inside the function. While a fresh return label had been generated for such methods (in the LocalNameGenerator), it had not been placed at the top level of its method, and was otherwise unused. This affected the tree created by the TailRec MiniPhase, as well as user-written early return statements. After generating a method's body, if a enclosing return label had been generated, use it to wrap the method body (just as Scala 2's JS codegen does) for such breaks. Enable the tests of ReadersTest.scala of the Scala.js test suite, of which InputStreamReaderTest used a tail-recursive method that depended on this fix.
In order to use an explicit return statement in Scala.js IR, a label must be placed wrapping the whole function body to serve as a jump/break point for all control structures inside the function. While a fresh return label had been generated for such methods (in the LocalNameGenerator), it had not been placed at the top level of its method, and was otherwise unused. This affected the tree created by the TailRec MiniPhase, as well as user-written early return statements. After generating a method's body, if a enclosing return label had been generated, use it to wrap the method body (just as Scala 2's JS codegen does) for such breaks. Enable the tests of ReadersTest.scala of the Scala.js test suite, of which InputStreamReaderTest used a tail-recursive method that depended on this fix.
…types - Fix the encoding of the `NullClass` and `NothingClass` in `JSEncoding` to correctly map to the corresponding Scala.js IR Symbols - Enable the `javalib/net/URITest` for Scala.js, which uses default arguments with `null` values, which in turn are used as the return type of the default getters.
- `scala.runtime.BoxedUnit.TYPE` is now intercepted by `JSCodeGen` as a primitive for `ClassOf(ClassRef("V"))`, which Scala.js recognizes as `java.lang.Void` - Enable the javalib/lang/ClassTest for Scala.js, which contains a test that uses `BoxedUnit.TYPE`
Partial fix for lampepfl#7113: Fix Scala.js codegen for Explicit Returns
- `scala.runtime.BoxedUnit.TYPE` is now intercepted by `JSCodeGen` as a primitive for `ClassOf(ClassRef("V"))`, which Scala.js recognizes as `java.lang.Void` - Enable the javalib/lang/ClassTest for Scala.js, which contains a test that uses `BoxedUnit.TYPE`
Partial fix for lampepfl#7113: Fix Scala.js codegen for BoxedUnit.TYPE
…types - Fix the encoding of the `NullClass` and `NothingClass` in `JSEncoding` to correctly map to the corresponding Scala.js IR Symbols - Enable the `javalib/net/URITest` for Scala.js, which uses default arguments with `null` values, which in turn are used as the return type of the default getters.
…types - Fix the encoding of the `NullClass` and `NothingClass` in `JSEncoding` to correctly map to the corresponding Scala.js IR Symbols - Enable the `javalib/net/URITest` for Scala.js, which uses default arguments with `null` values, which in turn are used as the return type of the default getters.
…ions with arguments To be able to use the `expected` and `timeout` annotation arguments in JUnit @test annotations, add handling for these arguments by supplying them as arguments to the resolved constructor for the JUnit test class. Enable the JUnitAnnotationsParamTest, which depends on this functionality.
…ions with arguments To be able to use the `expected` and `timeout` annotation arguments in JUnit @test annotations, add handling for these arguments by supplying them as arguments to the resolved constructor for the JUnit test class. Enable the JUnitAnnotationsParamTest, which depends on this functionality.
…ions with arguments To be able to use the `expected` and `timeout` annotation arguments in JUnit @test annotations, add handling for these arguments by supplying them as arguments to the resolved constructor for the JUnit test class. Enable the JUnitAnnotationsParamTest, which depends on this functionality.
Partial fix for lampepfl#7113 To be able to use the `expected` and `timeout` annotation arguments in JUnit @test annotations, add handling for these arguments by supplying them as arguments to the resolved constructor for the JUnit test class. Enable the JUnitAnnotationsParamTest, which depends on this functionality.
Partial fix for lampepfl#7113 To be able to use the `expected` and `timeout` annotation arguments in JUnit @test annotations, add handling for these arguments by supplying them as arguments to the resolved constructor for the JUnit test class. Enable the JUnitAnnotationsParamTest, which depends on this functionality.
…types - Fix the encoding of the `NullClass` and `NothingClass` in `JSEncoding` to correctly map to the corresponding Scala.js IR Symbols - Enable the `javalib/net/URITest` for Scala.js, which uses default arguments with `null` values, which in turn are used as the return type of the default getters.
Partial fix for lampepfl#7113: Fix Scala.js codegen for Null/Nothing types
Partial fix for lampepfl#7113 To be able to use the `expected` and `timeout` annotation arguments in JUnit @test annotations, add handling for these arguments by supplying them as arguments to the resolved constructor for the JUnit test class. Enable the JUnitAnnotationsParamTest, which depends on this functionality.
Partial fix for lampepfl#7113 Just enabling the tests which already passed. It looks like the upstream tests need updating for the Set pieces.
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. |
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!
The text was updated successfully, but these errors were encountered: