-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Enable more Scala.js tests, fix two issues #7112
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
In Scala.js, even Scala 2 already relies on default methods, and does not use static method helpers.
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! ☀️
@@ -75,7 +75,7 @@ class LinkScala2Impls extends MiniPhase with IdentityDenotTransformer { thisPhas | |||
def currentClass = ctx.owner.enclosingClass.asClass | |||
app match { | |||
case Apply(sel @ Select(Super(_, _), _), args) | |||
if sel.symbol.owner.is(Scala2x) && currentClass.mixins.contains(sel.symbol.owner) => | |||
if sel.symbol.owner.is(Scala2x) && currentClass.mixins.contains(sel.symbol.owner) && !ctx.settings.scalajs.value => |
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 think we could go further and use the default method even when not using Scala.js, going through the static methods is supposed to improve cold performance but based on the investigation I did, they shouldn't affect semantics (#5928)
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 don't object, but I would argue that it is out of scope of this PR. I would keep this PR to be Scala.js-only. Changing the JVM behavior should be done in a separate PR I think.
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.
Your call, but I'd like to keep the difference in code paths taken when scala.js is enabled to a minimum.
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 haven't managed to make it work for the JVM in 20 minutes. I think changing the JVM should be best done by someone who understand the thing better than I do.
project/Build.scala
Outdated
@@ -948,6 +948,7 @@ object Build { | |||
( | |||
(dir / "shared/src/test/scala/org/scalajs/testsuite/compiler" ** "IntTest.scala").get | |||
++ (dir / "shared/src/test/scala/org/scalajs/testsuite/javalib/lang" ** "IntegerTest.scala").get | |||
++ (dir / "shared/src/test/scala/org/scalajs/testsuite/javalib/lang" ** "ObjectTest.scala").get |
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.
Is there no way to do IntegerTest.scala OR ObjectTest.scala
instead of duplicating the full path ?
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.
Not that I know of. Hopefully it will soon turn into *.scala
.
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 think you may be able to do OrFilter("IntegerTest.scala", "ObjectTest.scala")
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.
Indeed. Done.
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.
90c5f64
to
3543467
Compare
No description provided.