Closed JoshKeegan closed 7 months ago
The issue was with the unit tests, the implementation is fine under .net 8. The BinaryFormatter
being used to test [Serializable]
exceptions is now disabled by default in .net 8 (previously marked as obsolete & gave build warnings which we had disabled with #pragma ...
. You can opt-in to enabling it, which we have done.
Long-term, serialisable exceptions might be dropped from xRetry. I don't know if anyone's using them in the wild, but removing them would be a breaking change. Leaving them in is (for now) just a matter of an extra property in the unit tests .csproj file. The long-term .net BinaryFormatter
obsoletion strategy is to remove the type entirely from .net 9, so we'll need to either remove the serialisable exceptions in a breaking release before then, or switch this test to only existing in the .Net Framework 4.8 build.
I bumped the .net version in tests to .net 8 on another branch (
dotnet8
) but CI fails.I don't have time at the moment to investigate, and it's probably just a CI problem, but there could also be a compatibility issue.