-
Notifications
You must be signed in to change notification settings - Fork 70
Update testing dependencies, target net5.0 (remove netcoreapp3.1) #266
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
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #266 +/- ##
==========================================
+ Coverage 64.17% 64.66% +0.48%
==========================================
Files 19 19
Lines 5571 6100 +529
Branches 1410 1446 +36
==========================================
+ Hits 3575 3944 +369
- Misses 1230 1378 +148
- Partials 766 778 +12
|
What is the rationale for removing netcore 3.1 and netstandard 2.1 support in the back-ends and core library? Both will be fully supported for a couple of years yet (even beyond net5.0); are there net5.0 features/libraries expected to become dependencies? |
One motivation is to not ask and users/developers to install two separate dotnet versions (3.1 and 5.0) just to run tests and recreate documentation as it is currently the case. Actually I'm confused about this and I don't know why having 5.0 sdk only was not enough to run a The other motivation is the information in many places (one example) saying Another thing can be F# 5 support. Although I don't know how closely this is tied to dotnet version. If there is an easy way for supporting both (without requiring both), I'm fine with that too. I think it should be possible to target multiple frameworks like |
The fsdocs failure might be down to roll forward policy: https://docs.microsoft.com/en-us/dotnet/core/versions/selection#framework-dependent-apps-roll-forward |
Ease of dev is a reasonable reason. I would suggest dual-targeting the consumer-facing stuff, though, so long as there are no dependencies that make that a problem. (You should be able to multi-target netstandard2.1 and netcoreapp3.1 without having netcore3.1 installed). Other notes: The net 5.0 runtime can execute a netcore3.1 application, but only if the runtime config asks for it to do so. By default, the runtime config for an application compiled against netcore3.1 will request netcore3.1.0, and (as in cgravill's link) it will be unhappy if you only have net5.0 installed. You don't need to target net 5.0 to use F#5 (just be compiling with the .net 5.0 sdk), but I don't know whether there are features that will require a net 5.0 target (my understanding is that it should be good for anything >= netstandard2.0, but I could be mistaken). That is, it should be possible to use F#5 in the library code-base without requiring the consumer to use net5.0 for their own work. |
This is a long, long rabbit hole to go down.
I'm annoyed this is not simple. For now I recommend we just stick to what we have until fsdocs is sorted out.
There is nothing that requires a net 5.0 target. Any applications in this repository should be able to specify
or
and things should work ok |
Is it possible to adjust the fsdocs call? DiffSharp/.github/workflows/pull-request.yml Lines 31 to 32 in 1213767
If we were doing a with a runtime config: but that doesn't seem to be supported with .NET Tools call. Perhaps we could still use the |
fsprojects/FSharp.Formatting#621 should allow fsdocs to roll forward |
It turns out running fsdocs (and any F# tool based on FSharp.Compiler.Service which processes scripts) on .NET Core 5.0 requrires this core F# fix and an update to FCS So this will take a little while to come through the pipe |
I updated to fsdocs 8.0.0 which will hopefully allow us to use .NET 5 only |
OK that worked 👍 |
Note moving DiffSHarp.Core and the reference backend from I'll likely revert that part of this change however it is farily harmless for now |
Also, I believe we could have kept all the tests on netcoreapp3.1 and just used RollForward. |
@dsyme this is doing the following changes:
netstandard2.1
andnetcoreapp3.1
tonet5.0
as suggested hereNUnit3TestAdapter
andMicrosoft.NET.Test.Sdk
to their latest versions in dotnet 5 F# templates. I copied the versions given by a new test project one gets bydotnet new nunit -lang "F#"
This works for me in a Docker container with only dotnet 5 sdk in it:
Could you please have a look and see if there are any problems?