-
Notifications
You must be signed in to change notification settings - Fork 102
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
Binary incompatible problem betwen published versinon 1.0.0, 1.0.1 and snapshot #247
Comments
Output of
|
Hmm. I tried to run @inline implicit def enrichAsJavaIntFunction[R](sf: scala.Function1[Int, R]): RichFunction1AsIntFunction[R] = new RichFunction1AsIntFunction[R](sf) But running in local machine, the result is different: $ CI_COMMIT_TAG=x \
PGP_PASSPHRASE=x \
PGP_SECRET=x \
SONATYPE_PASSWORD=x \
SONATYPE_USERNAME=x \
CI_SNAPSHOT_RELEASE=';clean ;set publishTo := Some(Resolver.file("sonatype-local-bundle", sonatypeBundleDirectory.value)) ;+publish' \
CI_RELEASE=';set publishTo := Some(Resolver.file("sonatype-local-bundle", sonatypeBundleDirectory.value)) ;+publish' \
CI_SONATYPE_RELEASE=version \
sbt ci-release $ grep enrichAsJavaIntFunction target/scala-*/src_managed/main/FunctionConverters.scala
target/scala-2.11/src_managed/main/FunctionConverters.scala: @inline implicit def enrichAsJavaIntFunction[A0, R](sf: scala.Function1[A0, R])(implicit evA0: =:=[A0, Int]): RichFunction1AsIntFunction[R] = new RichFunction1AsIntFunction[R](sf.asInstanceOf[scala.Function1[Int, R]])
target/scala-2.12/src_managed/main/FunctionConverters.scala: @inline implicit def enrichAsJavaIntFunction[A0, R](sf: scala.Function1[A0, R])(implicit evA0: =:=[A0, Int]): RichFunction1AsIntFunction[R] = new RichFunction1AsIntFunction[R](sf.asInstanceOf[scala.Function1[Int, R]])
target/scala-2.13/src_managed/main/FunctionConverters.scala: @inline implicit def enrichAsJavaIntFunction[A0, R](sf: scala.Function1[A0, R])(implicit evA0: =:=[A0, Int]): RichFunction1AsIntFunction[R] = new RichFunction1AsIntFunction[R](sf.asInstanceOf[scala.Function1[Int, R]])
target/scala-3.0.2/src_managed/main/FunctionConverters.scala: @inline implicit def enrichAsJavaIntFunction[A0, R](sf: scala.Function1[A0, R])(implicit evA0: =:=[A0, Int]): RichFunction1AsIntFunction[R] = new RichFunction1AsIntFunction[R](sf.asInstanceOf[scala.Function1[Int, R]]) |
Haha target/scala-2.11/src_managed/main/FunctionConverters.scala:
@inline implicit def enrichAsJavaIntFunction[R](sf: scala.Function1[Int, R]): RichFunction1AsIntFunction[R] = new RichFunction1AsIntFunction[R](sf)
target/scala-2.12/src_managed/main/FunctionConverters.scala:
@inline implicit def enrichAsJavaIntFunction[R](sf: scala.Function1[Int, R]): RichFunction1AsIntFunction[R] = new RichFunction1AsIntFunction[R](sf)
target/scala-2.13/src_managed/main/FunctionConverters.scala:
@inline implicit def enrichAsJavaIntFunction[R](sf: scala.Function1[Int, R]): RichFunction1AsIntFunction[R] = new RichFunction1AsIntFunction[R](sf)
target/scala-3.0.2/src_managed/main/FunctionConverters.scala:
@inline implicit def enrichAsJavaIntFunction[R](sf: scala.Function1[Int, R]): RichFunction1AsIntFunction[R] = new RichFunction1AsIntFunction[R](sf) And with just a should-be-no-effect-change in grep enrichAsJavaIntFunction target/scala-*/src_managed/main/FunctionConverters.scala
target/scala-2.11/src_managed/main/FunctionConverters.scala:
@inline implicit def enrichAsJavaIntFunction[A0, R](sf: scala.Function1[A0, R])(implicit evA0: =:=[A0, Int]): RichFunction1AsIntFunction[R] = new RichFunction1AsIntFunction[R](sf.asInstanceOf[scala.Function1[Int, R]])
target/scala-2.12/src_managed/main/FunctionConverters.scala:
@inline implicit def enrichAsJavaIntFunction[A0, R](sf: scala.Function1[A0, R])(implicit evA0: =:=[A0, Int]): RichFunction1AsIntFunction[R] = new RichFunction1AsIntFunction[R](sf.asInstanceOf[scala.Function1[Int, R]])
target/scala-2.13/src_managed/main/FunctionConverters.scala:
@inline implicit def enrichAsJavaIntFunction[A0, R](sf: scala.Function1[A0, R])(implicit evA0: =:=[A0, Int]): RichFunction1AsIntFunction[R] = new RichFunction1AsIntFunction[R](sf.asInstanceOf[scala.Function1[Int, R]])
target/scala-3.0.2/src_managed/main/FunctionConverters.scala:
@inline implicit def enrichAsJavaIntFunction[A0, R](sf: scala.Function1[A0, R])(implicit evA0: =:=[A0, Int]): RichFunction1AsIntFunction[R] = new RichFunction1AsIntFunction[R](sf.asInstanceOf[scala.Function1[Int, R]]) I think fnGen is buggy and too complex. |
I've added a notice to https://github.com/scala/scala-java8-compat/releases/tag/v1.0.1 about the issue. |
The published version 1.0.0 and 1.0.1 (on maven central) is incompatible with both version 0.9.1 and the snapshot version build from current
main
branch (commit 6074480)Verify:
1. Add to
build.sbt
2. Add file
tmp/src/main/scala/Main.scala
3. In sbt:
Analyse
tmp/runMe
fail withand success with
So snapshot code in
main
branch is:0.9.1
1.0.0
and1.0.1
The text was updated successfully, but these errors were encountered: