twitter / util

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

Update scalacheck to 1.15.4 #291

Closed felixbr closed 3 years ago

felixbr commented 3 years ago

Note: This is split out from the big WIP PR #290 and can be done separately as preparation for Scala 3.

Problem

Scala 3 requires Scalacheck 1.15.x but the build currently uses 1.14.x

Solution

Upgrading Scalacheck should be fairly simple as I've yet to see any binary compatibility issues between 1.14.x and 1.15.x. If we can use the newer version across all Scala versions it will simplify Scala 3 cross-building (otherwise we'd have to use different versions which can be finicky).

Result

The tests use Scalacheck 1.15.4. We still use scalatestplus scalacheck-1-14 because there is no 1-15 version available for Scalatest 3.1.x but in my experience there are no binary compatibility issues, so it's worth a try. Since this only affects tests the small risk of a crash is acceptable (and problems should be found in CI).

Cheers ~ Felix

codecov-commenter commented 3 years ago

Codecov Report

Merging #291 (c18949c) into develop (8e964d9) will increase coverage by 0.01%. The diff coverage is n/a.

:exclamation: Current head c18949c differs from pull request most recent head 30e13e5. Consider uploading reports for the commit 30e13e5 to get more accurate results Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #291      +/-   ##
===========================================
+ Coverage    51.78%   51.79%   +0.01%     
===========================================
  Files          311      311              
  Lines        16769    16769              
  Branches       985     1002      +17     
===========================================
+ Hits          8684     8686       +2     
+ Misses        8085     8083       -2     
Impacted Files Coverage Δ
...core/src/main/scala/com/twitter/util/Promise.scala 77.95% <0.00%> (-0.41%) :arrow_down:
util-core/src/main/scala/com/twitter/io/Buf.scala 93.27% <0.00%> (+0.17%) :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 8e964d9...30e13e5. Read the comment docs.

smarter commented 3 years ago

Upgrading Scalacheck should be fairly simple as I've yet to see any binary compatibility issues between 1.14.x and 1.15.x.

Scalacheck 1.14 and 1.15 are officially binary-compatible yes: https://github.com/typelevel/scalacheck/releases/tag/1.15.0

tigerlily-he commented 3 years ago

Hi @felixbr, Thank you for the PR. I'm currently working on testing the upgrade internally since Twitter works in a monorepo.

tigerlily-he commented 3 years ago

Thanks again for the PR. This was merged yesterday. I bumped the Scalacheck version for the other libraries as well.