Skip to content

SourceGenerator issue #322

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

Open
softlion opened this issue Mar 30, 2024 · 2 comments
Open

SourceGenerator issue #322

softlion opened this issue Mar 30, 2024 · 2 comments

Comments

@softlion
Copy link

After switching to the source generator, I get that issue at runtime:

System.Exception: .ctor has no valid implementation for <DbHs, DateTimeOffset> with property expression x => x.DateLastUpdated.
   at NotifyPropertyExtensions.WhenChanged[DbHs,DateTimeOffset](DbHs objectToMonitor, 

That means the generator has failed to generate the source code for this WhenChanged:

 hsChangedSubscription = hs.WhenChanged(x => x.DateLastUpdated)
            .Skip(1)
            .Subscribe(_ => UpdateValuesInternal());

Where hs is :

public partial class DbHotspot : IRealmObject 
{
    public DateTimeOffset DateLastUpdated { get; set; } = DateTimeOffset.Now;

    [PrimaryKey]
    public string Id { get; set; }
}

To get IRealmObject and the associated generator, install the Realm nuget.
All IRealmObject objects implement INotifyPropertyChanged through a source generator.

I switched back to the version of marble without the source generator for now.

Any idea what would cause this ?

@softlion
Copy link
Author

softlion commented Apr 2, 2025

No idea ?

What implementation is invalid ?

@softlion
Copy link
Author

softlion commented Apr 2, 2025

It looks like it's a dup of #320

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

No branches or pull requests

1 participant