Skip to content
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

Do not pre-compile quotations in JS-annotated code #1387

Open
Jand42 opened this issue Feb 5, 2024 · 0 comments
Open

Do not pre-compile quotations in JS-annotated code #1387

Jand42 opened this issue Feb 5, 2024 · 0 comments
Labels

Comments

@Jand42
Copy link
Member

Jand42 commented Feb 5, 2024

WS.UI templating uses methods that take F# quotations even when used in purely client-side code, because if the TP would expose a non-quotation overload too, then the F# type system would ask for disambiguation and that would make the user code uglier.

However, this has the side effect that the compiler finds these quotations to pre-compile as a function callable from the server. This is unnecessary code duplication as this is never the intention. Also, since introducing a fix to add a deserializer call around captured arguments of quotations in #1379, this can create a hard error in a deserializer macro when you capture an object that's not valid in server-client remoting (like an UI Var) but should be perfectly fine in client-only code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant