-
Notifications
You must be signed in to change notification settings - Fork 2
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
Scala 2.13 upgrade #195
Scala 2.13 upgrade #195
Conversation
"com.gu" %% "thrift-serializer" % "4.0.0", | ||
"com.gu" %% "thrift-serializer" % "4.0.2", |
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.
This was the first version of thrift-serializer
to support Scala 2.13, so this is the most minimal change I could make to get the project to compile. There have been many newer versions since then, the current is 5.0.7:
https://index.scala-lang.org/guardian/thrift-serializer/artifacts/thrift-serializer
Switched from `JavaConverters` to 2.13's `CollectionConverters`. Widening conversion from `Long` to `Double` is deprecated, so used `toDouble` instead. Previously `Buffer` could be assigned to `Seq`, because `Seq` was mutable. Now `Seq` is immutable by default, so `toSeq` is needed to create a `Seq` from a `Buffer`. `Either` is now right-biased, so `.right` is no longer needed. `.mapValues` is deprecated, need `.view.mapValues` instead. `.toMap` is also needed to get back to a `Map` from a `MapView`. Auto-application is deprecated, so `()` must be added in some cases. Deleted `Enumerators` because it wasn't used, and it was using features unsupported in Scala 2.13.
17e8f52
to
a5bd3f6
Compare
The snyk project for this application is called |
As you predicted, once merged, there was a new story-packages:story-packages_2.13 snyk project, effectively a duplicate: ...so I have now deleted the old story-packages:story-packages_2.12 one: |
I've double-checked https://packages.gutools.co.uk/editorial, and it looks good! |
Required for
facia-scala-client
to drop support for Scala 2.12: guardian/facia-scala-client#317Scala 2.13 Fixes
JavaConverters
to 2.13'sCollectionConverters
.Long
toDouble
is deprecated, so usedtoDouble
instead.Buffer
could be assigned toSeq
, becauseSeq
was mutable. NowSeq
is immutable by default, sotoSeq
is needed to create aSeq
from aBuffer
.Either
is now right-biased, so.right
is no longer needed..mapValues
is deprecated, need.view.mapValues
instead..toMap
is also needed to get back to aMap
from aMapView
.()
must be added in some cases.Enumerators
because it wasn't used, and it was using features unsupported in Scala 2.13.Testing In CODE
We deployed to CODE and created a new package, as seen here:
See also