Closed zainab-ali closed 1 month ago
For the record : I've tried to play with different encodings to try and make assert
work, by changing the definition of the various test
methods to allow for it.
The issue is that weaver has been using overloads since forever to allow for various usecases semi-transparently. Overloads don't work well with polymorphism, leading the compiler to ask for more information from the user as it's unable to infer types as well as the current state.
So, although we could make it work by deleting the overloads before the next release, it'd lead to a level of inconvenience to existing users that I'm just not comfortable triggering.
Therefore, removal it is.
This PR resolves #67 by removing the
assert
call entirely.An attempt was made to make
assert
throw in #68 , however theassert
function didn't compose well. Existing users ofassert
would need to rewrite their code to useexpect
, or useassert
but with poorer syntax. For example:would need to be written as
Instead, we can remove
assert
entirely in favour ofexpect
. As a follow up, we can have a scalafix rule to help users migrate.