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

Fix Binary Incompatability Warnings #609

Merged
merged 1 commit into from
Apr 6, 2018

Conversation

Ap0c
Copy link
Contributor

@Ap0c Ap0c commented Apr 6, 2018

Why are you doing this?

Running locally we've recently noticed a binary incompatibility issue that's resulted in JVM shutdown. We don't want this happening in PROD.

The stack trace for this issue reveals a NoSuchMethodError for a method in the Cats library, as seen here (truncated):

...
java.lang.NoSuchMethodError: cats.syntax.package$show$.toShowOps(Ljava/lang/Object;Lcats/Show;)Lcats/Show$Ops;
	at play.api.libs.circe.Circe.onCirceError(Circe.scala:23)
	at play.api.libs.circe.Circe.onCirceError$(Circe.scala:22)
	at controllers.DirectDebit.onCirceError(DirectDebit.scala:13)
	at 
...

We have some eviction warnings for the Cats library caused by transitive dependencies, including Circe. Therefore, this PR bumps the versions on a few libraries to remove these dependency conflicts. The diff for the eviction warnings is seen here:

@@ -8,25 +8,6 @@
 [warn]      +- com.google.oauth-client:google-oauth-client:1.11.0-beta (depends on 11.0.1)
 [warn]      +- com.gocardless:gocardless-pro:2.8.0                (depends on 20.0)
 [warn]      +- com.typesafe.play:play_2.12:2.6.7                  (depends on 22.0)
-[warn]  * io.circe:circe-parser_2.12:0.9.1 is selected over 0.8.0
-[warn]      +- support-frontend:support-frontend_2.12:1.0-SNAPSHOT (depends on 0.9.1)
-[warn]      +- com.dripower:play-circe_2.12:2608.5                (depends on 0.8.0)
-[warn]  * io.circe:circe-generic_2.12:0.9.1 is selected over {0.9.0-M2, 0.8.0}
-[warn]      +- io.circe:circe-generic-extras_2.12:0.9.1 ()        (depends on 0.9.1)
-[warn]      +- support-frontend:support-frontend_2.12:1.0-SNAPSHOT (depends on 0.9.1)
-[warn]      +- com.dripower:play-circe_2.12:2608.5                (depends on 0.8.0)
-[warn]      +- com.gu:fezziwig_2.12:0.8                           (depends on 0.9.0-M2)
-[warn]  * io.circe:circe-core_2.12:0.9.1 is selected over {0.9.0-M2, 0.8.0}
-[warn]      +- io.circe:circe-generic_2.12:0.9.1 ()               (depends on 0.9.1)
-[warn]      +- io.circe:circe-jawn_2.12:0.9.1 ()                  (depends on 0.9.1)
-[warn]      +- io.circe:circe-parser_2.12:0.9.1 ()                (depends on 0.9.1)
-[warn]      +- support-frontend:support-frontend_2.12:1.0-SNAPSHOT (depends on 0.9.1)
-[warn]      +- com.gu:acquisition-event-producer-play26_2.12:4.0.3 (depends on 0.9.1)
-[warn]      +- com.dripower:play-circe_2.12:2608.5                (depends on 0.8.0)
-[warn]      +- com.gu:fezziwig_2.12:0.8                           (depends on 0.9.0-M2)
-[warn]  * com.gu:fezziwig_2.12:0.8 is selected over 0.7
-[warn]      +- com.gu:acquisition-event-producer-play26_2.12:4.0.3 (depends on 0.8)
-[warn]      +- support-frontend:support-frontend_2.12:1.0-SNAPSHOT (depends on 0.7)
 [warn]  * com.typesafe.scala-logging:scala-logging_2.12:3.7.2 is selected over 3.5.0
 [warn]      +- support-frontend:support-frontend_2.12:1.0-SNAPSHOT (depends on 3.7.2)
 [warn]      +- com.gu:acquisition-event-producer-play26_2.12:4.0.3 (depends on 3.7.2)
@@ -41,29 +22,8 @@
 [warn]      +- com.google.guava:guava:23.0                        (depends on 1.3.9)
 [warn]  * xpp3:xpp3 is evicted completely
 [warn]      +- com.google.http-client:google-http-client:1.11.0-beta (depends on 1.1.4c)
