twitter / util

Wonderful reusable code from Twitter
https://twitter.github.io/util
Apache License 2.0
2.68k stars 580 forks source link

support scala 3 build for util-tunable #305

Open felixbr opened 2 years ago

felixbr commented 2 years ago

This PR builds on #304 so that should be merged before this one imo.

With the new Jackson version supporting Scala 3 directly, util-tunable was just a config change.

I'm not sure why scala-collection-compat_3 was excluded from the Scala 3 settings. It was probably an attempt to solve the "conflicting version suffix" error from sbt. I moved it to the Scala 2 settings but I can also remove it if you prefer.

felixbr commented 1 year ago

CI failed because sbt-scoverage was updated to 2.0.0 here.

Once develop is green again, I can rebase this PR once more, which should fix it.

felixbr commented 1 year ago

I've rebased this onto develop.

I've also had to change the Scala 3 version form 3.0.2 to 3.2.2 because util-tunable depends on util-jackson, which is not yet ported for Scala 3 natively. util-jackson in turn depends on jackson-module-scala which was compiled with Scala 3.2.x already, so we either have to port util-jackson to support Scala 3 natively (which currently is blocked on json4s) or we have to also use Scala 3.2.x.

Given that we currently don't have CI-checks for Scala 3 (see #310 for that) and it's still somewhat of a moving target, I'd rather just go for the up-to-date Scala 3 version, which we want anyway in the long run.

edit: I should add that I ran ++3.2.2 Test/compile in util to make sure I didn't break any other modules which were already ported to Scala 3.