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

support scala 3 build for util-test #306

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

felixbr
Copy link
Contributor

@felixbr felixbr commented Jun 30, 2022

This PR builds on #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-commenter
Copy link

codecov-commenter commented Jun 30, 2022

Codecov Report

Merging #306 (fa80c54) into develop (9f15cce) will increase coverage by 0.01%.
The diff coverage is 0.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%) ⬆️
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%) ⬆️
...ore/src/main/scala/com/twitter/util/Duration.scala 85.39% <0.00%> (+0.56%) ⬆️

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 9f15cce...fa80c54. Read the comment docs.

@felixbr felixbr marked this pull request as ready for review June 30, 2022 22:47
@felixbr felixbr mentioned this pull request Jul 15, 2022
build.sbt Outdated

val defaultScalaSettings = Seq(
scalaVersion := _scalaVersion,
crossScalaVersions := _crossScalaVersions
)
val defaultScala3EnabledSettings = Seq(
scalaVersion := _scalaVersion,
crossScalaVersions := _crossScalaVersions ++ Seq("3.0.2-RC1")
crossScalaVersions := _crossScalaVersions ++ Seq("3.1.3")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@felixbr could you revert the Scala 3.1.3 change? Similar to discussion in #304

@felixbr
Copy link
Contributor Author

felixbr commented Jul 28, 2022

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.

@pjfanning
Copy link
Contributor

pjfanning commented Jul 28, 2022

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.

I created #309

[Edit] and I only just spotted #307

@bryce-anderson
Copy link
Contributor

@pjfanning, the scoverage thing should be fixed now.

@felixbr
Copy link
Contributor Author

felixbr commented May 18, 2023

I've rebased this onto develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants