Skip to content

Avoiding compilation at runtime and AOT compatibility in general #23

@Athari

Description

@Athari

I'm enjoying ObservableComputations a lot, which are a breath of fresh air after the unreadable mess of DynamicData and manual change notification management with a bit of DependenciesTracker. However, I'm worried that I'll face lot of issues due to it being built on top of System.Linq.Expressions, with Compile and all.

Have you explored the possibility of using Roslyn source generators (possibly with interceptors?) to avoid calling Compile at runtime? Transforming a single Expression<Func<Foo, Bar>> into a pair of arguments Expression<Func<Foo, Bar>> and Func<Foo, Bar> doesn't sound impossible.

However, even if that's implemented, I don't know how much everything else will break, as there's way more logic than just compiling expressions. ExpressionWatcher is the cornerstone of notification subscription logic, right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions