-
Notifications
You must be signed in to change notification settings - Fork 790
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
Type provider design time component loading suitable for .NET Core tooling #3864
Conversation
An example of authoring a type provider that will load into either .NET Framework or .NET Core-based F# tooling is here: https://github.com/dsyme/FSharp.TypeProviders.SDK/tree/tpload1/examples. This places the components in this shape under
and in the nuget package they would be something like this:
Essentially all type providers would need to be updated to follow this pattern. In future iterations the layout could be:
and possibly eventually
where the design-time and runtime components are merged. |
@KevinRansom @cartermp @matthid This is ready. Please review the RFC, the implementation and testing Testing has been included for the load locations for .NET Framework. For .NET Core, I have validated by hand that we can now load and use type providers in
Then take these examples of type providers and adjust the lines here and here to use the freshly built F# compiler running on .NET Core 2.0. Then do
and in each case compilation succeeds. For example, in the case of
etc. This is generating code for .NET Framework (hence the reference to And in the case of
which is loading a single-dll .NET Standard 2.0 type provider into the .NET Core hosted F# compiler correctly. |
@dotnet-bot test Windows_NT Release_ci_part2 Build please |
@dsyme can we call the typeprovider folder 'compilertools' then that will align with an extensibility model. |
@KevinRansom See email I sent to you - perhaps just named subdirectories under "tools"? |
tools is okay, but it's going to be a bit overloaded. nuget used to use it for apps sucked into the build. global tools uses it for the 'global tool' So in short I'm okay with tools, I have some fud, that there may be issues with all of the scenarios that people may use for tools. |
@dotnet-bot test this please |
I will pull this and propose a folder change with my extensibility PR. |
@dsyme just to get this on record for what we can do in 15.6:
This is the option to take. |
Do you know if there is there an updated .NET SDK beta containing this? (People are asking about TP + .NET Core on the F# compiler office hours). Thanks! don |
What version of fsharp did this land in? |
It's been in for absolutely ages. Certainly all dotnet sdks since 3.1. |
This implements F# Tooling RFC FST-1003 - Loading Type Provider Design-Time Components into F# Tooling, also discussed here. The overall aim of this work is to allow type providers to work with .NET Core-based F# tooling.
This means we support the creation of type provider packages (i.e. packages that contain TPDTCs) that can be used successfully regardless of whether the F# compiler is running using .NET Core (e.g. the F# compiler in the .NET SDK) or .NET Framework/Mono.
With this in place, and the F# support in the .NET SDK updated, and type providers adjusted and republished, then the workaround in #3303 will no longer be needed.
The only further item needed after this that I know of is this: