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

Upgrade to Scala.js 1.0.0-RC1 #106

Merged
merged 5 commits into from
Nov 25, 2019
Merged

Upgrade to Scala.js 1.0.0-RC1 #106

merged 5 commits into from
Nov 25, 2019

Conversation

gzm0
Copy link
Contributor

@gzm0 gzm0 commented Nov 25, 2019

No description provided.

build.sbt Outdated
previousArtifact := {
val previousArtifactSetting = Def.settings()
/* MiMa is completely disabled while we are in 1.0.0-SNAPSHOT.
mimaPreviousArtifacts ++= {
val scalaV = scalaVersion.value
val scalaBinaryV = scalaBinaryVersion.value
if (!scalaVersionsUsedForPublishing.contains(scalaV)) {
Copy link
Member

Choose a reason for hiding this comment

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

Since you removed scalaVersionsUsedForPublishing, perhaps also remove this test?

They are deprecated in Scala 2.13.
@gzm0
Copy link
Contributor Author

gzm0 commented Nov 25, 2019

Updated (fix in KeepAliveTest)

@@ -24,7 +22,7 @@ class KeepAliveTest {
def quit(): Unit = closed = true

def executeScript(code: String, args: Object*): Object =
Map.empty[String, String].asJava
new java.util.HashMap[String, java.util.List[String]]()
Copy link
Member

Choose a reason for hiding this comment

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

Hum, why did the type of values change from String to java.util.List[String]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was a bug :) But it's of course not distinguishable for an empty map...

@gzm0
Copy link
Contributor Author

gzm0 commented Nov 25, 2019

Fixed another omission in the scala version upgrade commit: There were unnecessary if blocks.

@gzm0 gzm0 marked this pull request as ready for review November 25, 2019 18:16
@gzm0 gzm0 requested a review from sjrd November 25, 2019 18:17
@gzm0
Copy link
Contributor Author

gzm0 commented Nov 25, 2019

Also see: scala-js/scala-js#3884

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.

The suggested changes below should bring the new code closer to the semantics of the old code, which I suppose should fix the broken tests.

Also I would remove the following sentence from the commit message:

This surfaces in 2.13 where takeRight seems to not be optimized.

or at least change it so that it doesn't assume what is not confirmed:

This surfaces in 2.13 where takeRight seems to be compiled differently.

val h1 = elements(0)
// Nodes start at 2 to ignore scripts.

val h1 = nodes.item(2)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
val h1 = nodes.item(2)
val h1 = nodes.item(nodes.length - 2)

assertEquals("H1", h1.tagName.asInstanceOf[String])
assertEquals("SeleniumJSEnv Test", h1.textContent.asInstanceOf[String])

val canvas = elements(1)
val canvas = nodes.item(3)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
val canvas = nodes.item(3)
val canvas = nodes.item(nodes.length - 1)

gzm0 added 3 commits November 25, 2019 21:03
It is not; notably it does not have all methods like `slice`. This
surfaces in 2.13 where the implementation of takeRight uses `slice`.
- Drop 2.10 support
- Update 2.12 version
- Add 2.13 support
@sjrd sjrd merged commit a7656c1 into scala-js:master Nov 25, 2019
@gzm0 gzm0 deleted the rc1 branch February 5, 2020 15:27
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.

2 participants