-
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
Fix #247 ensure binary compatibility from now #248
Conversation
I have force-pushed just to update some comments |
@lrytz I haven't looked at the fnGen stuff before. but this certainly looks plausible, and we should get a release out before much longer, to correct the bincompat breakage. any objection to just merging this? |
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.
Sorry @ohze that I missed the notifications of this PR.
Thank you very much for investigating this complicated problem and providing a solid fix. LGTM!
…1 to v1.0.2 (#295) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.scala-lang.modules:scala-java8-compat_2.11](http://www.scala-lang.org/) ([source](https://togithub.com/scala/scala-java8-compat)) | `1.0.1` -> `1.0.2` | [![age](https://badges.renovateapi.com/packages/maven/org.scala-lang.modules:scala-java8-compat_2.11/1.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.scala-lang.modules:scala-java8-compat_2.11/1.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.scala-lang.modules:scala-java8-compat_2.11/1.0.2/compatibility-slim/1.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.scala-lang.modules:scala-java8-compat_2.11/1.0.2/confidence-slim/1.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>scala/scala-java8-compat</summary> ### [`v1.0.2`](https://togithub.com/scala/scala-java8-compat/releases/v1.0.2) [Compare Source](https://togithub.com/scala/scala-java8-compat/compare/v1.0.1...v1.0.2) #### What's Changed - Fix [#​247](https://togithub.com/scala/scala-java8-compat/issues/247) ensure binary compatibility from now by [@​ohze](https://togithub.com/ohze) in [https://github.com/scala/scala-java8-compat/pull/248](https://togithub.com/scala/scala-java8-compat/pull/248) #### New Contributors - [@​ohze](https://togithub.com/ohze) made their first contribution in [https://github.com/scala/scala-java8-compat/pull/248](https://togithub.com/scala/scala-java8-compat/pull/248) **Full Changelog**: scala/scala-java8-compat@v1.0.1...v1.0.2 </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-pubsublite-spark).
Background
FunctionConverters
is generated by an internalfnGen
sbt project that use scala-compiler & scala-reflect to generate converter for all interfaces injava.util.function
package.Problem
fnGen
is not reliable. It produce different code on different run [1]In #211, @SethTisue have to add some
ProblemFilters.exclude
.But, as describing in #247, the mima Problem should not be filtered out because it will cause real binary incompatible error in runtime.
Solution by this PR
fnGen
: Don't use scala-compiler & scala-reflectThe generated code by the new
fnGen
implementation is exactly same as the generated code by the oldfnGen
on my machine. (somehow, the oldfnGen
is reliable in my machine :D)You can and should verify that in your machine too.
[1]
sbt sources
on CI (on my fork) and check the generated code, I found that the output is different in some CI jobs / runs.FunctionConverters
not only between versions but also in the same version with different scala cross build (ex.._2.12-1.0.1.jar
vs.._2.12-1.0.1.jar
). See this CI job that run mima against all released version from 0.9.1 and only v0.9.1 for scala 2.12 is mima check passed.