Closed enioluwas closed 1 year ago
Thanks for the PR!
I have other commitments that I need to attend to at the moment, so I won't be able to review this PR for a while. It's on my to do list, however. I cannot give an estimate on when I will be able to review this, unfortunately.
Hey @chwarr any chance you could prioritize reviewing this? My team already depends on Bond for schema definitions, and partially for serialization. This feature is the last blocker in moving all our serialization to Bond, which would be a performance boost for us over JSON. Thanks!
Overall, LGTM. Thank you for the PR and for your patience.
Can you add:
- an example project,
- a note in the documentation (under the Custom Containers section?) about the special handing for the immutable types, and
- an entry in the changelog under Unreleased.
Thanks.
Done! Added the immutable_collections
example project. Let me know if the wording on any of the doc changes needs to be modified
Closes #1159
Adds proper support for immutable collections as laid out in the issue description. Implemented this in a way such that the Bond C# package doesn't actually depend on System.Collections.Immutable, roughly following how it was done in Newtonsoft.Json.
The collections are constructed using the builders, which performs a lot better doing bulk operations.
The change to the codegen in Haskell is small, but since I don't have much experience, any suggestions to make it more idiomatic are welcome.
Added unit tests both for the compiler and for [de]serialization in C#.