-[warn]  * org.typelevel:cats-core_2.12:1.0.1 is selected over 0.9.0
-[warn]      +- com.gu:play-googleauth_2.12:0.7.1                  (depends on 1.0.1)
-[warn]      +- io.circe:circe-core_2.12:0.9.1 ()                  (depends on 1.0.1)
-[warn]      +- com.gu:acquisition-event-producer-play26_2.12:4.0.3 (depends on 1.0.1)
-[warn]      +- org.typelevel:cats-laws_2.12:0.9.0 ()              (depends on 0.9.0)
-[warn]      +- org.typelevel:cats_2.12:0.9.0 ()                   (depends on 0.9.0)
-[warn]      +- org.typelevel:cats-jvm_2.12:0.9.0 ()               (depends on 0.9.0)
-[warn]      +- org.typelevel:cats-free_2.12:0.9.0 ()              (depends on 0.9.0)
-[warn]  * org.typelevel:cats-kernel_2.12:1.0.1 is selected over 0.9.0
-[warn]      +- org.typelevel:cats-core_2.12:1.0.1 ()              (depends on 1.0.1)
-[warn]      +- org.typelevel:cats-laws_2.12:0.9.0 ()              (depends on 0.9.0)
-[warn]      +- org.typelevel:cats-kernel-laws_2.12:0.9.0 ()       (depends on 0.9.0)
-[warn]      +- org.typelevel:cats-core_2.12:0.9.0 ()              (depends on 0.9.0)
-[warn]      +- org.typelevel:cats_2.12:0.9.0 ()                   (depends on 0.9.0)
-[warn]  * org.typelevel:cats-macros_2.12:1.0.1 is selected over 0.9.0
-[warn]      +- org.typelevel:cats-core_2.12:1.0.1 ()              (depends on 1.0.1)
-[warn]      +- org.typelevel:cats-laws_2.12:0.9.0 ()              (depends on 0.9.0)
-[warn]      +- org.typelevel:cats-core_2.12:0.9.0 ()              (depends on 0.9.0)
-[warn]      +- org.typelevel:cats_2.12:0.9.0 ()                   (depends on 0.9.0)
-[warn]      +- org.typelevel:cats-jvm_2.12:0.9.0 ()               (depends on 0.9.0)
-[warn]      +- org.typelevel:cats-free_2.12:0.9.0 ()              (depends on 0.9.0)
 [warn]  * com.twitter:scrooge-core_2.12:4.20.0 is selected over 4.18.0
-[warn]      +- com.gu:ophan-event-model_2.12:0.0.6                (depends on 4.18.0)
+[warn]      +- com.gu:ophan-event-model_2.12:0.0.6                (depends on 4.20.0)
 [warn]      +- com.gu:fezziwig_2.12:0.8                           (depends on 4.18.0)
 [warn]  * com.twitter:util-core_2.12:7.1.0 is selected over 6.45.0
 [warn]      +- com.twitter:scrooge-core_2.12:4.20.0               (depends on 7.1.0)

Note: I haven't figured out how to reproduce the issue (this is based on a chance stack trace from @rupertbates), so there's no guarantee this fixes it. However, reducing eviction warnings is probably a good thing regardless.

PS Thanks to @davidfurey for helping me with this.

Trello Card

cc @JustinPinner

Changes

  • Bump versions of Cats, play-circe and fezziwig.

Copy link
Member

@JustinPinner JustinPinner left a comment

Choose a reason for hiding this comment

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

Looks sensible 👍 Do these bumps get rid of all of those evictions?

Copy link
Member

@rupertbates rupertbates left a comment

Choose a reason for hiding this comment

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

Did you try googling the error, or checking the docs to see when the missing method was removed?

@prout-bot
Copy link

Seen on PROD (merged by @Ap0c 8 minutes and 42 seconds ago) Please check your changes!

Sentry Release: support-client-side, support

@prout-bot
Copy link

✅ Testing in PROD passed! Details

@Ap0c Ap0c deleted the fix-binary-incompatability-warnings branch April 6, 2018 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants