Skip to content

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

Closed
@Jand42

Description

@Jand42

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions