These are chat archives for sbt/sbt

12th
Mar 2017
Jan Christopher Vogt
@cvogt
Mar 12 00:46
zinc does not clean out .class files for sources files that no longer exist, does it?
meaning currently you’d have to do a clean whenever that leads to weird compile errors
is there a ticket about this already?
Pradyuman Vig
@pradyuman
Mar 12 02:40
I'm having an issue where grpc-java uses a different guava version than datastax cassandra driver. They both use features only available in their respective guava versions so I can't just override the version. Is there any way for me to include both versions?
Jan Christopher Vogt
@cvogt
Mar 12 02:42
@pradyuman you could build one of them yourself and produce a shaded (= package renamed) fatjar and use that
actually, you don’t have to even build one yourself
just create an empty sbt project that has a dependency on it and do something like this: https://github.com/wsargent/shade-with-sbt-assembly
Pradyuman Vig
@pradyuman
Mar 12 02:45
How do I create an empty sbt project? That means having two projects in the same repo
I am using Phantom and phantom itself has a dependency on the java driver. What I'd want to do is shade phantom's guava dependency.
I currently have one project that looks like this:
libraryDependencies ++= Seq(
  "com.outworkers" %% "phantom-dsl" % "2.2.0",
  "org.scalacheck" %% "scalacheck" % "1.13.4" % "test",
  "org.scalatest" %% "scalatest" % "3.0.1" % "test"
)

assemblyShadeRules in assembly := Seq(
  ShadeRule.rename("com.google.guava.**" -> "shadeio.@1")
    .inLibrary("com.outworkers" %% "phantom-dsl" % "2.2.0")
)
Jan Christopher Vogt
@cvogt
Mar 12 02:47
Can you pick any of your direct dependencies for shading? Anyways. Shading is one option you have :). There may be better ones. Good luck!
Pradyuman Vig
@pradyuman
Mar 12 02:48
neither of them are direct dependencies :/
Jan Christopher Vogt
@cvogt
Mar 12 02:49
another probably better option: upgrade the project with the older dependency to use the new one, create a PR and in the meantime publish it locally
Pradyuman Vig
@pradyuman
Mar 12 02:50
I'll probably do that
thanks!
Jan Christopher Vogt
@cvogt
Mar 12 02:51
yw :)