twitter / util

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

build: Add Scala 3 to CI matrix #308

Open felixbr opened 1 year ago

felixbr commented 1 year ago

Several people have worked on Scala 3 support of various modules, which is great.

Scala 3 support currently isn't part of CI, which means it is only validated locally by the person currently working on it. This causes already working cross-builds to break by accident (e.g. when updating versions).

To avoid this and make working on Scala 3 more efficient I'm trying to setup at least basic CI for it.

Coverage is currently not really working with Scala 3.0.2, so I'm trying to ignore it for Scala 3 only.

codecov-commenter commented 1 year ago

Codecov Report

Merging #308 (5036ee7) into develop (936ceec) will increase coverage by 0.00%. The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #308   +/-   ##
========================================
  Coverage    49.11%   49.12%           
========================================
  Files          320      320           
  Lines        18459    18459           
  Branches      1074     1074           
========================================
+ Hits          9067     9068    +1     
+ Misses        9392     9391    -1     
Impacted Files Coverage Δ
...core/src/main/scala/com/twitter/util/Promise.scala 78.68% <0.00%> (-0.78%) :arrow_down:
util-core/src/main/scala/com/twitter/io/Buf.scala 93.09% <0.00%> (ø)
...ore/src/main/scala/com/twitter/util/Duration.scala 85.39% <0.00%> (+0.56%) :arrow_up:
...in/scala/com/twitter/logging/QueueingHandler.scala 100.00% <0.00%> (+6.25%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 936ceec...5036ee7. Read the comment docs.

felixbr commented 1 year ago

Ok, so apart from the usual flaky test in util-app everything seems to be working decently.

I've downgraded sbt-scoverage to 1.9.1 though, because develop is currently not green.

I'm rebasing this onto develop to make it ready for merging, even if it means the CI will be red on this PR in the meantime. 🙂

bryce-anderson commented 1 year ago

@felixbr, do you mind rebasing on master to get the scoverage fix pulled in and presumably turn the CI checks green?

felixbr commented 1 year ago

@bryce-anderson There you go.

The one failing test is the usual flaky one in util-app. I'd recommend setting its timeout much higher because it's really annoying that PRs are red all the time because of it.

It's waiting for an interrupt but CI is too slow so instead it throws a timeout:

[info] - App: exit functions properly capture mix of non-fatal and fatal exceptions *** FAILED ***
[info]   class com.twitter.util.TimeoutException did not equal class java.lang.InterruptedException (AppTest.scala:418)
felixbr commented 1 year ago

I rebased the PR onto develop.

felixbr commented 1 year ago

I rebased the PR onto develop.

The two failed runs are the usual flaky test in util-app (see #310)