util
util copied to clipboard
support scala 3 build for util-test
This PR builds on https://github.com/twitter/util/pull/304 so that should be merged before this one imo.
There is no Scala 3 compatible version for "org.scalatestplus" %% "mockito-1-10", so I had to use "org.scalatestplus" %% "mockito-3-4" % "3.2.9.0". This means I upgraded Scalatest to 3.2.9 and Mockito to 3.4.x. This doesn't really break any code in util-test but consumers of util-test (e.g. finagle or twitter-server) might also have to upgrade those test dependencies.
Since Scala 3 requires Scalatest 3.2.x and Mockito 1.10.x is ancient at this point, I find this acceptable.
The second point is that I couldn't find a direct replacement for org.mockito.exceptions.Reporter from Mockito 1.10.x. Since it was only used to throw a predefined exception, I inlined the error message. I hope this is acceptable.
Codecov Report
Merging #306 (fa80c54) into develop (9f15cce) will increase coverage by
0.01%. The diff coverage is0.00%.
@@ Coverage Diff @@
## develop #306 +/- ##
===========================================
+ Coverage 49.29% 49.30% +0.01%
===========================================
Files 322 322
Lines 18523 18522 -1
Branches 1055 1063 +8
===========================================
+ Hits 9131 9133 +2
+ Misses 9392 9389 -3
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...ala/com/twitter/util/testing/ArgumentCapture.scala | 5.91% <0.00%> (+<0.01%) |
:arrow_up: |
| util-core/src/main/scala/com/twitter/io/Buf.scala | 93.27% <0.00%> (ø) |
|
| ...core/src/main/scala/com/twitter/util/Promise.scala | 79.84% <0.00%> (+0.38%) |
:arrow_up: |
| ...ore/src/main/scala/com/twitter/util/Duration.scala | 85.39% <0.00%> (+0.56%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 9f15cce...fa80c54. Read the comment docs.
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.
CI failed because sbt-scoverage was updated to 2.0.0 here.
Once
developis green again, I can rebase this PR once more, which should fix it.
I created https://github.com/twitter/util/pull/309
[Edit] and I only just spotted https://github.com/twitter/util/pull/307
@pjfanning, the scoverage thing should be fixed now.
I've rebased this onto develop.