0

I created a Play project using Play Java seed:

sbt new playframework/play-java-seed.g8

with the following options:

name [play-java-seed]: name
organization [com.example]:
scala_version [2.12.4]:
play_version [2.6.15]:
sbt_version [1.0.4]:

I got a lot of warnings after executing sbt run:

Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
[info] Loading settings from plugins.sbt,scaffold.sbt ...
[info] Loading project definition from E:\Play\name\project
[info] Updating {file:/E:/Play/name/project/}name-build...
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.webjars:webjars-locator-core:0.33 is selected over 0.32
[warn]      +- com.typesafe:npm_2.12:1.2.1                        (depends on 0.32)
[warn]      +- com.typesafe.sbt:sbt-web:1.4.3 (scalaVersion=2.12, sbtVersion=1.0) (depends on 0.32)
[warn]  * org.codehaus.plexus:plexus-utils:3.0.17 is selected over {2.1, 1.5.5}
[warn]      +- org.apache.maven:maven-settings:3.2.2              (depends on 3.0.17)
[warn]      +- org.apache.maven:maven-repository-metadata:3.2.2   (depends on 3.0.17)
[warn]      +- org.apache.maven:maven-aether-provider:3.2.2       (depends on 3.0.17)
[warn]      +- org.apache.maven:maven-model:3.2.2                 (depends on 3.0.17)
[warn]      +- org.apache.maven:maven-core:3.2.2                  (depends on 3.0.17)
[warn]      +- org.apache.maven:maven-artifact:3.2.2              (depends on 3.0.17)
[warn]      +- org.apache.maven:maven-settings-builder:3.2.2      (depends on 3.0.17)
[warn]      +- org.apache.maven:maven-model-builder:3.2.2         (depends on 3.0.17)
[warn]      +- org.sonatype.plexus:plexus-sec-dispatcher:1.3      (depends on 1.5.5)
[warn]      +- org.eclipse.sisu:org.eclipse.sisu.plexus:0.0.0.M5  (depends on 2.1)
[warn]  * com.google.guava:guava:23.0 is selected over {10.0.1, 16.0, 20.0}
[warn]      +- io.methvin:directory-watcher:0.3.2                 (depends on 23.0)
[warn]      +- com.fasterxml.jackson.datatype:jackson-datatype-guava:2.8.8 (depends on 10.0.1)
[warn]      +- org.eclipse.sisu:org.eclipse.sisu.plexus:0.0.0.M5  (depends on 10.0.1)
[warn]      +- com.spotify:docker-client:8.9.0                    (depends on 10.0.1)
[warn] Run 'evicted' to see detailed eviction warnings
[info] Loading settings from build.sbt ...
[info] Set current project to name (in build file:/E:/Play/name/)
[info] Updating {file:/E:/Play/name/}root...
[info] Done updating.
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * com.google.guava:guava:22.0 is selected over {19.0, 20.0}
[warn]      +- com.typesafe.play:play_2.12:2.6.15 ()              (depends on 22.0)
[warn]      +- org.reflections:reflections:0.9.11                 (depends on 20.0)
[warn]      +- com.google.inject:guice:4.1.0                      (depends on 19.0)
[warn]  * com.typesafe.akka:akka-stream_2.12:2.5.11 is selected over 2.4.20
[warn]      +- com.typesafe.play:play-streams_2.12:2.6.15 ()      (depends on 2.5.11)
[warn]      +- com.typesafe.akka:akka-http-core_2.12:10.0.13 ()   (depends on 2.4.20)
[warn]  * com.typesafe.akka:akka-actor_2.12:2.5.11 is selected over 2.4.20
[warn]      +- com.typesafe.play:play_2.12:2.6.15 ()              (depends on 2.5.11)
[warn]      +- com.typesafe.akka:akka-stream_2.12:2.5.11 ()       (depends on 2.5.11)
[warn]      +- com.typesafe.akka:akka-slf4j_2.12:2.5.11 ()        (depends on 2.5.11)
[warn]      +- com.typesafe.akka:akka-parsing_2.12:10.0.13 ()     (depends on 2.4.20)
[warn] Run 'evicted' to see detailed eviction warnings

--- (Running the application, auto-reloading is enabled) ---

[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

(Server started, use Enter to stop and go back to the console...)

I have java 9.0.4 and sbt 1.1.0 installed on my machine.

Thank you in advance for your answers.

Mario Galic
  • 47,285
  • 6
  • 56
  • 98
Carlsen
  • 1
  • 2

1 Answers1

0

There is a Github issue open for these eviction warnings. Since Play is mature and widely used framework, it is most likely safe to ignore these warnings. There are three potential options:

  1. keep the warnings visible until Play project fixes them
  2. hide the warnings via evictionWarningOptions
  3. manually override dependencies via dependencyOverrides

Personally I would suggest the first option.

Here is a bit about eviction warnings. Consider the following warning:

[warn]  * com.typesafe.akka:akka-stream_2.12:2.5.11 is selected over 2.4.20
[warn]      +- com.typesafe.play:play-streams_2.12:2.6.15 ()      (depends on 2.5.11)
[warn]      +- com.typesafe.akka:akka-http-core_2.12:10.0.13 ()   (depends on 2.4.20)

It states play-streams and akka-http-core both depend on akka-stream, however they depend on different versions of it. By default SBT resolves the conflict by selecting the higher version, namely 2.5.11. Note how this makes akka-http-core depend on 2.5.11 even though it was only ever compiled against 2.4.20, in other words, it now depends on a library from the future against which it was never tested. If 2.5.11 is not compatible with 2.4.20, then this might introduce errors in the project. An analogy would be, say you have a car built in 2001, but then you blindly install an engine from 2002. Will the car now behave as it did in 2001? If thousands of drivers have been driving this car with no problems, it is probably safe.

Mario Galic
  • 47,285
  • 6
  • 56
  • 98