zefchain / serde-reflection

Rust libraries and tools to help with interoperability and testing of serialization formats based on Serde.
Apache License 2.0
124 stars 22 forks source link

Fix Dart list equality #36

Closed jerel closed 3 months ago

jerel commented 11 months ago

Summary

In the case of Option<Vec<_>> the generated Dart was not using listEquals(field, other.field) to check for equality like it does for Vec<_> because the match statement was checking Option and falling through to the default case of field == other.field.

Test Plan

The test_utils.rs data structures didn't include a case where a vec was optional. This PR adds a field to demonstrate that case. This PR also includes test code which verifies that the generated Dart code is now correct.

jerel commented 11 months ago

Best I can tell the test failures are unrelated to my changes. Looks like a Deno failure perhaps?

ma2bd commented 11 months ago

Thanks for the PR. Hoping to have a look soon

ma2bd commented 7 months ago

Any luck with deno?

ma2bd commented 3 months ago

@jerel This was released with serde-generate v0.26.0 Thanks for you patience!

jerel commented 3 months ago

@ma2bd thanks!