Restore LongHashFunction.xx_r39()
to allow consumers to migrate to xx()
#84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theLongHashFunction.xx_r39()
method was renamed to the more generalLongHashFunction.xx()
. Since this method is public, this was a breaking change. Since the cutover fromLongHashFunction.xx_r39()
toLongHashFunction.xx()
was immediate, any consumer has to ensure that their code no longer usesLongHashFunction.xx_r39()
as well as any of their (potentially compiled) dependencies. If a dependency was compiled against an older version ofZero-Allocation-Hashing
whereLongHashFunction.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 fromLongHashFunction.xx_r39()
toLongHashFunction.xx()
.Please consider merging this patch for compatibility's sake. It will help software developers keep their dependencies up to date!