-
Notifications
You must be signed in to change notification settings - Fork 408
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
Cross-build Scala 2.13.0 #522
Comments
I believe all of Finagle is properly cross built for 2.13 now. I think I should have some time to help out here. I've just opened 3 dependent PRs:
I can start taking a look at injectCore as well too, to help unblock other submodules. EDIT: |
Also of note: some core test library dependencies must have their versions bumped in order to make the entire repo eligible for cross-building to 2.13. It seems like this will be the biggest hurdle since I imagine that these versions must be updated on the internal monorepo version. However, until those versions are updated (see #527), it seems that none of the other cross-building changes will be able to be merged in. |
@chrisbenincasa Thanks a lot! We will soon get them reviewed! |
I'd be happy to take a shot at |
Note that we use |
@cacoco thanks for the update! |
I think Additionally, |
Updated accordingly, thanks! |
I'm starting to look at converting some of the heavier modules (where performance is likely a concern) and am bumping up against the concerns posed in twitter/finagle#818 . There is a lot of usages of ArrayBuffer and other mutable Seqs that have breaking changes in 2.13 and where the recommended solutions could have a performance impact. I'm wondering if any thought has gone into this internally |
@yufangong I'm hitting an unusual issue while attempting to convert https://gist.github.com/chrisbenincasa/ae5f6816d7c0394792c1607c1d208730 What's interesting is that javax.servlet is no longer a dependency on the project (I see it was removed over a year ago). |
I was able to track this down a bit more... it seems like there is a transitive dependency on javax.servlet-api from apache commons, which is used here: finatra/http/src/main/scala/com/twitter/finatra/http/fileupload/FinagleRequestFileUpload.scala Line 8 in 39fd964
This dep is marked as provided in apache commons-fileupload: https://github.com/apache/commons-fileupload/blob/commons-fileupload-1.4/pom.xml#L234-L239 I'm unclear on why this ends up throwing when compiling 2.13 only, however. |
@chrisbenincasa That's odd, I have no clue... I found a similar issue at sbt/sbt#2958, it might be worth trying the suggested workarounds/tests about coursier/clean-up jars and consider filing an sbt issue if it is reproduced consistently. |
@yufangong interestingly, bumping from 2.13.1 to 2.13.2 resolves the problem. Perhaps we should target that version? |
Thanks for bringing this up! At this point, 2.12 performance has a more significant impact, so I think compromising 2.13 perf is acceptable. Moving forward, we will evaluate the plausible solutions and any other proposed solution for both 2.12/2.13. There are a few benchmarks sitting in finatra/benchmarks for http/jackson/validation that could be leveraged. |
@chrisbenincasa RE: javax.servlet-api from apache commons being marked as provided in apache commons-fileupload: https://github.com/apache/commons-fileupload/blob/commons-fileupload-1.4/pom.xml#L234-L239. It is confusing why this would work at all with sby/ivy. We should likely declare the dependency explicitly in finatra/http for correctness. Provided is intended to signal that it is required to compile but that you need to bring this dependency (or a binary compatible version) yourself -- it was likely a mistake for us to remove the javax.servlet-api dependency in this case. |
@chrisbenincasa just a heads up since your name is next to "utils"–someone is looking at "utils" internally too, have you already tackled it? Might be good to hold off if you haven't started yet |
@chrisbenincasa ack, we'll work something out so that the two diffs don't collide. |
@mosesn sounds good. FWIW, the change there simply adds the cross version. Not sure if the internal changes are meant as rewrites to use features from 2.13, but there shouldn't be any overlap since I'm simply trying to get versions published for 2.13 for immediate use. |
Hey @chrisbenincasa I'm making the same change to |
Sounds good! |
Took a look through the Unblocked
Blocked
|
Thank you @sideshowcoder! You got it. |
Awesome! I started looking at Kafka, this may be another dependency issue. It seems the 2.4.0 release was the first to support Scala 2.13. Finatra is currently on 2.2.0. Do we have to wait for an internal repo version bump? |
It looks like some internal work started to upgrade kafka: 3c78c34, a skim of that I assume we will need to have scala 2.12/2.13 diverged in kafka projects, I will follow up internally and let you know. Thanks! |
|
Thanks @sideshowcoder! added it to the list at the top |
@yufangong I had a look and it looks like |
Nice! Thank you @sideshowcoder. Added to the items. |
@yufangong do you have an update on the internal work with Kafka? Wondering if the remaining modules listed above are ready to be converted or not. |
@chrisbenincasa Sorry! I haven't look into it. I'm planning to allocate sometime next week to evaluate the work. |
Hey @chrisbenincasa, I have some updates: The finatra/kafka targets are a bit complicated regards build, after talking with the supporting team we think currently the most efficient way is to fork the scala 2.13/2.12 on the finatra-kafka-stream projects. The directories are already split into kafka-2.2 and kafka-2.5 within the related packages. We should probably weigh in more opinions/suggestions before totally settle with this solution, in the meantime, feel free to poke around, first-hand experience will be great! |
If it was a blocker, Kafka is published for Scala 2.13 via |
Thanks to everyone for your help (especially @yufangong, @chrisbenincasa, and @sideshowcoder) we're now fully cross-building with Scala 2.13 as of 7deb115! ✅ The upcoming February release should be cross-published with Scala 2.13. |
Woohoo! |
2.13 artifacts now published with release |
AWESOME! 🎉 |
Scala 2.13 is released and finagle and twitter-server is close to finishing cross-building 2.13. It would be great to have finatra prepare for enabling cross-building 2.13, and @blueway first opened an issue to ask for 2.13 support. We want to do a similar fashion to twitter/finagle#771.
Library dependencies: Twitter-Server, Finagle
Subprojects: They are ordered by dependency depth, the first layer (httpAnnotations and injectSlf4j) should have the least dependencies. Note each subproject may have a TestJarSources with them that can be upgraded at the same time (for example: httpclient and httpclientTestJarSources.
If you start working on one of these subprojects, please add a comment on this thread and I'll add your name next to it so people know not to duplicate your work.
finatraExamples (@yufangong)
The text was updated successfully, but these errors were encountered: