Skip to content

Conversation

@abelbraaksma
Copy link
Contributor

@abelbraaksma abelbraaksma commented Aug 14, 2022

Fixes #13686.
Unblocks: #13558
Related to: #13557 (part of the cause of that mess)

As explained in that issue, on certain platforms (in this case Windows), the very old (2018!) version of FsCheck, which is an alpha release (3.0.0-alpha4 to be exact) can raise InvalidCastException on invocation of the Check.QuickThrowOnFailure methods.

This aims to solve that.

EDIT 2: going for 2.16.5, see discussion below, it was added to the available MS packages.

Ready for review.

Overview of versions that exhibit InvalidCastException:

Version Release Used by FSharp Throws on QuickThrowOnFailure
3.0.0-beta2 2022-01 Probably not*
3.0.0-beta1 2021-09 Probably not*
3.0.0-alpha5 2020-12 No
3.0.0-alpha4 2018-06 YES YES
3.0.0-alpha3 2017-12 YES
3.0.0-alpha2 2017-10 No
3.0.0-alpha1 2017-09 No
2.16.5 2022-06 No**

* Not available in MS's nuget feed, not known whether it exhibits this issue, probably not
** Not available in MS's nuget feed, but I've locally checked that it solves the problem

@abelbraaksma
Copy link
Contributor Author

Odd, as this wasn't an issue locally, which used the same nuget.config:

FSharp.Core.UnitTests.fsproj : error NU1103: Unable to find a stable package FsCheck with version (>= 2.16.5) [/Users/runner/work/1/s/FSharp.sln]
FSharp.Core.UnitTests.fsproj : error NU1103:   - Found 78 version(s) in dotnet-public [ Nearest version: 3.0.0-alpha1 ] [/Users/runner/work/1/s/FSharp.sln]

Let's try the latest alpha then.

@abelbraaksma abelbraaksma changed the title Fix #13686 by downgrading the FsCheck version Fix #13686 by upgrading the FsCheck version to next alpha version (stable version is not available on dotnet-public) Aug 14, 2022
@KevinRansom
Copy link
Contributor

@abelbraaksma , if you let us know what version to prop to our nuget feed, we will ensure it gets added.

thanks

KEvin

@abelbraaksma
Copy link
Contributor Author

abelbraaksma commented Aug 14, 2022

@KevinRansom, thanks! From the referred issue #13686, that would be stable FsCheck 2.16.5, and from the 3.x branch, that would be 3.0.0-beta2. Ideally, the alpha versions, except alpha5, should be removed, they are buggy.

I tested locally with the stable branch, I think that, if we can, we should use that, and no alpha or beta branches.

@abelbraaksma
Copy link
Contributor Author

abelbraaksma commented Aug 14, 2022

This is ready for review, unless the nuget feed gets updated such that I can pick up a newer version (not sure how long that normally takes, ie, is there some formal process or not?), in which case we could use the latest version instead.

@abelbraaksma
Copy link
Contributor Author

abelbraaksma commented Aug 15, 2022

@KevinRansom and/or @vzarytovskii I'm not sure about what's needed to change the MS nuget feed, please advice. Otherwise, the current PR solves the problems with running these tests on Windows machines.

It would be nice to get unblocked on other PRs ;).

@vzarytovskii
Copy link
Member

2.6.15 should be in dotnet-public

@abelbraaksma
Copy link
Contributor Author

@vzarytovskii, see #13687 (comment). It isn't picked up. Re-quoting the error:

FSharp.Core.UnitTests.fsproj : error NU1103: Unable to find a stable package FsCheck with version (>= 2.16.5) [/Users/runner/work/1/s/FSharp.sln]
FSharp.Core.UnitTests.fsproj : error NU1103:   - Found 78 version(s) in dotnet-public [ Nearest version: 3.0.0-alpha1 ] [/Users/runner/work/1/s/FSharp.sln]

@vzarytovskii
Copy link
Member

@vzarytovskii Vlad Zarytovskii FTE, see #13687 (comment). It isn't picked up. Re-quoting the error:

FSharp.Core.UnitTests.fsproj : error NU1103: Unable to find a stable package FsCheck with version (>= 2.16.5) [/Users/runner/work/1/s/FSharp.sln]
FSharp.Core.UnitTests.fsproj : error NU1103:   - Found 78 version(s) in dotnet-public [ Nearest version: 3.0.0-alpha1 ] [/Users/runner/work/1/s/FSharp.sln]

I can see it in the feed:
https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-public/NuGet/FsCheck/overview/2.16.5

@abelbraaksma
Copy link
Contributor Author

abelbraaksma commented Aug 16, 2022

@vzarytovskii localky that works, but CI fails. See this commit, it was my first try, I don’t know how to solve that: 8d0df9a

If you know how to make CI happy, I’d love to use that version.

@vzarytovskii
Copy link
Member

@vzarytovskii localky that works, but CI fails. See this commit, it was my first try, I don’t know how to solve that: 8d0df9a

If you know how to make CI happy, I’d love to use that version.

But this commit was 3 days ago. The package was only added today morning.

Sorry for the confusion in the original message.

@abelbraaksma
Copy link
Contributor Author

@vzarytovskii thanks, I wasn't aware, indeed. Trying with stable 2.16.5 now.

@abelbraaksma
Copy link
Contributor Author

@vzarytovskii, or @dsyme this very small PR is ready, can you review and/or merge? It unblocks other work.

@vzarytovskii vzarytovskii merged commit aebdd28 into dotnet:main Aug 16, 2022
@abelbraaksma
Copy link
Contributor Author

Thanks! Small change solves a lot of issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants