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

Struct / enum derive PartialEq should also derive Eq #988

Merged
merged 4 commits into from
Sep 25, 2022

Conversation

w93163red
Copy link
Contributor

@w93163red w93163red commented Aug 24, 2022

PR Info

Adds

[codegen] Struct / enum derive PartialEq should also derive Eq

Changes

Add a function to check if f32/f64 exists on the column. If not, add Eq on the derived part.

Testing:

  1. update the previous tests to match the new mechanism.
  2. Add two tests to if Eq is not generated when f32/f64 in the column.

@w93163red w93163red changed the title add Eq Struct / enum derive PartialEq should also derive Eq Aug 24, 2022
@billy1624 billy1624 linked an issue Aug 25, 2022 that may be closed by this pull request
Copy link
Member

@billy1624 billy1624 left a comment

Choose a reason for hiding this comment

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

Hey @w93163red, thanks for contributing!! Please check w93163red#1 for the refactoring and fixes :D

Fix clippy warnings & test cases
@w93163red
Copy link
Contributor Author

I merged the change~ Thanks!

Copy link
Member

@billy1624 billy1624 left a comment

Choose a reason for hiding this comment

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

Thanks again for contributing!! @w93163red

@billy1624 billy1624 requested a review from tyt2y3 August 26, 2022 07:42
@billy1624 billy1624 linked an issue Sep 13, 2022 that may be closed by this pull request
@billy1624 billy1624 merged commit a349f13 into SeaQL:master Sep 25, 2022
billy1624 added a commit that referenced this pull request Sep 25, 2022
@tyt2y3
Copy link
Member

tyt2y3 commented Sep 26, 2022

Awesome

@frederikhors
Copy link
Contributor

It would be very useful to have this as soon as possible.

Every time we generate with 0.9.3 we have to undo the changes (I cannot disable linting in CI).

Can we release 0.9.4 with this only?

@tyt2y3
Copy link
Member

tyt2y3 commented Oct 12, 2022

Can do

@frederikhors
Copy link
Contributor

Can do

? Are you going to?

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

Successfully merging this pull request may close these issues.

[FR] Should we derive Eq as well? [codegen] Struct / enum derive PartialEq should also derive Eq
4 participants