PropertyChanged icon indicating copy to clipboard operation
PropertyChanged copied to clipboard

SourceGenerator issue

Open softlion opened this issue 1 year ago • 2 comments

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 avatar Mar 30 '24 09:03 softlion

No idea ?

What implementation is invalid ?

softlion avatar Apr 02 '25 14:04 softlion

It looks like it's a dup of #320

softlion avatar Apr 02 '25 14:04 softlion