-
Notifications
You must be signed in to change notification settings - Fork 287
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
Support .NET Core TP loading and netstandard2.0 #1118
Conversation
@baronfel I'm going to make a push to get FSharp.Data working with the previews of the latest .NET SDKs and able to target netstandard2.0 and netcoreapp2.0. I'll take a look at this PR as part of this
I think we should just drop the PCLs now and declare a major version update to FSharp.Data. People building PCLs should continue to use the old version. |
I'd be in favor of dropping PCL, I just wish we had some data to put behind making that decision. The main use case for PCLs used to be mobile development, right? And those environments now have runtimes that are net standard 2.0 compatible? |
@baronfel Yes, the Xamarin runtimes all now support .NET Standard 2.0. Support for PCLs is more or less being deprecated across the whole ecosystem. That said, .NET Standard 2.0 is not the specific nirvana for mobile - for the shared code in mobile apps you actually want multi-targeting, where the shared code targets both MonoDroid (Android) and MonoTouch (iOS) |
Does this mean that only F# 4.1 will be supported, and support for 3.1 and 4.0 will be dropped? |
@ovatsus I don't think it's necessary to drop support for those Note that it's not about which F# language version but which FSharp.Core versions the TPRTC(s) are compatible with and which F# tooling versions/deployments the TPDTC(s) will load into. It should be possible to maintain compat though perhaps tricky to test I'm making some adjustments to this PR and I'll draw up a matrix when I submit, thanks. |
AppVeyor is now passing, with both .NET SDK configuration (the default) and USE_MSBUILD=1 Travis is having an issue because the .NET SDK was not being installed, seeing if that's fixed now |
@baronfel The problem with FSharp.Data.Tests.sln is annoying, it looks like the VS tooling doesn't like references to out-of-solution projects for new-style project files. I'm not sure what the right solution to this is. One would be not to have `to require a local build of the packages and use a PackageReference. But this feels wrong. I've sent this query to @TIHan
|
Apart from the issue of opening |
Yes, that should be it |
I have similar IDE issues in VS Code when launching the test solution, at least until I debug build FSharp.Data.DesignTime/FSharp.Data. The error explicitly asks for debug binaries to be built, and once that's done Ionide begins working again. |
The OSX, latest mono, dotnet-cli failures seem to be transient and due to invalid json, I'm not sure they represent an actual problem in the code. The Linux, weekly mono, msbuild failures are more concerning. I can't replicate them locally on OSX/mono 5.10 as of yet. |
These are the failures on Linux Mono weekly:
|
We now only have these failures on Mono+latest+OSX+USE_MSBUILD. It's very odd that this configuration specifically would fail when other very similar ones are passing e.g. both pass!? So which variable is to blame!? Things like NameResolutionFailure tell me it's a configuration thing.
|
I agree with that route. Ideally I'd like to wrap those tests that use the network stack in a retry mechanism, specifically because we've had so many repeated problems with them. |
Weird,
But if I manually run build.fsx code inside VS it seems to work fine |
Published 3.0.0-beta on Nuget |
[ edited and updated by @dsyme. Joint work by @baronfel and @dsyme ]
This modernizes FSharp.Data by allowing it to be used with both .NET Core and .NET Framework/Mono-based F# tooling, including the F# compiler in the .NET SDK.
With this work we will have FSharp.Data fully usable in both .NET Core and .NET Framework-based F# tooling. It is also backwards compatible for use with previous F# tooling including previous editions of Visual Studio, Rider and Ionide (though if you want PCL support you have to stick to FSharp.Data 2.x)
FSharp.Data.dll
tonetstandard2.0; net45
FSharp.Data.DesignTime.dll
tonetstandard2.0; net45
netcoreapp2.0
andnet46
using the .NET SDKnet46
using Monomsbuild
toolchain and F# compilernet46
using .NET Frameworkmsbuild
toolchain and F# compiler (at the moment all of Linux/OSX/Windows testing is with .NET SDKdotnet
toolchain)To look at later (after this PR I think):
paket.references
in favour of explicitPackageReference
because of Do framework conditional references in paket.references work with .NET SDK-style projects? Paket#3091.Notes:
net45; netstandard2.0
. We could add more, e.g. netstandard1.6, though there's not much need)net45; netstandard2.0
. We don't need to add more since F# tooling always assumes one of theseOLD NOTES
A new fake build task builds the netcore stuff and the nuspec has been updated with the appropriate version constraints.
Sadly it appears we have to maintain this two-solution approach because the PCL versions of FSharp.Core have been dropped as of somewhere around FSharp.Core version 4.1.17 or 18, so we need an old-project-file-style build to handle building PCLs.
Bonus points, and something I tried very hard to do, was get some subset of the tests building on .Net standard 2.0 as well. I ran into problems here because of Nancy dependencies not playing nicely, so perhaps an enhancement to switch the test server over to Suave?