-
Notifications
You must be signed in to change notification settings - Fork 992
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
get*ExpectedValue methods' return type change not backwards compatible #2002
Comments
Just something that came to mind, here's a hack I think should work with 1.3.x and 1.4.x: Long someLong = (distributionStatisticConfig.getMaximumExpectedValue() == null) ? null : ((Number) distributionStatisticConfig.getMaximumExpectedValue()).longValue();
Double someDouble = distributionStatisticConfig.getMinimumExpectedValue() == null ? null : ((Number) distributionStatisticConfig.getMinimumExpectedValue()).doubleValue(); |
I would have to try to make sure, but pretty sure it doesn't work since
|
Alright. Although we'll have to introduce some stuff to bridge compatibility (thanks for the pull requests, by the way), I'd like to get back to a state of a single method (ideally named without
^ non-LTS minor What do you think? Does this seem like a reasonable plan to get things back to a good state while allowing libraries like Armeria to be compatible with a range of Micrometer versions? |
Agree getting to one method is important and the plan looks fine to me. But we should clarify, I guess next-next LTS here will be 2.x since it removes the API and needs to use semantic versioning? |
This should be resolved now thanks to @anuraaga's pull requests. Please check snapshots and let me know if not. We'll be releasing patch versions soon. |
I noticed 3da05bb has a backwards incompatible change of the return type from
Long getMaximumExpectedValue()
toDouble getMaximumExpectedValue()
. Since micrometer uses semantic versioning, as documented at https://micrometer.io/docs/support, I guess this wasn't intended?Because of the change, all Armeria users are locked into 1.3.x, and if a library targeted 1.4.x and used a new API, it would be impossible to use this library with Armeria without asking it to downgrade, possibly losing some monitoring features. For reference, this change downgraded Armeria's dependency from 1.4.x to 1.3.x, requiring code change since they are not API or ABI compatible.
line/armeria@890631e#diff-c966b7c3ea79ab16c67724170ff57f47R115
I understand that 1.4.x is not LTS, but I guess that doesn't preclude it from actually being used, it's more about whether it gets patch updates or not. But with this API break, more and more users will be unable to use it due to the API mismatch.
Unfortunately 1.4.x is released, but do you think we can add a method to both 1.3.x and 1.4.x,
getMaximumExpectedValueAsDouble
to provide libraries a way to work with both versions?The text was updated successfully, but these errors were encountered: