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

upgrade FsCheck.Xunit and FsCheck.NUnit to new major versions #690

Open
draptik opened this issue Dec 27, 2024 · 8 comments
Open

upgrade FsCheck.Xunit and FsCheck.NUnit to new major versions #690

draptik opened this issue Dec 27, 2024 · 8 comments

Comments

@draptik
Copy link

draptik commented Dec 27, 2024

Both Xunit and NUnit have had major releases which are not reflected in FsCheck.Xunit and FsCheck.NUnit.

  • Xunit: new major release v3
  • NUnit: new major release v4

The corresponding FsCheck implementations might be updatable?

Example:

image

@draptik draptik changed the title upgrade FsCheck.Xunit and FsCheck.NUnit to new major version upgrade FsCheck.Xunit and FsCheck.NUnit to new major versions Dec 27, 2024
@ploeh
Copy link
Member

ploeh commented Dec 29, 2024

Do the new versions of those two libraries include breaking changes? If they use semantic versioning, I'd expect them to, but haven't investigated.

If so, do the breaking changes affect FsCheck.Xunit or FsCheck.NUnit? If so, we need to investigate how to resolve such issues. If not, it's possible that we could relax the version restrictions to allow the new major versions...

To be clear, I don't have the time to do that at the moment.

@draptik
Copy link
Author

draptik commented Dec 31, 2024

I just wanted to inform...

I am just learning how to use this library.

This might not be an issue for other people...

@ploeh feel free to close this ticket

@tomachristian
Copy link

This is definitely holding us from upgrading to XUnit V3, which does have breaking changes. We tried recompiling FsCheck.XUnit ourselves targeting XUnit V3, but it does not compile as is.

@kurtschelfthout
Copy link
Member

I did NUnit, but xunit seems to have moved on to a different nuget package xunit.v3 so it's a bigger lift.

@ploeh
Copy link
Member

ploeh commented Jan 2, 2025

FWIW, in AutoFixture, we ran into a similar problem when xUnit.net revved from v1 to v2. There were breaking changes that we couldn't get around, so we left the original AutoFixture.Xunit on xUnit.net v1 and created a new AutoFixture.Xunit2 package for v2.

@tomachristian
Copy link

@ploeh Other libraries (Verify) did the same thing, they followed the (unfortunate?) convention that XUnit set.

@kurtschelfthout
Copy link
Member

Yes, it seems they left us no other choice. It does have the advantage it's easy to maintain both v2 and v3 in parallel.

@tomachristian
Copy link

For anyone else looking for a workaround:

What we did was to ditch the FsCheck.Xunit package temporarily, until FsCheck.XunitV3 (?) is released; then we:

  • Stripped out the [Property] attributes and replaced them with [Fact]
  • Return types of tests are now void
  • Then we .Check(Config.Default)d manually the Property.

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

4 participants