-
Notifications
You must be signed in to change notification settings - Fork 643
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 3.3.1 and improve Scala 3 compatibility #3010
Conversation
import scala.reflect.ClassTag | ||
|
||
trait BigQueryCollectionFormats { | ||
|
||
/** | ||
/**Ø |
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.
/**Ø | |
/** |
private implicit def system = http.system | ||
private implicit def ec = system.dispatcher | ||
private implicit def scheduler = system.scheduler | ||
private implicit def system: ExtendedActorSystem = http.system |
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.
Are you sure this needs to be extended actorsystem, just ActorSystem is probably enough.
private implicit def ec = system.dispatcher | ||
private implicit def scheduler = system.scheduler | ||
private implicit def system: ExtendedActorSystem = http.system | ||
private implicit def ec: ExecutionContextExecutor = system.dispatcher |
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.
We usually type these as ExecutionContext
as that is what is needed on the consuming side.
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.
(same for all other dispatcher as implicit ec in the PR)
@@ -31,7 +34,7 @@ class MqttTypedActorSystemSpec extends AnyWordSpec { | |||
|
|||
class MqttClassicActorSystemSpec extends AnyWordSpec { | |||
|
|||
implicit val actorSystem = akka.actor.ActorSystem("MqttClassicActorSystemSpec") | |||
implicit val actorSystem: actor.ActorSystem = akka.actor.ActorSystem("MqttClassicActorSystemSpec") |
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.
Just use the full path and skip the package import
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.
Please revert the library (and Scala) bumps that are not strictly needed for this PR
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.
All the other code changes look good.
If we bump Scala versions which doesn't seem strictly required for this, we need to update the link-validator config.
Did you intend to enable Scala 3 compilation on the modules you fixed?
implicit val IntJsonFormat: json.DefaultJsonProtocol.IntJsonFormat.type = DefaultJsonProtocol.IntJsonFormat | ||
implicit val FloatJsonFormat: _root_.spray.json.DefaultJsonProtocol.FloatJsonFormat.type = | ||
DefaultJsonProtocol.FloatJsonFormat | ||
implicit val DoubleJsonFormat: _root_.spray.json.DefaultJsonProtocol.DoubleJsonFormat.type = | ||
DefaultJsonProtocol.DoubleJsonFormat | ||
implicit val ByteJsonFormat: _root_.spray.json.DefaultJsonProtocol.ByteJsonFormat.type = | ||
DefaultJsonProtocol.ByteJsonFormat | ||
implicit val ShortJsonFormat: _root_.spray.json.DefaultJsonProtocol.ShortJsonFormat.type = | ||
DefaultJsonProtocol.ShortJsonFormat | ||
implicit val BigDecimalJsonFormat: _root_.spray.json.DefaultJsonProtocol.BigDecimalJsonFormat.type = | ||
DefaultJsonProtocol.BigDecimalJsonFormat | ||
implicit val BigIntJsonFormat: _root_.spray.json.DefaultJsonProtocol.BigIntJsonFormat.type = | ||
DefaultJsonProtocol.BigIntJsonFormat | ||
implicit val UnitJsonFormat: _root_.spray.json.DefaultJsonProtocol.UnitJsonFormat.type = | ||
DefaultJsonProtocol.UnitJsonFormat | ||
implicit val BooleanJsonFormat: _root_.spray.json.DefaultJsonProtocol.BooleanJsonFormat.type = | ||
DefaultJsonProtocol.BooleanJsonFormat | ||
implicit val CharJsonFormat: _root_.spray.json.DefaultJsonProtocol.CharJsonFormat.type = | ||
DefaultJsonProtocol.CharJsonFormat | ||
implicit val StringJsonFormat: _root_.spray.json.DefaultJsonProtocol.StringJsonFormat.type = | ||
DefaultJsonProtocol.StringJsonFormat | ||
implicit val SymbolJsonFormat: _root_.spray.json.DefaultJsonProtocol.SymbolJsonFormat.type = | ||
DefaultJsonProtocol.SymbolJsonFormat |
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 could be better with the old import.
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.
yes planning to enable Scala 3 compilation for modules in next PR.
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.
It would make more sense to enable Scala 3 for these modules in this PR as it is the driving factor for this work.
project/Dependencies.scala
Outdated
val Scala3 = "3.2.2" | ||
val Scala213 = "2.13.11" // update even in link-validator.conf | ||
val Scala212 = "2.12.18" | ||
val Scala3 = "3.3.0" |
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 Scala 3 version is one of those that we should align across all Akka modules. We can make this change but should be aware of that it means that downstream, such as the Cassandra plugin, must also be updated before using this version of Alpakka. Created an issue akka/akka#32093
Update Deps
2f0e944
to
15c24e6
Compare
I rebased this PR as we merged Scala 3 support for AWS modules recently. |
Scalaunidoc is unhappy with the backticks.
But this did not change?! |
Now this conflates the purpose of this PR with updates due to the more exact checks in Scala 2.13.12. I guess that should be separate. I'll go back to Scala 2.13.10 for this PR. |
c599944
to
a8b3391
Compare
Bumping to Scala 2.13.12 will require good Scala 3 compatibility, we can merge this PR as another step towards it. |
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.
LGTM.
Thank you @Arikuti for getting this started. Let's continue to move more modules towards Scala 3 support. |
Update Deps
References #xxxx