-
Notifications
You must be signed in to change notification settings - Fork 396
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
Compatibility with Scala 2.13.0-M4. #3361
Conversation
In the next commits, the overrides-2.13 directory will contain overrides for 2.13.0-M4+. This commit copies existing overrides to an overrides-2.13.0-M3 directory so that they have a higher precedence over the overrides of the overrides-2.13 directory. Files scala/Array.scala and scala/Enumeration.scala have been copied without changes from the general overrides/ directory. All the other files have been copied from the overrides-2.13/ directory.
This PR is ready for review. But it must not be merged yet because I will have to adapt it a little bit after they merge scala/scala#6620 upstream. This PR is enough to build and publish for 2.13.0-M4. So once it's merged, we can do an "emergency" release of 0.6.23 so that we're ready to back-publish it for 2.13.0-M4 when that one is released (any day now, according to the scala/scala team). |
adad485
to
0012d82
Compare
b.result() | ||
} | ||
|
||
// TODO overload collect, flatMap and concat |
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.
@julienrf How important is this TODO? What are we missing if we do not do it now? And how hard would it be to address?
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.
Oh, sorry I forgot about that TODO. If we don’t overload collect
, flatMap
and concat
they can only return a mutable.Map
(since we don’t rely anymore on CanBuildFrom
to determine the result type). Above you can see that I’ve added an overload of map
that returns a WrappedDictionary[B]
when the transformation function returns a tuple (String, B)
.
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.
OK, thanks. We should probably address that, then, because it might be a source breaking change for some clients.
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.
Done.
@@ -37,7 +37,7 @@ REVERSI_OPT_GZ_SIZE=$(stat '-c%s' "$REVERSI_OPT.gz") | |||
|
|||
case $FULLVER in | |||
2.10.2) | |||
REVERSI_PREOPT_EXPECTEDSIZE=532000 | |||
REVERSI_PREOPT_EXPECTEDSIZE=533000 |
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.
The small increase in code size comes from the indirection through runtime.toScalaVarArgs
. Even though it is inlined, the argument must be extracted in a temp var by the optimizer to preserve evaluation order (or so it thinks) which slightly increase code size.
0012d82
to
b156691
Compare
Updated after scala/scala#6620 was merged upstream. |
b156691
to
6d7d0a9
Compare
OK, now this PR and its friend #3344 are complete wrt. the upcoming 2.13.0-M4. At least, to the best of my knowledge, and assuming they don't break anything anymore. |
Actually ... not ready. They broke it again: https://github.com/scala/scala/pull/6572/files |
They were taken from the commit a0026305125dcc814097b1fbb798fe925ca9f81f in scala/scala.
This commit puts the codebase in a state where we can build the compiler plugins, libraries and test suite with Scala 2.13.0-M4 and its new collections. The tools API and related artifacts are not yet updated. This is the minimal set of changes necessary to be able to build and back-publish for 2.13.0-M4 when it comes out. We will not be able to publish tools artifact for that version, but that is not critical.
6d7d0a9
to
5ac5168
Compare
Good to go again. Note that I made a PR upstream at scala/scala#6644, but since we override |
Well, Scala 2.13.0-M4 has reached Maven Central, so emergency just turned into deportation. I'm going to go ahead and merge this and publish 0.6.23. At least it works. If tweaks should be done, they can still be done later. |
This PR puts the codebase in a state where we can build the compiler plugins, libraries and test suite with Scala 2.12.0-M4 and its new collections. The tools API and related artifacts are not yet updated.
This is the minimal set of changes necessary to be able to build and back-publish for 2.13.0-M4 when it comes out. We will not be able to publish tools artifact for that version, but that is not critical.