Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MatchException does not exist anymore in 2.5.0 #251

Closed
abelbraaksma opened this issue Oct 28, 2023 · 4 comments
Closed

MatchException does not exist anymore in 2.5.0 #251

abelbraaksma opened this issue Oct 28, 2023 · 4 comments

Comments

@abelbraaksma
Copy link
Member

Description

Basically, binary incompatibility. MatchException, a public type, was removed from the surface area. See #240.

Repro steps

Any code that used MatchException for their own extensions:

image

Expected behavior

  • Either the MatchException got a deprecation message prior to removing it
  • Or the MatchException would be mentioned in a wiki or readme or release notes, plus how to replace it with a new type
  • Or the MatchException remained in place, even if it is just a placeholder type

Actual behavior

The type is gone.

Known workarounds

None yet. But I'll research. Probably there's a "new way to do things", which is primarily why I report this, so that others can find it too.

Related information

Version 2.5.0. Older releases did not have this problem. It was introduced after updating the similarly (and notoriously so, they do this all the time) backward-incompatible changes of xUnit, which they did on a minor release (2.4 -. 2.5). Not a critique on this library, though!

abelbraaksma added a commit to fsprojects/FSharp.Control.TaskSeq that referenced this issue Oct 28, 2023
…hedValues`, thanks XUnit for making incompatible changes without first deprecating types

See fsprojects/FsUnit#240 for the FsUnit change (2nd commit) and fsprojects/FsUnit#251, and https://xunit.net/releases/v2/2.5.0
abelbraaksma added a commit to fsprojects/FSharp.Control.TaskSeq that referenced this issue Oct 28, 2023
…hedValues`, thanks XUnit for making incompatible changes without first deprecating types

See fsprojects/FsUnit#240 for the FsUnit change (2nd commit) and fsprojects/FsUnit#251, and https://xunit.net/releases/v2/2.5.0
abelbraaksma added a commit to fsprojects/FSharp.Control.TaskSeq that referenced this issue Oct 28, 2023
…hedValues`, thanks XUnit for making incompatible changes without first deprecating types

See fsprojects/FsUnit#240 for the FsUnit change (2nd commit) and fsprojects/FsUnit#251, and https://xunit.net/releases/v2/2.5.0
@CaptnCodr
Copy link
Member

Hi @abelbraaksma,
I asked after this change has been done in the xunit repository: xunit/xunit#2744

Some users (including me) are concerned about that change in a minor version.

There are several exception types for different use-cases.
The MatchException is completely gone.
I think there are no wiki/readme mentions about how to upgrade to xunit 2.5+.

But I think as you already changed the code in FSharp.Control.TaskSeq is the right way as it thought.

@CaptnCodr
Copy link
Member

Hey @abelbraaksma,
is this cleared up? Do you want to add some more here? 🙂

@CaptnCodr CaptnCodr closed this as not planned Won't fix, can't repro, duplicate, stale Nov 10, 2023
@abelbraaksma
Copy link
Member Author

abelbraaksma commented Jul 24, 2024

Apologies for missing your updates, @CaptnCodr. I got distracted and forgot ;).

Just today I find myself upgrading several large projects of a customer, and searching again for the missing MatchException after upgrade. This time, it is a widely used xUnit extension in a package used throughout the company.

This makes updating it that much harder, if not impossible, as at least for some time we will need to support both the old and the new version of xUnit. My creative solution now is to use contentFiles with two versions of the source files of the extensions, and updated the dependencies depending on their xUnit version (using PrivateAssets and IncludeAssets to get the proper file, if that's gonna work).

Backward incompatibility is tough to deal with (not saying you shouldn't move forward, but yes, as you mentioned, never do that on a minor version).

Anyway, thanks for getting back to me at the time. No need to reopen.

@abelbraaksma
Copy link
Member Author

My creative solution now is to use contentFiles with two versions of the source files of the extensions, and updated the dependencies depending on their xUnit version (using PrivateAssets and IncludeAssets to get the proper file, if that's gonna work).

follow up: a terrible idea. Not in principle, but because it requires manual changes in the fsproj or csproj after you lib is added. The contentFiles approach itself is fine for source inclusion, but not with multiple versions of the same file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants