-
Notifications
You must be signed in to change notification settings - Fork 156
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
Update to FSharp.Core for F# 4.1 and release .NET Standard 1.6 support in v2.next #364
Comments
@kurtschelfthout
Side note:
Yup, this is my own thoughts/0.02$ |
Thanks for your comments.
Do you mean as a practical concern to develop FsCheck in VS2017? The approach we have in the branch doesn't need VS support, it uses dotnet CLI to build/test/package for .NET Core/.NET Standard (need to check this), which I think we can just copy.
Why would FsCheck target 2.0? We currently target net452 which is compatible with netstandard13. But, FSharp.Core only targets 1.6. The advice (reasonably) for libraries is to target the lowest version of .NET Standard we can get away with - so as it stands that seems to be 1.6. Also that would make FsCheck automatically compatible with .NET Standard >= 1.6, including 2.0. Right?
I don't understand why - can you elaborate? |
Yes. Because validating build to comply with .NET Standard is easier with tooling support, imho.
The .NET Standard 1.6 relies on .NET Framewok 4.6.1 as the baseline. This will be in sync with FSharp.Core that comply with .NET Standard 1,6. Yes, .NET Standard 1.6 is the best version to comply today, I agree.
Not really. .NET Standard 2.0 is a strict superset of .NET Standard 1.6, therefore .NET Standard 1.6 is compatible with .NET Standard 2.0. Yes, on the perspective of API side, making FsCheck to comply with .NET Standard 1.6 will also run or compatible in .NET Standard 2.0.
Unfortunately, on the base of project system used in .NET Standard 2.0 is totally different from .NET Standard 1.6. Some of us may still use the now legacy model of MSBUILD project that has GUIDs in it. Starting with .NET Standard 2.0 (and also .NET Core 2.0) the VS tooling and project system will use Visual Studio CPS (Common Project System), and there's no backward compatibility even though you can still consume .NET standard 1.6 library at run time. Also, in the .NET Standard 2.0 readyness, if we are looking at the roadmap of .NET Standard 2.0, version 2.0 will be released in this year, approximately Q3 2017. See https://github.com/dotnet/core/blob/master/roadmap.md |
@eriawan I understand, you are mostly worried about upgrading the FsCheck codebase to be .NET Standard and CPS compatible. To be honest I am very reluctant to change much at this point, as the past year has shown that MSFT changes their approach roughly every 3 months. Also F# is lagging behind in tool support and will for the foreseeable future. Stuff like Ionide and OmniSharp are getting better and better and I've considered a few times to not bother with VS at all. Personally I wouldn't mind but I think lots of contributors are still using it so I don't want to jump the gun. Anyway, for this particular issue, I am not concerned with the FsCheck codebase per se: I would just like the FsCheck NuGet package to be easily consumable from .NET Standard projects. As demonstrated on the fscheck3 branch, that seems doable without switching to the CPS and so on. Granted, the time may come, with .NET Standard 2.0, when this becomes a necessity, but 6 months is an eternity in MSFT time and I don't have the time or inclination to follow every moodswing ;) |
I've noticed that in a proper nuspec, one can add dependencies per target framework. See https://docs.microsoft.com/en-us/nuget/schema/nuspec#dependencies. So conceivably it should be possible to keep FSharp.Core 3.1 support for the frameworks we target now (net452, portable profiles) and only need 4.1 for .NET Standard. That would be like having our cake and eat it too, I think. Unfortunately paket pack does not support this (yet) fsprojects/Paket#913 but I think it's worth switching to NuGet pack for it. |
Even if the tooling has changed from project.json to csproj libraries that use project.json can still be used if they are made into nuget packages. |
@kurtschelfthout so, tooling doesnt matter. your project.json (preview2) can generate Your plan is ok
that's the right package to use, any
awesome! As a feedback, dont wait for .net standard 2.0. it doesnt really matter, and will be ok only in Q3. @kurtschelfthout you can use .net core 1.0 rtm (fsproj) to generate the netstandard1.6 like now in @eriawan as a note, tooling for Please release a netstandard1.6 package if possibile, so ecosystem can start use this awesome library! If you want is a good idea to convert project.json (preview2) to use rtm (fsproj). No source code changes, just the project files (is just a tooling change). |
@enricosada if you have some time at some point can you take a look at the PR #371 and see if you think this is the right way to do things? I added .netcore projects in the new format, no project.json (I figured I might as well use the newest format). I think it works, at least it builds, tests, and produces a nupkg with a netstandard1.6 folder in it :) Few questions -
|
sry @kurtschelfthout i have no free time to do that in the next week. I think you can try to ask in |
@enricosada no problem mate, I'll figure something out. I think I'll just test the outcome of the current approach manually, if that works the process can always be improved afterwards. |
I've released an rc2 for FsCheck, FsCheck.Xunit and FsCheck.Nunit wit .NET Standard support here: It looks relatively ok, except what's wrong is that FsCheck.Xunit and NUnit in NET Standard version have a dependency on FsCheck >= 1.0.0. I don't know where that version comes from...it should be 2.9.0-rc2. |
I think when using nuget pack, the version needs to be set at RESTORE time, not at pack time. Otherwise it will default to 1.0 Edit: may be NuGet/Home#4337 |
@0x53A yes, looks like setting the version at restore time helped. Also needed to set the version everywhere, even for the FsCheck.Test project or things went wrong seemingly arbitrarily (like FsCheck.Xunit referring to 1.0.0 while FsCheck.NUnit had the right version...). Pretty strange. Anyway, 2.9.0-rc3 is on NuGet and it looks ok to me. Please test if you can. |
Since this has been released in 2.9, I'm going to close this issue. Any problems with consuming netstandard, please open a new issue or PR. |
Now that VS 2017 is out, the pressure to support .NET Standard and .NET Core is only going to grow. We currently have the code to make FsCheck .NET Standard 1.6 and .NET Core compatible in the fscheck3 branch. This effectively ties together the timelines for .NET Standard support and v3.
I don't think this is a good situation.
.NET Standard support feels more urgent than getting v3 out, which is getting a fair amount of improvements (random generation, parallel/async testing, API cleanup) but really 2.x is very usable right now as is.
Concretely what I propose is the following:
So really we support more or less the same set of platforms as before, except for folks targeting older versions of FSharp.Core.
Thoughts?
The text was updated successfully, but these errors were encountered: