FSharp.Management icon indicating copy to clipboard operation
FSharp.Management copied to clipboard

WIP: dotnet sdk and TPSDK updates for netstandard2.0

Open baronfel opened this issue 6 years ago • 3 comments

This is as far as I've gotten with converting this repo to .net standard 2.0.

Some of these type providers in general will be very difficult if not impossible in their current forms to port over without significant further work.

TP XPlat? Status
Registry Potentially (implemented as a file store on non-windows) Technically ported, but having access control issues when compiling. Exceptions and whatnot
FileSystem Yes Ported and working, with conditional tests depending on your platform.
RelativeFileSystem Yes Ported and working.
SystemTimeZones Yes Ported and working, UTC test isn't valuable on my platform, but should be stable within a platform
StringReader Yes Ported and working.
Powershell No In the current configuration (WCF Named Pipes) there's no way for the TP to be built for .net standard 2.0 and reliably work cross platform. I've taken the approach of only compiling the TP for net462 framework.
WMI Maybe Had several problems with the tests for this one, despite System.Management having a .netstandard2.0 nuget

I'm hoping to get to a point where the cross-platform compatible type providers can be compiled for net462 and netstandard2.0, and the windows-only type providers can be compiled just for net462, and then we can just package them all for their appropriate frameworks.

Future work then could take on the larger challenges of porting the windows-only TPs to netstandard where appropriate (powershell core for example).

Further steps

  • [x] Fix test compilation errors (Expecto cannot be found?!)
  • [x] Run tests and validate TPs
  • [X] Fix packaging to adhere to new type provider location standards (see FSharp.Data's conversion and associated F# compiler repo issue for path formatting)
  • [x] Update build scripts/matrix to use dotnet sdk where appropriate

baronfel avatar Apr 06 '18 15:04 baronfel

Alright, I tested the generated nuget package from this in a local netcoreapp2.0/netstandard2.0 project, and it works! With the caveats listed in the table above this is ready to go in my opinion.

baronfel avatar Aug 08 '18 17:08 baronfel

@sergey-tihon @forki @vasily-kirichenko what would you all think about reviewing/merging this and then releasing a prerelease, like we've done for FSharp.Configuration and FSharp.Data? That would allow for wider testing on netcore platforms. I know that my workplace would like to begin testing of this.

baronfel avatar Sep 04 '18 15:09 baronfel

@baronfel Agree, let's publish it as 1.0.0-beta1 ok? I've sent you invitation to NuGet package.

I've tried to build it on macOS and on Win, it fails on both.

Windows (dotnet 2.1.401)

win10_-_1803__april_ win10_-_1803__april_

macOS (dotnet 2.1.401)

build_fsx_ _fsharp_management build_fsx_ _fsharp_management

sergey-tihon avatar Sep 04 '18 18:09 sergey-tihon