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

Fix #2837: Remove the term "Scala.js defined" #2997

Merged
merged 2 commits into from
Jun 14, 2017

Conversation

gzm0
Copy link
Contributor

@gzm0 gzm0 commented Jun 7, 2017

It is replaced by non-native JS class/type (except for tests).

With this commit, the following regexes (case insensitive) to not return
any result outside of tests and the definition of the @ScalaJSDefined
annotation itself.

Scala\.js[- ]defined
SJS ?defined
ScalaJSDefined

@gzm0 gzm0 requested a review from sjrd June 7, 2017 18:24
@gzm0
Copy link
Contributor Author

gzm0 commented Jun 7, 2017

Let me know if you want me to:

@scala-jenkins
Copy link

Refer to this link for build results (access rights to CI server needed):

https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/4040/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/5351/
Test FAILed.

Copy link
Member

@sjrd sjrd left a comment

Choose a reason for hiding this comment

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

A couple trivial things.

@@ -203,21 +203,6 @@ class JSInteropTest extends DirectTest with TestHelpers {
obj <- Seq("class", "trait", "object")
} yield {
s"""
@ScalaJSDefined
Copy link
Member

Choose a reason for hiding this comment

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

Hum you should only remove the annotation, not the entire test case.

This test case is for a non-native JS class/trait/object, that extends js.Object, and that has an @JSImport annotation with a globalFallback. There's no other test that does that.

@@ -2247,7 +2247,7 @@ abstract class GenJSCode extends plugins.PluginComponent
sym.hasFlag(reflect.internal.Flags.DEFAULTPARAM) &&
isRawJSType(sym.owner.tpe) && {
/* If this is a default parameter accessor on a
* ScalaJSDefinedJSClass, we need to know if the method for which we
* NonNativeJSClass, we need to know if the method for which we
Copy link
Member

Choose a reason for hiding this comment

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

"non-native JS class"?

val JSClass = new OwnerKind(0x10)
/** A Scala.js-defined JS oobject. */
/** A non-native JS oobject. */
Copy link
Member

Choose a reason for hiding this comment

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

Take the opportunity to fix the oo in oobject.

def sjsDefinedAnonymousClass: Unit = {
test("SJSDefinedAnonymousClass")
def anonymousJSClass: Unit = {
test("AnonymousJSClass", "scala.scalajs.js.annotation.internal.AnonymousJSClass")
}
Copy link
Member

Choose a reason for hiding this comment

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

There will be a silent conflict with b3f5839 here. The fully qualified name won't be necessary.

@sjrd
Copy link
Member

sjrd commented Jun 7, 2017

Can you point me to a surviving "Scala.js-defined" in tests? It seems you did rename things in compiler tests and testSuite, so I'm not sure what else there is?

@sjrd
Copy link
Member

sjrd commented Jun 7, 2017

Anyway IMO we can close #2837 with this PR, as there won't be any user-facing references to "Scala.js-defined" left, which is by far the most important.

@gzm0
Copy link
Contributor Author

gzm0 commented Jun 9, 2017

Can you point me to a surviving "Scala.js-defined" in tests

For example here:

@Test def sjsdefined_with_defs_that_are_properties(): Unit = {

There are plenty of these left.

@gzm0
Copy link
Contributor Author

gzm0 commented Jun 9, 2017

Also updated.

@sjrd
Copy link
Member

sjrd commented Jun 9, 2017

There are plenty of these left.

Ah yes I see. Let's leave them alone for now, indeed.

@scala-jenkins
Copy link

Refer to this link for build results (access rights to CI server needed):

https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/4048/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/5361/
Test FAILed.

@gzm0
Copy link
Contributor Author

gzm0 commented Jun 14, 2017

Updated (there was a line number issue in a test).

Copy link
Member

@sjrd sjrd left a comment

Choose a reason for hiding this comment

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

Re-LGTM

@scala-jenkins
Copy link

Refer to this link for build results (access rights to CI server needed):

https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/4062/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/5381/
Test FAILed.

@@ -49,7 +48,6 @@ class JSSAMTest extends DirectTest with TestHelpers {
def foo(x: Int): Int
}

@ScalaJSDefined
Copy link
Member

Choose a reason for hiding this comment

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

This change provokes some more line number changes below: at lines 61 and 64, the line numbers should be 15 and 16, respectively.

gzm0 added 2 commits June 14, 2017 19:32
They probably creeped in from the 0.6.x branch (or forgotten imports).
It is replaced by non-native JS class/type (except for tests).

With this commit, the following regexes (case insensitive) to not return
any result outside of tests and the definition of the @ScalaJSDefined
annotation itself.

Scala\.js[- ]defined
SJS ?defined
ScalaJSDefined
@scala-jenkins
Copy link

Refer to this link for build results (access rights to CI server needed):

https://scala-webapps.epfl.ch/jenkins/job/scalajs-pr/4070/
https://scala-webapps.epfl.ch/jenkins/job/scalajs-matrix-build/5389/
Test PASSed.

@sjrd sjrd merged commit ef96a15 into scala-js:master Jun 14, 2017
@gzm0 gzm0 deleted the no-sjs-defined branch June 14, 2017 20:50
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.

3 participants