-
Notifications
You must be signed in to change notification settings - Fork 90
Support for authoring type providers which target portable profiles #78
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
|
I'd like this code reviewed by people before we accept it - please! :) @ovatsus After it is accepted I will submit a PR to FSharp.Data to pick up this implementation and check that all tests pass there. |
This was referenced Feb 2, 2016
Contributor
|
Thank you, @dsyme! |
dsyme
added a commit
that referenced
this pull request
Feb 9, 2016
Support for authoring type providers which target portable profiles
Member
|
Erasing is mentioned here but are generatives affected by this PR in anyway? //cc @dsyme |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this FSharp.Data PR, we added general support for cross targeting erasing type providers to the CommonProviderImplementation.
This PR brings this support across into the type provider starter pack so it can more easily be used by other type provider projects. The README edits and the FSharp.Data PR explain how the code works. Roughly speaking, we determine the referenced set of assemblies, and if you create your provided objects using
then your provided quotations and type definitions will be "remapped" to the approriate set of target referenced DLLs automatically.
I'm also hopeful that we can use this machinery to allow erasing type providers that target .NET Core (when the F# compiler is running on .NET Framework) and vice versa. But we would also need to make the ProvidedTypes code compilable as a .NET Core component, which may not be straight-forward.
This PR also includes some updates from FSharp.Data and some testing for FSharp.TypeProviders.StarterPack.
I also suggest we rename this repo to FSharp.Compiler.ProvidedTypes and make it much more officially the "home" of the ProvidedTypes API, with full documentation, samples and testing in the style of FSharp.Data etc. We could also start providing this component as a DLL assuming there are no loading, deployment or versioning issues with that (quite a large assumption).
p.s. Note that this PR includes the (large) AssemblyReader.fs file, which is independently valuable as an all-F# single-file .NET assembly reader, for cracking the metadata (though not the code) of an IL assembly without using .NET reflection. We may expect Paket file references to appear to this single file (@forki was using one already to the FSharp.Data copy of this file).