-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Upgrade to Scala.js 1.0.0-RC2. #7787
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
Conversation
Now that we have non-mangled names as `ClassDef`'s names, we can derive the corresponding file names from that, instead of having to carry around the original symbol and an optional suffix. This is a forward port of scala-js/scala-js@44996ce
There was a problem hiding this 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:
- Separate subject from body with a blank line
- When fixing an issue, start your commit message with
Fix #<ISSUE-NBR>:
- Limit the subject line to 72 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line ("Add" instead of "Added")
- Wrap the body at 80 characters
- Use the body to explain what and why vs. how
adapted from https://chris.beams.io/posts/git-commit
Have an awesome day! ☀️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM.
} | ||
} | ||
|
||
private lazy val dontUseExitingUncurryForForwarders = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dead code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
}.toSet | ||
|
||
val members = { | ||
// Copied from DottyBackendInterface.ExcludedForwarderFlags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't you call into it instead of copying it ? It's not impossible that it will change in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't because it was defined in the class DottyBackendInterface
, and it was overkill to instantiate that from the Scala.js back-end.
I moved the definition to a new companion object of DottyBackendInterface
and now I use that one from here.
This includes changes to the contract of calling static methods in Java-defined classes. They are now actually called as static methods in the IR. We also generate static forwarders for public methods in static objects. These changes are a forward-port of scala-js/scala-js@f94713b The only real difference is that in scalac, we emit a compile error if the companion class contains *any* public static method, because scalac does not otherwise produce public static methods at the moment. Since dotty does generate public static methods for the bodies of SAMs, we only complain if there is an actual clash.
1f8d5cd
to
c99d407
Compare
This includes changes to the contract of calling static methods in Java-defined classes. They are now actually called as static methods in the IR.
We also generate static forwarders for public methods in static objects.
These changes are a forward-port of scala-js/scala-js@f94713b
The only real difference is that in scalac, we emit a compile error if the companion class contains any public static method, because scalac does not otherwise produce public static methods at the moment. Since dotty does generate public static methods for the bodies of SAMs, we only complain if there is an actual clash.