warriordog / ActivityPubSharp

Modular implementation of ActivityPub in C#
https://warriordog.github.io/ActivityPubSharp/
Mozilla Public License 2.0
45 stars 10 forks source link

Project 1: ActivityDeserializationTests failing #102

Closed warriordog closed 1 year ago

warriordog commented 1 year ago

Several of these tests are failing with this error: System.InvalidCastException: Can't represent the graph as type ActivityPub.Types.AS.ASActivity

Need to diagnose and fix the problem. Most likely is an issue with the Type / Entity mapping

warriordog commented 1 year ago

This is the underlying issue with most of the remaining test failures

warriordog commented 1 year ago

This is due to ASType being abstract. TypeMap doesn't know how to create a derived non-abstract type to get an instance of ASType, so we may just need to remove all abstract types from the Type inheritance tree.

warriordog commented 1 year ago

Better idea - we can just special-case ASType by constructing any other type.

warriordog commented 1 year ago

so this is separate from the ASType issue - I think its because the more-narrow subtype actually excludes the more generic one. I think we need to flip that logic a bit.

warriordog commented 1 year ago

Fix. Down to just 9 failing tests!