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 data type hashing; fix 253 #254

Merged
merged 5 commits into from
Jul 17, 2024
Merged

Fix data type hashing; fix 253 #254

merged 5 commits into from
Jul 17, 2024

Conversation

FedericoAureliano
Copy link
Contributor

Algebraic data types were not being hashed correctly, which was causing collisions in the query generation. See #253 for the bug report.

This pull requests fixes the hashing and adds the test case from #253 to the CI.

Copy link
Contributor

@adwait adwait left a comment

Choose a reason for hiding this comment

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

Looks good to me! One question: some hashing functions do a recursive descent, this would be bad (for recursive ADTs). Tests passing implies all is well?

@FedericoAureliano
Copy link
Contributor Author

Good question. The recursion stops at the self reference type (whose hash is just the name) so we should be good.

@FedericoAureliano FedericoAureliano merged commit 86f2248 into master Jul 17, 2024
2 checks passed
@FedericoAureliano FedericoAureliano deleted the fix-253 branch July 17, 2024 20:18
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