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

Allow to pass an Executor when converting Futures #254

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rdesgroppes
Copy link

This is to circumvent #179.

@rdesgroppes rdesgroppes force-pushed the pass-executor-to-future-converters branch from 1b1cccb to ce78f75 Compare November 16, 2021 15:38
@rdesgroppes rdesgroppes force-pushed the pass-executor-to-future-converters branch from ce78f75 to 719e4de Compare November 18, 2021 16:20
@lrytz
Copy link
Member

lrytz commented Nov 23, 2021

Took me a bit to figure out why CI failed. It's not the java.lang.NoSuchMethodError errors in the end of the logs, these seem to be expected test output.

The problem is binary compatibility, MiMa is active through sbt-scala-module, which uses sbt-version-policy, which enables MiMa. And the MiMa error only shows locally if the git clone has the tags pulled.

$> sbt ++2.12.15 versionPolicyCheck

 * extension method toJava$extension(scala.concurrent.Future)java.util.concurrent.CompletionStage in object scala.compat.java8.FutureConverters#FutureOps does not have a correspondent in current version
   filter with: ProblemFilters.exclude[DirectMissingMethodProblem]("scala.compat.java8.FutureConverters#FutureOps.toJava$extension")

 * static method toJava(scala.concurrent.Future,java.util.concurrent.Executor)java.util.concurrent.CompletionStage in class scala.compat.java8.FutureConverters does not have a correspondent in other version
   filter with: ProblemFilters.exclude[DirectMissingMethodProblem]("scala.compat.java8.FutureConverters.toJava")

 * method toJava(scala.concurrent.Future,java.util.concurrent.Executor)java.util.concurrent.CompletionStage in object scala.compat.java8.FutureConverters does not have a correspondent in other version
   filter with: ProblemFilters.exclude[DirectMissingMethodProblem]("scala.compat.java8.FutureConverters.toJava")

 * method toJava(java.util.concurrent.Executor)java.util.concurrent.CompletionStage in class scala.compat.java8.FutureConverters#FutureOps does not have a correspondent in other version
   filter with: ProblemFilters.exclude[DirectMissingMethodProblem]("scala.compat.java8.FutureConverters#FutureOps.toJava")

 * extension method toJava$extension0(scala.concurrent.Future)java.util.concurrent.CompletionStage in object scala.compat.java8.FutureConverters#FutureOps does not have a correspondent in other version
   filter with: ProblemFilters.exclude[DirectMissingMethodProblem]("scala.compat.java8.FutureConverters#FutureOps.toJava$extension0")

 * extension method toJava$extension1(scala.concurrent.Future,java.util.concurrent.Executor)java.util.concurrent.CompletionStage in object scala.compat.java8.FutureConverters#FutureOps does not have a correspondent in other version
   filter with: ProblemFilters.exclude[DirectMissingMethodProblem]("scala.compat.java8.FutureConverters#FutureOps.toJava$extension1")

 * method this(scala.concurrent.Future,java.util.concurrent.Executor)Unit in class scala.concurrent.java8.FuturesConvertersImpl#CF does not have a correspondent in other version
   filter with: ProblemFilters.exclude[DirectMissingMethodProblem]("scala.concurrent.java8.FuturesConvertersImpl#CF.this")

Now it seems binary compatibility is checked backwards and forwards, @SethTisue why's that? The changes all look backwards compatible to me.

@SethTisue
Copy link
Member

SethTisue commented Dec 9, 2021

binary compatibility is checked backwards and forwards

it's an attempt to simulate checking of source-compatibility. see discussion on scalacenter/sbt-version-policy#71

if we believe that a change is safe, it's fine to just add the MiMa exceptions

I also wouldn't mind switching from versionPolicyIntention := Compatibility.BinaryAndSourceCompatible to versionPolicyIntention := Compatibility.BinaryCompatible, tbh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants