You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
net11.0: Option/Result refusal and value-object JSON under System.Text.Json's union support #213
area/jsonSystem.Text.Json wire forms, values and dictionary keysarea/value-objectsValue-object contracts and what the aspects generate for thempackage/coreAffects CodoMetis.TypeKittestsAdds or changes tests only (tests, probes, harnesses); no library code
Show that the System.Text.Json guarantees hold under .NET 11's union support. These checks are owed by the net11.0 target (#208).
.NET 11's System.Text.Json serializes unions: it writes the active case with no wrapper, picks a case by JSON token type by default, takes [JsonUnion] with a structural classifier, and adds InferClosedTypePolymorphism for closed hierarchies (union types).
Checks
Option and Result still refuse. A union with an Option<T> or a Result<T, TError> case, written and read, must throw through NotWireTypeJsonConverterFactory and never write {}. Check this under reflection and under a source-generated context, and under InferClosedTypePolymorphism for a closed base with an Option property. If the refusal doesn't hold, that's a silent bug filed on its own.
No refusal quotes the input when a union case is a value object whose read fails (UnreadableInputTests), with the union declared in a test assembly without the Generators package, the shape a consumer without the Generators package reaches.
Done when
The checks are tests in the net11.0 test run, each shown caught by a seeded defect (verify-the-guard). Each disagreement is an issue of its own, or a candidate in test/oracles/candidates.json with its issue.
area/jsonSystem.Text.Json wire forms, values and dictionary keysarea/value-objectsValue-object contracts and what the aspects generate for thempackage/coreAffects CodoMetis.TypeKittestsAdds or changes tests only (tests, probes, harnesses); no library code
Activity