Uh oh!
There was an error while loading. Please reload this page.
RejectNullConverter PoC attempt - #112
Conversation
0412abf to
eb6e417Compare@eiriktsarpalis sorrynotsorry for the atting but I'm out of ideas on how to achieve this via other routes edited: While the NRE will be a blocker for the overall thing to work (and I'd be interested to see if it is quick fix for someone that knows the code), further research shows me that the converter is not called for missing fields so this general approach is probably a dead end for now) NOTE It builds fine with the V8 SDK - the tools in this repo are still on V6 as this approach is the first thing that triggers in a need for V7+ features ( |
| #endif | ||
| #if false // I guess TypeShape is doing a reasaonable thing not propagating | ||
| // PROBLEM: TypeShape.Generic.exists does not call the predicate if the list or set is `null` |
There was a problem hiding this comment.
My original workaround that came to mind was to walk the properties after the fact with TypeShape's Generic App, but I see I need to drop a level from that (as nulls are not passed to the predicate, and I want to do a generic check in any case, so disregard this piece for now...
eiriktsarpalis
commented
Jan 24, 2024
Seems related to dotnet/runtime#50205. It's a quirk in some of the built-in converters that cannot be composed outside of their created context. |
Uh oh!
There was an error while loading. Please reload this page.
8ca802c to
5919191Compare4f6eb9e to
600cfa6Comparedf356d1 to
a87c89dCompare184c28a to
a55faccCompare
In the spirit of #87 this attempts to guard against the read path producing
nullinstances ofFSharpList<'T>andFSharpSet<'T>.However, while the docs suggest that this general approach should work, I've run aground with a
NullReferenceExceptionthat seems similar to dotnet/runtime#86483 when inspected in the debugger (elementTypeInfoisnull)