Skip to content

Commit

Permalink
Revive the Scala.js backend.
Browse files Browse the repository at this point in the history
This partially reverts 06a3d47 to bring
back Dotty.js from the dead.

- Scala.js was upgraded to 1.0.0-M6, and the back-end was updated
  to reflect changes that have happened in the Scala 2 back-end
  since the initial implementation of the Dotty.js back-end.
- The backend was initially removed because of #1574, I don't see why
  GetClass has a requirement on FunctionalInterfaces, so I just removed
  it ¯\_(ツ)_/¯
- The Scala.js backend explodes when extending a Scala 2 trait
  because of the way LinkScala2Impls transforms supercalls to
  these traits. Luckily, we don't need to extend js.JSApp anymore
  to make a Hello World :P.

The following command works, and is added to the CI:

    sbt sjsSandbox/run

This generally remains a WIP. There are still a lot of
Scala.js-specific features which are not supported, notably exports
and non-native JS classes.
  • Loading branch information
smarter authored and sjrd committed Nov 9, 2018
1 parent 4385494 commit 660977c
Show file tree
Hide file tree
Showing 21 changed files with 697 additions and 720 deletions.
7 changes: 7 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ pipeline:
- ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test"
- ./project/scripts/bootstrapCmdTests

test_sjs:
group: test
image: lampepfl/dotty:2018-10-01
commands:
- cp -R . /tmp/3/ && cd /tmp/3/
- ./project/scripts/sbt ";sjsSandbox/run"

test_sbt:
group: test
image: lampepfl/dotty:2018-10-01
Expand Down
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ val scalap = Build.scalap
val dist = Build.dist
val `dist-bootstrapped` = Build.`dist-bootstrapped`

val sjsSandbox = Build.sjsSandbox

val `sbt-dotty` = Build.`sbt-dotty`
val `vscode-dotty` = Build.`vscode-dotty`

Expand Down
118 changes: 0 additions & 118 deletions compiler/sjs/backend/sjs/JSPrimitives.scala

This file was deleted.

File renamed without changes.
Loading

0 comments on commit 660977c

Please sign in to comment.