Skip to content

specs2 version cross compiled for Scala 2.12, 2.13 and 3.1

Compare
Choose a tag to compare
@etorreborre etorreborre released this 21 Mar 09:31
· 668 commits to main since this release

This version of specs2 provides an interim support for Scala 2.12, 2.13 and 3.1.

In order to be compatible with all Scala versions some features had to be removed (like macro-based features) and you might have to adapt your code. For example:

  • auto examples don't work anymore with immutable specifications
  • expectations must be expressed as value must matcher or value must not(matcher), and avoid expressions like a must not be something. This is in line with the new specs2 5.x version
  • type inference with some matchers (like beLike or contain) might require some type annotations
  • implicit resolution can have some slight differences in behaviour (and produce different failure messages for matchers for example)
  • specs2-mock has been removed (you need to use ScalaMock instead)
  • the around function (and corresponding trait) which is using the now deprecated DelayedInit feature is not working anymore

This version is provided as a best effort for bridging the gap between Scala 2 and Scala 3 but it is recommended that you switch to a specs2 5.x version (only available for Scala 3) if you can because this will be the actively maintained version.

Thanks for reporting any issue with this version, I will try to address it if it is blocking your migration process.