-
Notifications
You must be signed in to change notification settings - Fork 186
chore: Deprecate Source#future in javadsl #2555
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
Conversation
|
I'm not sure why we can't keep some of the old methods. People have probably been using them and they cause no harm. 100%, let's add extra Java DSL methods that better support Pure Java alternatives but Scala Future is not an awful API for Java users. |
35fcf1d to
60f95f6
Compare
|
We should hide some scala types when the target user is Java developers. |
pjfanning
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1 from me - this is not a a permanent block - but I'm in the middle of a release and would prefer not to have this merged during a release
I would also like to maybe bring this to a vote of the PMC because I don't really see why we need to deprecate this - we already have javadoc mentioned Source.completionStage.
I don't see why this method offends anyone. My view is that let users use this if they like it.
|
can we go down the route of deprecating now (main and 1.5.x) and coming back in a few months and looking at removing from main? |
Its not awful but its entirely redundant given So yes in a world where Java doesn't have |
|
As akka is moving to Java first now, I think we should keep java don't clean and Java native, so leaking the Future in a Java dsl is a leak of implementation detail |
This doesn't make sense, if anything we should deprecate the methods as soon as possible, not later. Also lets put things into perspective here, we have been deprecating these So to me, as far as I can tell, there hasn't been a single actual Java user (of which there are many of, if not more than Scala) that has complained about these methods being deprecated, likely because almost no one in Java is actively trying to use Future. And if for some reason Java users need to use Scala's |
|
The existing method causes us zero pain. Users might be using it. We are in no position to tell anyone what long existing methods that they can and can't use. Users expect to be able to upgrade lib versions without any hassle. You can claim that a major release allows us to remove whatever you like but what you are really doing is convincing a large proportion of our users to not upgrade. These users choose to either:
|
I'm sorry this is a terrible argument in general, I mean why did we go ahead and remove all of the Pekko 1.x deprecated methods in Pekko 2.x? I could just as easily argue that there was no reason for removing these those deprecated as it causes us zero pain and yet we did it.
All evidence points to the contrary. We have been deprecating these methods for a while now and there hasn't been a single complaint. In fact I don't think it's ridiculous to claim that deprecating these Future methods and removing it in Pekko 2.x is causing us zero pain as well (that also includes our users)
Yes we most certainly are if it's a breaking release of Pekko, that's the whole point of a breaking point release.
And again, we have been deprecating these methods for a while and no has complained and that's not surprising because it would be shocking if any Java users willingly used Scala Future. There is an obvious misalignment/tension here and rejecting PRs like this is in my view too far. Can we discuss this on the mailing list and make an executive decision on it? The whole premise of deprecating these Future methods in the java dsl is it should be done as soon as possible so we can actually get feedback from Java users on releases, and this PR should have been in Pekko 1.4.0 for exactly this reason. I am on the verge of blocking future Pekko 1.x releases over this, as this argument comes up again and again and it's the same arguments that cause us to go around in circles. We are already in the middle of doing this transition of cleaning up the Java dsl wrt Future and that only works if we holistically deprecate the related methods as soon as we can in the Pekko 1.x series |
|
I don't have a problem generally with deprecating the method (this PR). I object to the related PR which removes the method before we have even a release with the deprecation. |
I am somewhat unhappy with PRs going straight to 1.x branches like this PR does. The norm is for PRs to go to main branch first and to then be backported. |
Sure that's fine, in which case we should still discuss this properly and if the result is that is a deprecation PR needs to land in Pekko 1.x first then that is totally fine (and this is my position as well) This would also make it clear for @He-Pin as he is largely driving this. EDIT: Also I am aware the release is out, my point is that ideally these deprecations should have landed in Pekko 1.4.0 as we need to give sufficient time/warning to end users before a Pekko 2.0.0 full release. |
I am aware, but to me this is evidently causing confusion/chaos so it makes sense to revisit this position. These deprecations only make sense if they are put to end users as soon as we can. |
60f95f6 to
d8a1afb
Compare
|
@pjfanning @mdedetrich We can rewrite the commit message with the reference to the pr to main |
pjfanning
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - @He-Pin after we merge this, could we cherry pick it to main while we discuss the timing about removing the method?
stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala
Outdated
Show resolved
Hide resolved
…cala Co-authored-by: PJ Fanning <pjfanning@users.noreply.github.com>
* chore: Deprecate Source#future in javadsl * Update stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala Co-authored-by: PJ Fanning <pjfanning@users.noreply.github.com> --------- Co-authored-by: PJ Fanning <pjfanning@users.noreply.github.com>
This method should be deprecated and then removed in 2.0.0 release
#2554