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
Milestone

Comments

@pjfanning
Copy link

@pjfanning 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

This comment has been minimized.

Copy link
Member

@raboof raboof commented May 24, 2018

@raboof raboof added the 1 - triaged label May 24, 2018
@xuwei-k xuwei-k mentioned this issue May 29, 2018
7 of 7 tasks complete
@xuwei-k

This comment has been minimized.

Copy link
Contributor

@xuwei-k xuwei-k commented Jun 25, 2018

@schmitch

This comment has been minimized.

Copy link
Contributor

@schmitch schmitch commented Jun 29, 2018

@MasseGuillaume

This comment has been minimized.

Copy link
Contributor

@MasseGuillaume MasseGuillaume commented Jul 2, 2018

@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

This comment has been minimized.

Copy link
Contributor

@xuwei-k xuwei-k commented Jul 2, 2018

Is there anyone on the Akka team working on this?

#25267

@raboof

This comment has been minimized.

Copy link
Member

@raboof raboof commented Jul 2, 2018

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

@SethTisue

This comment has been minimized.

Copy link
Contributor

@SethTisue SethTisue commented Aug 2, 2018

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

@ktoso

This comment has been minimized.

Copy link
Member

@ktoso ktoso commented Aug 2, 2018

I'll check out status and report back

@ktoso

This comment has been minimized.

Copy link
Member

@ktoso 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

This comment has been minimized.

Copy link
Contributor

@MasseGuillaume 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.

@dwijnand dwijnand mentioned this issue Aug 22, 2018
1 of 1 task complete
@raboof raboof mentioned this issue Aug 22, 2018
6 of 6 tasks complete
@dwijnand dwijnand mentioned this issue Aug 23, 2018
1 of 1 task complete
@SethTisue

This comment has been minimized.

Copy link
Contributor

@SethTisue SethTisue commented Oct 10, 2018

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

This comment has been minimized.

Copy link
Member

@dwijnand dwijnand commented Oct 10, 2018

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

This comment has been minimized.

Copy link
Member

@patriknw patriknw commented Oct 11, 2018

we can do another push next week

@pjfanning

This comment has been minimized.

Copy link
Author

@pjfanning pjfanning commented Oct 30, 2018

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

This comment has been minimized.

Copy link
Member

@raboof 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

This comment has been minimized.

Copy link
Author

@pjfanning pjfanning commented Oct 30, 2018

@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

This comment has been minimized.

Copy link
Member

@raboof 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

This comment has been minimized.

Copy link
Contributor

@SethTisue 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

This comment has been minimized.

Copy link
Member

@raboof 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

This comment has been minimized.

Copy link
Author

@pjfanning pjfanning commented Oct 30, 2018

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

This comment has been minimized.

Copy link
Contributor

@SethTisue 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

This comment has been minimized.

Copy link
Member

@raboof 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

This comment has been minimized.

Copy link
Contributor

@SethTisue 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

This comment has been minimized.

Copy link
Member

@raboof 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

This comment has been minimized.

Copy link
Member

@jrudolph jrudolph commented Oct 30, 2018

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

This comment has been minimized.

Copy link
Contributor

@SethTisue 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

This comment has been minimized.

Copy link
Contributor

@SethTisue SethTisue commented Oct 30, 2018

@szeiger and @julienrf may have perspectives on this

@SethTisue

This comment has been minimized.

Copy link
Contributor

@SethTisue SethTisue commented Dec 23, 2018

@dwijnand

This comment has been minimized.

Copy link
Member

@dwijnand dwijnand commented Dec 23, 2018

I think while:

  • #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

This comment has been minimized.

Copy link
Member

@dwijnand dwijnand commented Jan 17, 2019

Well, #26043 is merged now.

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

@raboof raboof added the t:scala-2.13 label Jan 22, 2019
@raboof raboof modified the milestones: 2.5.x, 2.5.20 Jan 22, 2019
@raboof raboof closed this Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.