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

Update Scala to version 2.12.15 #3621

Merged
merged 8 commits into from Mar 13, 2022
Merged

Conversation

tgrospic
Copy link
Collaborator

@tgrospic tgrospic commented Mar 7, 2022

Overview

This PR is another update for Scala as preparation for Scala 2.13 and finally to Scala 3.

Please make sure that this PR:

Bors cheat-sheet:

  • bors r+ runs integration tests and merges the PR (if it's approved),
  • bors try runs integration tests for the PR,
  • bors delegate+ enables non-maintainer PR authors to run the above.

@tgrospic tgrospic marked this pull request as ready for review March 9, 2022 07:56
@tgrospic tgrospic added this to In progress in Core team via automation Mar 9, 2022
@tgrospic tgrospic moved this from In progress to Review in progress in Core team Mar 9, 2022
@@ -25,21 +25,21 @@ object ListenAtName {

private def buildPar[G[_]: BuildPar](name: G[Name]) = implicitly[BuildPar[G]].build(name)

implicit def buildParF[F[_]: MonadError[?[_], Throwable]] = new BuildPar[λ[A => F[Id[A]]]] {
implicit def buildParF[F[_]: MonadError[*[_], Throwable]] = new BuildPar[λ[A => F[Id[A]]]] {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the difference between ? and *?

I thought that it doesn't care which charactor it used.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess, here is the answer. But it is not clear for me. Look like _ replaces with ?, ? replaces with * for a while, * replaces back to _ again according to the article. What is the reason?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think Scala folks just want to make thing more interesting. 😃

I think the main reason is to support partial application of type level functions.

F[_, B](A)  =>  F[A, B]
F[A, _](B)  =>  F[A, B]

Copy link
Collaborator

@zsluedem zsluedem left a comment

Choose a reason for hiding this comment

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

LGTM. Left some questions.

Just curious. Maybe it would also make sense to upgrade to 2.13? I think someone tries to do that before but failed.

)

private val kindProjector = compilerPlugin("org.typelevel" %% "kind-projector" % "0.10.3")
private val kindProjector = compilerPlugin(
"org.typelevel" %% "kind-projector" % "0.13.2" cross CrossVersion.full
Copy link
Collaborator

Choose a reason for hiding this comment

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

What does cross CrossVersion.full means? It is not clear for me from sbt documentation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sbt will use this information to correctly download (create download urls) artifacts from maven repository.

@@ -25,21 +25,21 @@ object ListenAtName {

private def buildPar[G[_]: BuildPar](name: G[Name]) = implicitly[BuildPar[G]].build(name)

implicit def buildParF[F[_]: MonadError[?[_], Throwable]] = new BuildPar[λ[A => F[Id[A]]]] {
implicit def buildParF[F[_]: MonadError[*[_], Throwable]] = new BuildPar[λ[A => F[Id[A]]]] {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess, here is the answer. But it is not clear for me. Look like _ replaces with ?, ? replaces with * for a while, * replaces back to _ again according to the article. What is the reason?

@@ -8,6 +8,7 @@ object Dependencies {
val catsEffectVersion = "2.5.4"
val catsMtlVersion = "0.7.1"
val fs2Version = "2.5.10"
val monixVersion = "3.4.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the reason to extract monixVersion? It is used only in one place.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just to make it more explicit as it's important library for us and version is related to cats effect version.

@@ -11,7 +11,10 @@ object ParMapTypeMapper {

private[models] def parMapToEMap(parMap: ParMap): EMap =
EMap(
parMap.ps.sortedList.map(t => zip(t._1, t._2)),
// Convert to Vector because with Scala 0.12.5 deserialized empty List (Nil)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you mean 2.12.5? It is similar to RNode version 🙂

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks! Yes, I meant Scala version 2.12.15. 😂

@tgrospic
Copy link
Collaborator Author

LGTM. Left some questions.

Just curious. Maybe it would also make sense to upgrade to 2.13? I think someone tries to do that before but failed.

@zsluedem Yes, multiple times. :) This tgrospic#20 is my last attempt and I think I'm much closer now.

Copy link
Collaborator

@stanislavlyalin stanislavlyalin left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@tgrospic
Copy link
Collaborator Author

bors merge

@bors
Copy link
Contributor

bors bot commented Mar 13, 2022

Build succeeded:

@bors bors bot merged commit e73a5cb into rchain:dev Mar 13, 2022
Core team automation moved this from Review in progress to Done Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants