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

release for scala 2.13.0-M5? #25105

Closed
pjfanning opened this issue May 15, 2018 · 30 comments
Closed

release for scala 2.13.0-M5? #25105

pjfanning opened this issue May 15, 2018 · 30 comments
Assignees
Labels
1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted t:scala-2.13
Milestone

Comments

@pjfanning
Copy link
Contributor

pjfanning commented May 15, 2018

https://www.scala-lang.org/download/2.13.0-M4.html - has been released

Relates to #24507
Depends on scalatest/scalatest#1367: 3.0.6-SNAP1 should work

@raboof
Copy link
Member

raboof commented May 24, 2018

@raboof raboof added the 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted label May 24, 2018
@xuwei-k
Copy link
Contributor

xuwei-k commented Jun 25, 2018

@schmitch
Copy link
Contributor

ssl-config has a 2.13.0-M4 release http://central.maven.org/maven2/com/typesafe/ssl-config-core_2.13.0-M4/0.2.4/.

@MasseGuillaume
Copy link
Contributor

@raboof Is there anyone on the Akka team working on this? If not, I would like to do it. It would be a good occasion to battle test https://github.com/scala/scala-collection-compat and it's migration rules.

@xuwei-k
Copy link
Contributor

xuwei-k commented Jul 2, 2018

Is there anyone on the Akka team working on this?

#25267

@raboof
Copy link
Member

raboof commented Jul 2, 2018

@MasseGuillaume as @xuwei-k linked we've started exploring a bit, but your help would be greatly appreciated!

@SethTisue
Copy link
Contributor

checking in, anything we should be discussing here...?

@ktoso
Copy link
Member

ktoso commented Aug 2, 2018

I'll check out status and report back

@ktoso
Copy link
Member

ktoso commented Aug 2, 2018

Okey so the PRs above are in progress and we need to continue the work here.
I'm leaving this to @raboof to continue once he's back from vacation next week :)

@ktoso ktoso added this to the 2.5.x milestone Aug 2, 2018
@MasseGuillaume
Copy link
Contributor

MasseGuillaume commented Aug 2, 2018

@ktoso I'm currently working on this. Not as fast as I could since we use this to validate our scala/scala-collection-compat project and increase the quality of our automatic migration rules. This is what I got out of this so far:

  • Rewrite breakOut
  • Rewrite col.to and col.to[CC] => col.to(CC)
  • Rewrite Future.{onSuccess, OnFailure} => Future.onComplete
  • Rewrite JavaConversion
  • Rewrite from,to,until => range{From,To,Until}
  • Rewrite domino foldRight and foldLeft patterns (/: and :\)
  • Rewrite Traversable* to Iterable*

The only manual par remaining would be:

  • Decide if a collection.Seq should be immutable or mutable. (Akka normally marks immutable.Seq)
  • Custom collections (such as ByteString)

You can track my progress here: https://github.com/MasseGuillaume/akka/commits/2.13.0-M4

Unless you are blocked by this, I would say leave me at least 2 weeks, then I would definitively need your help for PR review, making unit tests pass.

@SethTisue
Copy link
Contributor

I'm curious how close Guillaume's efforts got to something releasable. does the Akka team expect to be able to publish for M5 fairly soon after all your dependencies publish...?

@dwijnand
Copy link
Member

Btw, I suggest https://github.com/SethTisue/akka/tree/community-build-2.13 as the branch to integrate.

@patriknw patriknw changed the title release for scala 2.13.0-M4? release for scala 2.13.0-M5? Oct 11, 2018
@patriknw
Copy link
Member

we can do another push next week

@pjfanning
Copy link
Contributor Author

https://github.com/scala/scala-collection-compat have released a migration tool based on scalafix. This might be helpful. I tried it with the Slick codebase and it seems to do a pretty good job (but there is a reasonable amount of extra work needed after the run).

@raboof
Copy link
Member

raboof commented Oct 30, 2018

Yes, we are using this as well - but thanks for the pointer. It is indeed incredibly helpful, but as you mention there is still quite some extra work to be done, especially since we want to maintain binary incompatibility, and in some cases the migration tool will violate that.

@pjfanning
Copy link
Contributor Author

@raboof I suspect that it won't be possible to be binary compatible and that you will need to do the changes on an akka 2.6 code line.

@raboof
Copy link
Member

raboof commented Oct 30, 2018

@pjfanning that would be quite disappointing. Can you give an example of a construct that you suspect cannot be handled in a binary compatible way?

@SethTisue
Copy link
Contributor

