Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Dart list equality #36

Merged
merged 3 commits into from
Jun 5, 2024
Merged

Fix Dart list equality #36

merged 3 commits into from
Jun 5, 2024

Conversation

jerel
Copy link
Contributor

@jerel jerel commented Oct 4, 2023

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 jerel requested a review from ma2bd as a code owner October 4, 2023 22:49
@jerel
Copy link
Contributor Author

jerel commented Oct 5, 2023

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

@ma2bd
Copy link
Contributor

ma2bd commented Oct 7, 2023

Thanks for the PR. Hoping to have a look soon

@ma2bd
Copy link
Contributor

ma2bd commented Feb 18, 2024

Any luck with deno?

Copy link
Contributor

@ma2bd ma2bd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's land this. Thanks for your patience @jerel

@ma2bd ma2bd merged commit 2ce242e into zefchain:main Jun 5, 2024
@ma2bd
Copy link
Contributor

ma2bd commented Jun 6, 2024

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

@jerel
Copy link
Contributor Author

jerel commented Jun 6, 2024

@ma2bd thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants