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

Restore LongHashFunction.xx_r39() to allow consumers to migrate to xx() #84

Open
wants to merge 1 commit into
base: ea
Choose a base branch
from

Conversation

zackthehuman
Copy link

Add alias to LongHashFunction.xx() called LongHashFunction.xx_r39() to allow consumers to migrate code from xx_r39() to xx() without breaking at runtime.

The LongHashFunction.xx_r39() method delegates to LongHashFunction.xx() so it is identical in behavior. It's marked as deprecated.

Context

Some large companies make use of Zero-Allocation-Hashing because it is so useful. In 658079a the LongHashFunction.xx_r39() method was renamed to the more general LongHashFunction.xx(). Since this method is public, this was a breaking change. Since the cutover from LongHashFunction.xx_r39() to LongHashFunction.xx() was immediate, any consumer has to ensure that their code no longer uses LongHashFunction.xx_r39() as well as any of their (potentially compiled) dependencies. If a dependency was compiled against an older version of Zero-Allocation-Hashing where LongHashFunction.xx_r39() still exists, then it will blow up at runtime since the method can no longer be found on the class.

At LinkedIn, we use Zero-Allocation-Hashing both in our internal and open-source libraries. We want to update to the latest version, but cannot easily do it without a way to cut over from LongHashFunction.xx_r39() to LongHashFunction.xx().

Please consider merging this patch for compatibility's sake. It will help software developers keep their dependencies up to date!

Copy link

@shivamgupta1 shivamgupta1 left a comment

Choose a reason for hiding this comment

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

LGTM

Add alias to LongHashFunction.xx() called LongHashFunction.xx_r39() to allow
consumers to migrate code from xx_r39() to xx() without breaking at runtime.

The LongHashFunction.xx_r39() method delegates to LongHashFunction.xx() so it
is identical in behavior. It's marked as deprecated.
@zackthehuman
Copy link
Author

@peter-lawrey Any chance you're be open to merging this change?

@zackthehuman
Copy link
Author

Trying @peter-lawrey-admin to see if this is an acceptable request.

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.

None yet

2 participants