Releases: etorreborre/specs2
Please skip 5.1.0 and 4.18.0
Those 2 versions have been released by mistake. The PR which led to their creation has now been reverted. See #1116
4.x release with a dependency on scala-xml-2.0
Thanks to @mkurz for doing that upgrade!
Maintenance release
Cross versions - new strategy
This release changes a bit the strategy for using specs2 versions across Scala versions (from what is described here).
There is now:
-
a full version of specs2, 4.15.0, for Scala2 (2.12 and 2.13) with all the usual features, developed from the
specs2-4.x-maintenance
branch -
a version of specs2, 4.15.0, for Scala3 based on limited features (read about the limitations here) but mostly compatible with the specs2 source code used with Scala 2. That version comes from the
specs2-cross
branch. -
a full version of specs2, 5.0.0, for Scala3 (developed on the
main
branch). That version is not backward compatible with other 4.x versions
The idea is that:
-
if you want to stay on Scala2 with no intent yet of migrating to Scala3, you can use a version >= 4.15 && < 5
-
if you want to cross-compile for Scala2 and Scala3, you can use a version >= 4.15 && < 5, but you might have to do some small changes to your source code (or have less features like auto-examples)
-
if you want to only use Scala 3 you can use versions >= 5
This is a delicate setup but I hope it will help you migrate gradually to Scala 3. Please don't hesitate to ask questions if you have any issue migrating your code.
Note: you can ignore the 4.13.1-cross
artefact
specs2 version cross compiled for Scala 2.12, 2.13 and 3.1
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
orvalue must not(matcher)
, and avoid expressions likea must not be something
. This is in line with the new specs2 5.x version - type inference with some matchers (like
beLike
orcontain
) 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 deprecatedDelayedInit
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.
Maintenance release
Fixed the indentation in the user guide
This was broken because of scalafmt
Maintenance release
- Made
ExecutionEnv
consistent across JVM and JS (thanks to @armanbilge) - put more modules under JS compilation
Fixes a regression with PendingUntilFixed (see #987)
SPECS2-4.12.12 set tag
Added back the Before/After All traits
for better backward compatibility