Skip to content

[WIP] Resurrect the Scala.js backend #3481

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

Closed
wants to merge 2 commits into from

Conversation

smarter
Copy link
Member

@smarter smarter commented Nov 15, 2017

Happy birthday @sjrd 😛

This partially reverts 06a3d47 to bring
back Dotty.js from the dead. Many things are broken still, but this is
enough to do some experiments:

  • The backend was initially removed because of Scala.JS sandbox is broken #1574, I don't see why
    GetClass has a requirement on FunctionalInterfaces, so I just removed
    it ¯\_(ツ)_/¯
  • Scala.js was upgraded to 0.6.19. More recent versions of Scala.js cannot be
    used because they require sbt 0.13.16 and we're blocked by
    com.typesafe.sbt:sbt-interface:0.13.16 is not published sbt/sbt#3460, this won't be an issue anymore
    once we switch to sbt 1 (see Upgrade to sbt 1 #3441)
  • GenSJSIR was hacked to compile with 0.6.19 but is missing most of the
    changes to the Scala.js backend phase for Scala 2 that happened
    since it was initially ported to Dotty from Scala.js 0.6.8
  • scalajs-ir does not compile with Dotty anymore, see comments in Build.scala
  • 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.

I verified that the following works:

sbt sjsSandbox/run

But I don't know if anything else does!

This partially reverts 06a3d47 to bring
back Dotty.js from the dead. Many things are broken still, but this is
enough to do some experiments:
- The backend was initially removed because of scala#1574, I don't see why
  GetClass has a requirement on FunctionalInterfaces, so I just removed
  it ¯\_(ツ)_/¯
- Scala.js was upgraded to 0.6.19. More recent versions of Scala.js cannot be
  used because they require sbt 0.13.16 and we're blocked by
  sbt/sbt#3460, this won't be an issue anymore
  once we switch to sbt 1 (see scala#3441)
- GenSJSIR was hacked to compile with 0.6.19 but is missing most of the
  changes to the Scala.js backend phase for Scala 2 that happened
  since it was initially ported to Dotty from Scala.js 0.6.8
- scalajs-ir does not compile with Dotty anymore, see comments in Build.scala
- 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.

I verified that the following works:
    sbt sjsSandbox/run
But I don't know if anything else does!
For some reason if we don't do that we get cyclic reference errors,
this will need to be investigated.
@Blaisorblade
Copy link
Contributor

Closing this for now as outdated — hopefully somebody (@sjrd?) will resurrect it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants