etorreborre/specs2

`Around` not working in specs 4 Scala 3

mkurz opened this issue · 3 comments

mkurz commented

Around makes use of DelayedInit:

But that does not work anymore in Scala 3: https://docs.scala-lang.org/scala3/reference/dropped-features/delayed-init.html

Code still compiles, even tests may pass, but the around method will not be executed anymore, which means custom init code or cleanup code won't run. For example I had code that "stopped" an application, but then I couldn't run other tests because not all resources of the app were cleaned up. In Scala 2 everything still works.

I think that should be mentioned in: https://github.com/etorreborre/specs2/releases/tag/SPECS2-4.13.1-cross

Thanks, I updated the release notes. Out of curiosity do you have the possibility to switch to Scala3 only?

mkurz commented

Out of curiosity do you have the possibility to switch to Scala3 only?

We are not going to publish Scala 3 artifacts only soon. We will cross publish to 2.13 for quite a while. We could publish different artifacts for _2.13 and _3 but defenetily not for our next major release.