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

Use scala.concurrent.Batchable for Scala 2.13 #29986

Merged

Conversation

johanandren
Copy link
Member

References #29980

Manually tested with 2.12.11 and 2.13.3 however 2.13.4 requires quite a lot of changes (deprecated methods in IterableOps, exhaustiveness check errors all over the place) and I didn't want to grow this PR so I let that be.

With 2.13.4 impl.Promise.Transformation no longer extends the deprecated OnCompleteRunnable directly but instead scala.concurrent.Batchable. However OnCompleteRunnable extends Batchable since 2.13.0 so matching against Batchable should be fine for all 2.13.x versions.

@akka-ci akka-ci added the validating PR is currently being validated by Jenkins label Feb 1, 2021
@akka-ci akka-ci added needs-attention Indicates a PR validation failure (set by CI infrastructure) and removed validating PR is currently being validated by Jenkins labels Feb 1, 2021
@akka-ci
Copy link

akka-ci commented Feb 1, 2021

Test FAILed.

1 similar comment
@akka-ci
Copy link

akka-ci commented Feb 1, 2021

Test FAILed.

@akka-ci akka-ci added validating PR is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed needs-attention Indicates a PR validation failure (set by CI infrastructure) validating PR is currently being validated by Jenkins labels Feb 1, 2021
@akka-ci
Copy link

akka-ci commented Feb 1, 2021

Test PASSed.

@johanandren
Copy link
Member Author

PLS BUILD

@akka-ci akka-ci added validating PR is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed tested PR that was successfully built and tested by Jenkins validating PR is currently being validated by Jenkins labels Feb 1, 2021
@akka-ci
Copy link

akka-ci commented Feb 1, 2021

Test PASSed.

Copy link
Member

@patriknw patriknw left a comment

Choose a reason for hiding this comment

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

LGTM


def isBatchable(runnable: Runnable): Boolean = runnable match {
case b: akka.dispatch.Batchable => b.isBatchable
case _: scala.concurrent.Batchable => true
Copy link
Member

Choose a reason for hiding this comment

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

I'm sure I fully understand what happened to the Scala internals as described in the comment above. What if this version of Akka is run in an application with Scala 2.13.3 dependency? Will it be caught by this scala.concurrent.Batchable case, or will this be a regression compared to previous OnCompleteRunnable?

We might not care much about that and we can say that they should update to Scala 2.13.4. We already have another reason for that: #30018

Copy link
Member Author

Choose a reason for hiding this comment

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

OnCompleteRunnable extends Batchable in all 2.13.x as far as I can see, so it should not cause a regression in older 2.13 releases.

Copy link
Member

Choose a reason for hiding this comment

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

ok, thanks

@johanandren johanandren merged commit cc6d551 into akka:master Mar 1, 2021
@johanandren johanandren deleted the wip-29980-oncompleterunnable-batchable branch March 1, 2021 09:16
@xuwei-k
Copy link
Contributor

xuwei-k commented Mar 2, 2021

Is there any plan for backport to akka 2.5.x? 👀

@raboof
Copy link
Member

raboof commented Mar 2, 2021

Is there any plan for backport to akka 2.5.x?

I don't think we're planning a backport, though if someone would contribute one I don't see a reason not to accept it. Be aware we're not really planning a new 2.5.x release either, though (but perhaps a snapshot would be sufficient if you need it sooner).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants