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 <miguelvilag@gmail.com>

* add changelog entry

Signed-off-by: miguel-vila <miguelvilag@gmail.com>

* remove change

Signed-off-by: miguel-vila <miguelvilag@gmail.com>

* take into account primitives

Signed-off-by: miguel-vila <miguelvilag@gmail.com>

* refactor and format

Signed-off-by: miguel-vila <miguelvilag@gmail.com>

* use Object.equals

Co-authored-by: Thomas Farr <xtansia@xtansia.com>
Signed-off-by: Miguel Vilá <miguelvilag@gmail.com>

* use `&&` chain

Signed-off-by: miguel-vila <miguelvilag@gmail.com>

* adjust last line

Signed-off-by: miguel-vila <miguelvilag@gmail.com>

* use fqn

Signed-off-by: miguel-vila <miguelvilag@gmail.com>

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

Signed-off-by: miguel-vila <miguelvilag@gmail.com>

* remove unused var definition

Signed-off-by: miguel-vila <miguelvilag@gmail.com>

* codegen equals/hashCode for request shapes

Signed-off-by: miguel-vila <miguelvilag@gmail.com>

* add hashCode/equals to TaggedUnion

Signed-off-by: miguel-vila <miguelvilag@gmail.com>

* use import

Signed-off-by: miguel-vila <miguelvilag@gmail.com>

* fix equals for request shapes

Signed-off-by: miguel-vila <miguelvilag@gmail.com>

* codegen latest from main

Signed-off-by: miguel-vila <miguelvilag@gmail.com>

---------

Signed-off-by: miguel-vila <miguelvilag@gmail.com>
Signed-off-by: Miguel Vilá <miguelvilag@gmail.com>
Co-authored-by: Thomas Farr <xtansia@xtansia.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
(cherry picked from commit 18a8460)
* Re-run codegen

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

* Improve null handling

Signed-off-by: Thomas Farr <tsfarr@amazon.com>

---------

Signed-off-by: Thomas Farr <tsfarr@amazon.com>
(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