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

Revive the Scala.js backend. #5143

Merged
merged 3 commits into from
Dec 10, 2018
Merged

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Sep 22, 2018

No description provided.

Copy link
Member

@dottybot dottybot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, and thank you for opening this PR! 🎉

All contributors have signed the CLA, thank you! ❤️

Commit Messages

We want to keep history, but for that to actually be useful we have
some rules on how to format our commit messages (relevant xkcd).

Please stick to these guidelines for commit messages:

  1. Separate subject from body with a blank line
  2. When fixing an issue, start your commit message with Fix #<ISSUE-NBR>:
  3. Limit the subject line to 72 characters
  4. Capitalize the subject line
  5. Do not end the subject line with a period
  6. Use the imperative mood in the subject line ("Add" instead of "Added")
  7. Wrap the body at 80 characters
  8. Use the body to explain what and why vs. how

adapted from https://chris.beams.io/posts/git-commit

Have an awesome day! ☀️

@sjrd
Copy link
Member Author

sjrd commented Sep 22, 2018

@allanrenucci (since you seem to update .drone.yml most often) what should I do to add Node.js to the installed programs on the Drone images?

@allanrenucci
Copy link
Contributor

The Dockerfile for the drone image is at https://github.com/lampepfl/dotty-drone/blob/master/dotty-docker/Dockerfile. You need to add node to the list of installed packages. Then one needs to create a new image https://github.com/lampepfl/dotty-drone/blob/master/README.md#dotty-docker-image.

I can do the last step for you on Monday

@allanrenucci
Copy link
Contributor

@sjrd I published a new image lampepfl/dotty:2018-09-24 that has Node.js installed

@sjrd
Copy link
Member Author

sjrd commented Sep 24, 2018

@allanrenucci Thanks! It works :)

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 scala#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.
@sjrd sjrd changed the title CI ONLY Revive the Scala.js backend Revive the Scala.js backend. Nov 9, 2018
@sjrd sjrd requested a review from smarter November 9, 2018 11:15
@sjrd sjrd assigned smarter and unassigned sjrd Nov 9, 2018
@sjrd
Copy link
Member Author

sjrd commented Nov 9, 2018

Ready for review :)

@smarter
Copy link
Member

smarter commented Nov 9, 2018

Is the code in compiler/sjs/backend/* synchronized with 1.0.0-M6 ?

@sjrd
Copy link
Member Author

sjrd commented Nov 9, 2018

Is the code in compiler/sjs/backend/* synchronized with 1.0.0-M6 ?

For the parts that are implemented, yes.

Copy link
Contributor

@nicolasstucki nicolasstucki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise looks good

compiler/src/dotty/tools/dotc/Run.scala Outdated Show resolved Hide resolved
Instead of having `Run.rootContext` hard-code the filtering.
Copy link
Contributor

@nicolasstucki nicolasstucki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as long as the tests pass

.drone.yml Outdated Show resolved Hide resolved
@sjrd sjrd merged commit ee05b74 into scala:master Dec 10, 2018
@sjrd sjrd deleted the revive-scalajs branch December 10, 2018 17:34
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.

None yet

5 participants