SethTisue commented Oct 30, 2018

dozens of libraries have now published for M4 and/or M5 and I don't think any have yet needed to break bincompat to do it. perhaps there are counterexamples, but it isn't the norm.

Akka is big and could well be an exception, but it's worth being optimistic about.

I wonder if MiMa still passes on 2.11.x/2.12.x when @MasseGuillaume's patches are applied.

@raboof
Copy link
Member

raboof commented Oct 30, 2018

(I plan to look into this more later this week, and indeed am so far optimistic, though it'll be some work to get it to 100%)

@pjfanning
Copy link
Contributor Author

https://github.com/slick/slick/pull/1966/files - this is an example from applying the migration to Slick code base. Note that Traversable is replaced with Iterable, TraversableOnce is replaced with IterableOnce and that CanBuildFrom is replaced by Factory. It also introduces a dependency on the scala-collection-compat library.

@SethTisue
Copy link
Contributor

SethTisue commented Oct 30, 2018

thanks for the list. the libraries I've seen pull this off have used workarounds rather than make the changes you list. these workarounds typically involve using small amounts of Scala-version-specific source code.

@raboof
Copy link
Member

raboof commented Oct 30, 2018

@pjfanning since Traversable is still available on 2.13 (albeit deprecated), perhaps we could just switch those changes back when they happen in the API. If that is not possible, perhaps we can use the technique from https://github.com/scala/scala-collection-compat/blob/master/compat/src/main/scala-2.11_2.12/scala/collection/compat/PackageShared.scala#L151?

I'm not sure CanBuildFrom/Factory is used in the API in many cases, but the fact that on 2.11/2.12 Factory actually is a CanBuildFrom on 2.11 might help (https://github.com/scala/scala-collection-compat/blob/master/compat/src/main/scala-2.11_2.12/scala/collection/compat/PackageShared.scala#L19)

Adding the dependency on scala-collection-compat should not be a problem (as soon as the time is right to start promising binary compatibility for that library itself, of course)

@SethTisue
Copy link
Contributor

SethTisue commented Oct 30, 2018

Adding the dependency on scala-collection-compat should not be a problem

you might consider avoiding it if possible, though, since as we all know, mo dependencies mo problems, especially downstream. most library maintainers so far are choosing not to use it. (though again, Akka is the largest and complex migration that has been attempted yet, different considerations may apply.)

@raboof
Copy link
Member

raboof commented Oct 30, 2018

@SethTisue that's interesting - I would love to avoid it but got the impression that a big reason for the library to exist in the first place would be to allow cross-building code that uses CanBuildFrom on 2.12. Of course an alternative might be to duplicate such code and provide different implementations for 2.12 and 2.13, but that seems like a ton of work that the library was designed to alleviate.

@jrudolph
Copy link
Member

Could it make sense for Akka to copy only parts from the compat library somewhere into our codebase (if it's mostly about avoiding dependencies)?

@SethTisue
Copy link
Contributor

SethTisue commented Oct 30, 2018

Of course an alternative might be to duplicate such code and provide different implementations for 2.12 and 2.13, but that seems like a ton of work

for at least some particular libraries it really hasn't been that bad, see e.g. @ashawley's:

this is an example of what I said above about "small amounts of Scala-version-specific source code"

Could it make sense for Akka to copy only parts from the compat library somewhere into our codebase (if it's mostly about avoiding dependencies)?

perhaps, yes. copy and paste can be better if the code involved isn't too long or involved.

@SethTisue
Copy link
Contributor

@szeiger and @julienrf may have perspectives on this

@SethTisue
Copy link
Contributor

should this be closed as per https://contributors.scala-lang.org/t/2-13-0-m5-release-train/2125/39 ?

@dwijnand
Copy link
Member

I think while:

  • scala 2.13.0-M5 support #26043 is still unmerged (the publishings were off of that, also it needs a rebase), and
  • not all modules of Akka were published afaik

maybe we should, calling this "effectively done" and create follow-up tickets for the follow-up work, that interest parties can subscribe to if interested. For instance, I'd be interested in tracking when 2.13 support is entirely merged into the master build/CI and by default a part of Akka releases, rather than in opt-in/"someone do it" state.

@dwijnand
Copy link
Member

Well, #26043 is merged now.

@raboof WDYT about closing this and opening another issue detailing any and all follow-up work?

@raboof raboof modified the milestones: 2.5.x, 2.5.20 Jan 22, 2019
@raboof raboof closed this as completed Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted t:scala-2.13
Projects
None yet
Development

No branches or pull requests

10 participants