Replies: 1 comment 1 reply
-
Justifications for breaking changes with RevAPI can be added to https://github.com/smallrye/smallrye-mutiny/blob/main/implementation/revapi.json#L54 I'd be happy to have a look at your PR, such case is indeed tricky and we might accept a binary incompatibility if that improves the API ergonomics. And in the worst case scenario we can stage that for a major release under semantic versioning assumptions. Thanks! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When combining
Uni
s (e.g.Uni.combine().all().unis(...)
) and limiting concurrency (.usingConcurrencyOf(x)
), we currently lose type information. This occurs because theusingConcurrencyOf
method is defined only forUniAndGroupIterable
, not in theUniAndGroupX
classes (which support up to 9 typed unis).For example, in the
io.smallrye.mutiny.operators.UniZipTest.ConcurrencyLimitTest#combineAllSmokeTest
:Here
Uni.combine().all().unis(a, b, c, d)
returns anUniAndGroup4<Integer, Integer, Integer, Integer>
theusingConcurrencyOf
method returns aUniAndGroupIterable<Integer>
which leads to loss of type information. This issues is especially significant when working withUni
s of different types (a real life example can be found in this Stackoverflow post: https://stackoverflow.com/questions/79169458/how-to-escape-continuation-hell/79170157#79170157).I tried to address the situation by overriding the
usingConcurrencyOf
method in theUniAndGroupX
classed. This solution maintains the source API without breaking any existing test. However, Revapi flags it as a binary incompatibility issue due to a covariant return type change (see https://revapi.org/revapi-java/0.28.1/differences.html#java.method.returnTypeChangedCovariantly).Would this binary incompatibility be a blocker, or would you still consider a PR with this change? Additionally, what would be the best approach for handling the Revapi issue in this case?
Beta Was this translation helpful? Give feedback.
All reactions