Skip to content

Upgrade to Scala.js 1.0.0-RC1. #7617

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

Merged
merged 1 commit into from
Nov 27, 2019
Merged

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Nov 26, 2019

There were several changes to the IR in 1.0.0-RC1 that have an impact on this codebase:

@sjrd sjrd requested a review from nicolasstucki November 26, 2019 12:38
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! ☀️

@@ -970,9 +970,9 @@ object Build {
-- "CollectionTest.scala" -- "CollectionsOnCheckedCollectionTest.scala" -- "CollectionsOnCheckedListTest.scala" -- "CollectionsOnCheckedMapTest.scala" -- "CollectionsOnCheckedSetTest.scala"
-- "CollectionsOnCollectionsTest.scala" -- "CollectionsOnListsTest.scala" -- "CollectionsOnMapsTest.scala" -- "CollectionsOnSetFromMapTest.scala" -- "CollectionsOnSetsTest.scala"
-- "CollectionsOnSynchronizedCollectionTest.scala" -- "CollectionsOnSynchronizedListTest.scala" -- "CollectionsOnSynchronizedMapTest.scala" -- "CollectionsOnSynchronizedSetTest.scala" -- "CollectionsTest.scala"
-- "DequeTest.scala" -- "EventObjectTest.scala" -- "FormatterTest.scala" -- "HashMapTest.scala" -- "HashSetTest.scala"
-- "DequeTest.scala" -- "EventObjectTest.scala" -- "FormatterTest.scala" -- "HashMapTest.scala" -- "HashSetTest.scala" -- "IdentityHashMapTest.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.

This file was added in 1.0.0-RC1. Like the other collection tests, it doesn't pass.

-- "LinkedHashMapTest.scala" -- "LinkedHashSetTest.scala" -- "LinkedListTest.scala" -- "ListTest.scala" -- "MapTest.scala"
-- "NavigableSetTest.scala" -- "SetTest.scala" -- "SortedMapTest.scala" -- "SortedSetTest.scala" -- "TreeSetTest.scala")).get
-- "NavigableSetTest.scala" -- "PriorityQueueTest.scala" -- "SetTest.scala" -- "SortedMapTest.scala" -- "SortedSetTest.scala" -- "TreeSetTest.scala")).get
Copy link
Member Author

Choose a reason for hiding this comment

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

This file was added in 1.0.0-RC1. Like the other collection tests, it doesn't pass.

@@ -958,7 +958,7 @@ object Build {
(
(dir / "shared/src/test/scala/org/scalajs/testsuite/compiler" ** (("*.scala":FileFilter) -- "RegressionTest.scala" -- "ReflectiveCallTest.scala")).get
++ (dir / "shared/src/test/scala/org/scalajs/testsuite/javalib/lang" ** (("*.scala": FileFilter) -- "StringTest.scala")).get
++ (dir / "shared/src/test/scala/org/scalajs/testsuite/javalib/io" ** (("*.scala": FileFilter) -- "ByteArrayInputStreamTest.scala" -- "ByteArrayOutputStreamTest.scala" -- "DataInputStreamTest.scala" -- "DataOutputStreamTest.scala" -- "InputStreamTest.scala" -- "OutputStreamWriterTest.scala" -- "PrintStreamTest.scala" -- "CommonStreamsTests.scala")).get
++ (dir / "shared/src/test/scala/org/scalajs/testsuite/javalib/io" ** (("*.scala": FileFilter) -- "ByteArrayInputStreamTest.scala" -- "ByteArrayOutputStreamTest.scala" -- "DataInputStreamTest.scala" -- "DataOutputStreamTest.scala" -- "InputStreamTest.scala" -- "OutputStreamWriterTest.scala" -- "PrintStreamTest.scala" -- "ReadersTest.scala" -- "CommonStreamsTests.scala")).get
Copy link
Member Author

Choose a reason for hiding this comment

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

The tests in ReadersTest.scala have changed, and now include calls like

assertEquals(5, someLong())

which dotty resolves to calling assertEquals(Any, Any) (and the int compares as not equal to the Long) whereas Scala 2 resolves to calling assertEquals(Long, Long).

Copy link
Member

Choose a reason for hiding this comment

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

Would you mind opening an issue for that ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I'll minimize it later today.

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.

LGTM, thanks for the detailed breakdown!

@sjrd
Copy link
Member Author

sjrd commented Nov 26, 2019

It looks like I'm hitting spurious reentrant checks:

possible data race involving globally reachable variable table in class ConcurrentHashMap: Array[java.util.concurrent.ConcurrentHashMap.Node[K, V]]
  use -Ylog:checkReentrant+ to find out more about why the variable is reachable.
possible data race involving globally reachable variable keySet in class AbstractMap: java.util.Set[K]
  use -Ylog:checkReentrant+ to find out more about why the variable is reachable.
possible data race involving globally reachable variable values in class AbstractMap: java.util.Collection[V]
  use -Ylog:checkReentrant+ to find out more about why the variable is reachable.
possible data race involving globally reachable variable root in class Pattern: java.util.regex.Pattern.Node
  use -Ylog:checkReentrant+ to find out more about why the variable is reachable.
possible data race involving globally reachable variable matchRoot in class Pattern: java.util.regex.Pattern.Node
  use -Ylog:checkReentrant+ to find out more about why the variable is reachable.
possible data race involving globally reachable variable buffer in class Pattern: Array[Int]
  use -Ylog:checkReentrant+ to find out more about why the variable is reachable.
possible data race involving globally reachable variable namedGroups in class Pattern: java.util.Map[String, Integer]
  use -Ylog:checkReentrant+ to find out more about why the variable is reachable.
possible data race involving globally reachable variable groupNodes in class Pattern: Array[java.util.regex.Pattern.GroupHead]
  use -Ylog:checkReentrant+ to find out more about why the variable is reachable.
possible data race involving globally reachable variable capturingGroupCount in class Pattern: Int
  use -Ylog:checkReentrant+ to find out more about why the variable is reachable.
possible data race involving globally reachable variable localCount in class Pattern: Int
  use -Ylog:checkReentrant+ to find out more about why the variable is reachable.
10 errors found

but trying to use -Ylog:checkReentrant+ with the reproduction stored in the logs doesn't give any more details. I just see those 10 errors, and no additional information.

There were several changes to the IR in 1.0.0-RC1 that have an
impact on this codebase:

* Primitive types now have dedicated `PrimRef`s when used as
  `TypeRef`s, so for example `IntRef` instead of `ClassRef("I")`.
  See scala-js/scala-js#3802
* Names now have dedicated types instead of `String`s, and depend
  on the kind of symbol: `LocalName`, `LabelName`, `FieldName`,
  `MethodName` and `ClassName`. There are different kinds of
  `js.Ident`s to go with each kind of `Name`.
  See scala-js/scala-js#3804,
  scala-js/scala-js#3814 and
  scala-js/scala-js#3833
* Original names are now represented by a dedicated `OriginalName`
  type, and they are stored only at definition site, not at use
  site.
  See scala-js/scala-js#3845
@sjrd sjrd force-pushed the scalajs-1.0.0-RC1 branch from 980d37b to 0c8b7aa Compare November 26, 2019 16:03
@sjrd sjrd mentioned this pull request Nov 26, 2019
@smarter smarter merged commit 28f3da6 into scala:master Nov 27, 2019
@smarter smarter deleted the scalajs-1.0.0-RC1 branch November 27, 2019 11: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.

3 participants