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

Enable more Scala.js tests, fix two issues #7112

Merged
merged 4 commits into from Aug 28, 2019

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Aug 27, 2019

No description provided.

In Scala.js, even Scala 2 already relies on default methods, and
does not use static method helpers.
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! ☀️

@@ -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 =>
Copy link
Member

@smarter smarter Aug 27, 2019

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)

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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.

@@ -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
Copy link
Member

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 ?

Copy link
Member Author

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.

Copy link
Member

@smarter smarter Aug 27, 2019

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")

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed. Done.

Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM.

@sjrd sjrd merged commit 524c978 into scala:master Aug 28, 2019
@sjrd sjrd deleted the enable-more-sjs-tests branch August 28, 2019 06:59
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

3 participants