Open am11 opened 4 years ago
This looks good. FYI, I'm currently working on implementing schemas, based on the 1.2 spec. This may be relevant for this work.
Cool, looking forward to it. 🙂 I haven't' looked much deeper but I think we have some spec tests validating schema on emitter side.
After the #485 refactoring, I will switch to working on emitter spec tests execution.
How's the progress on this?
@bootzin, spec suite for emitters was configured in master branch, such that anyone can contribute to improve the coverage and de-ignore the related specs. https://github.com/aaubry/YamlDotNet/blob/e32f92ed079c1b62fdd949b37c23db047649934c/YamlDotNet.Test/Spec/SerializerSpecTests.cs#L39
My last work in progress for emitters was a scenario which we do not currently support (for 1.1 either): "end-to-end (roundtripable) mapping of anchors". We have added support for anchor deserialization in #490. However, for serialization, preserving anchor E2E becomes quite complicated and expensive in terms of performance (hint; reflection and bookkeeping of complex object graphs), code complexity and maintenance.. unless we add support for C# 9 code generators or some such.
Also, I am not sure how valuable is it in real world? One of the Ruby based YAML library used to have this kind of anchor serialization support, but they removed it (probably it was deemed not worth the effort?)
YDN v8.1.1+ support scanning and parsing of YAML 1.2 documents by the spec. This is indicated in the repo's README.
This issue is to track support for YAML 1.2 for emitter and (JSON) serializer.
As a prerequisite cleanup, I propose to refactor some bits for better diagnosability and facilitating emitter spec testing:
SpecTests.cs
to something likeParserSpecTests.cs
.after that:
EmitterSpecTests.cs
with execution, assertions and ignore lists.After the initial bootstrapping of emitter test runner, add the list of failing tests below this line for tracking.
TODO: add list