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

[Backport 2.x] Codegen equals & hashCode #1217

Merged

Conversation

Xtansia
Copy link
Collaborator

@Xtansia Xtansia commented Oct 1, 2024

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

* Generate hashCode and equals , wip

Signed-off-by: miguel-vila <[email protected]>

* add changelog entry

Signed-off-by: miguel-vila <[email protected]>

* remove change

Signed-off-by: miguel-vila <[email protected]>

* take into account primitives

Signed-off-by: miguel-vila <[email protected]>

* refactor and format

Signed-off-by: miguel-vila <[email protected]>

* use Object.equals

Co-authored-by: Thomas Farr <[email protected]>
Signed-off-by: Miguel Vilá <[email protected]>

* use `&&` chain

Signed-off-by: miguel-vila <[email protected]>

* adjust last line

Signed-off-by: miguel-vila <[email protected]>

* use fqn

Signed-off-by: miguel-vila <[email protected]>

* use fqn for Objects.hashCode, take into account parent

Signed-off-by: miguel-vila <[email protected]>

* remove unused var definition

Signed-off-by: miguel-vila <[email protected]>

* codegen equals/hashCode for request shapes

Signed-off-by: miguel-vila <[email protected]>

* add hashCode/equals to TaggedUnion

Signed-off-by: miguel-vila <[email protected]>

* use import

Signed-off-by: miguel-vila <[email protected]>

* fix equals for request shapes

Signed-off-by: miguel-vila <[email protected]>

* codegen latest from main

Signed-off-by: miguel-vila <[email protected]>

---------

Signed-off-by: miguel-vila <[email protected]>
Signed-off-by: Miguel Vilá <[email protected]>
Co-authored-by: Thomas Farr <[email protected]>
Signed-off-by: Thomas Farr <[email protected]>
(cherry picked from commit 18a8460)
* Re-run codegen

Signed-off-by: Thomas Farr <[email protected]>

* Improve null handling

Signed-off-by: Thomas Farr <[email protected]>

---------

Signed-off-by: Thomas Farr <[email protected]>
(cherry picked from commit 897cc9b)
@Xtansia Xtansia force-pushed the backport/2.x/codegen-equals-hashcode branch from c9be11c to a640485 Compare October 1, 2024 21:20
@Xtansia Xtansia merged commit 329fa95 into opensearch-project:2.x Oct 1, 2024
49 checks passed
@Xtansia Xtansia deleted the backport/2.x/codegen-equals-hashcode branch October 1, 2024 21:31
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