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
Json4s brings in scalap-2.10.0 dependencies regardless of scalaVersion setting #108
Comments
You can override this by explicitly depending on scalap for your scala version. If I want to be certain json4s behaves on all scala 2.10 versions then I need to compile it with 2.10.0 and leave the scala choice up to the user. or I have to publish a json4s version for each scala 2.10 version which is even less desirable I think. |
I wonder why json4s does need a scala compiler as a runtime dependency. |
because we need to read the byte code to find out information about scala primitives. This is more necessary on 2.9 than it is on 2.10 |
Thanks for your answer. |
This adds about ~18 MB worth of dependencies. 18Mb for working with json. Are you serious? |
I welcome a pull request that makes reflection work otherwise also for 2.9. |
Does json4s build for scala 2.11 need reflection to work for 2.9? |
This dependency is for the native version and also for the jackson version, http://mvnrepository.com/artifact/org.json4s/json4s-core_2.10/3.2.10 2014-07-02 12:49 GMT+02:00 enlait notifications@github.com:
|
json4s prior to 3.3 had a transitive dependency on scala-compiler - a 10MiB JAR. json4s/json4s#108
Apache Spark uses json4s and this issue broke my scala 2.11 project build. I had to explicitly exclude scalap and scala-library like libraryDependencies ++= Seq(
// dependencies ...
).map {
_.exclude("org.scala-lang", "scalap").exclude("org.scala-lang", "scala-library")
} otherwise sbt gets confused by the scala-library pulled by json4s, and IntelliJ won't even let me open the project. Is it fixed in 3.3.0? |
Yes, it is. This issue doesn't happen in 3.3 because json4s 3.3 has its own scalap fork and doesn't depend on scala-lang's scalap. |
With the following build.sbt:
I get the following inside SBT:
Note the scalap-2.10.0, scala-compiler-2.10.0 and scala-reflect-2.10.0 dependencies. Using the sbt-dependency-graph plugin I've narrowed it down to the scalap dependency. You can work around this by adding an explicit dependency on
"org.scala-lang" % "scalap" % scalaVersion.value
in your build.sbt but this should really be fixed in Json4sThe text was updated successfully, but these errors were encountered: