-
Notifications
You must be signed in to change notification settings - Fork 94
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
Long term aim: Remove binary writer from TPSDK #299
Labels
Comments
Upside to that approach of using quotations instead is that it opens up new avenues like using TPs for JS where that 'just works' |
dsyme
changed the title
Long term aim: remove binary writer from TPSDK
Long term aim: Remove binary writer from TPSDK
Aug 23, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The TPSDK includes a 2000 line internalized optional binary writer incorporated into each generative type provider. This is because generative type providers communicate their generated code to the F# compiler by giving an actual .NET binary which is then statically linked into the target output. The type definitions for the generated binary is specified by
ProvidedTypeDefinition
etc. and the code by quotations.While there are no known bugs in the binary writer, we would like to eventually remove the writer from the TPSDK. This could be done in two ways
We could use an existing binary writer. The main problem here is that it causes TPDTC components to have dependencies and TPDTC are not loaded in isolation.
We could modify the TP-compiler API so that no binary writer is needed.
On (2), the use of generated assemblies itself is a clumsy way to communicate code to the F# compiler. The F# compiler could be modified so that this is deprecated and that it directly takes quotations and translates them using its own binary writer, rather than using any static linking. This would make it harder or impossible for generative type providers to host C#-code generators, and we would deprecate that
The text was updated successfully, but these errors were encountered: