title: parboiled2 and Spray cause conflicting cross-version suffixes
body: <p>I'm trying to add parboiled2 as a dependency to my project, and follow the Calculator example but it conflicts with spray.</p>
  
  <p>My current <code>build.sbt</code> file includes:</p>
  
  <pre><code>"io.spray" %% "spray-json" % "1.3.1" withSources() withJavadoc(),
  "io.spray" %% "spray-can" % sprayV withSources() withJavadoc(),
  "io.spray" %% "spray-routing" % sprayV withSources() withJavadoc(),
  "io.spray" %% "spray-testkit" % sprayV  % "test" withSources() withJavadoc(),
  </code></pre>
  
  <p>When I add</p>
  
  <pre><code>"org.parboiled" %% "parboiled" % "2.0.1" withSources() withJavadoc(),
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>[error] Modules were resolved with conflicting cross-version suffixes in {file:/blar/blar}blar-blar:
  [error]    com.chuusai:shapeless _2.10.4, _2.10
  [error]    org.scalamacros:quasiquotes _2.10, _2.10.3
  java.lang.RuntimeException: Conflicting cross-version suffixes in: com.chuusai:shapeless, org.scalamacros:quasiquotes
  </code></pre>
  
  <p>So did some googling, and as usual people suggest using the <code>exclude</code> directive of SBT (which I don't believe makes logical sense as it will inevitably result in problems like <code>ClassNotFoundException</code> and <code>NoSuchMethodError</code>).  I tried it nevertheless:</p>
  
  <pre><code>"org.parboiled" %% "parboiled" % "2.0.1" withSources() withJavadoc() 
    exclude("com.chuusai", "shapeless_2.10.4") exclude("org.scalamacros", "quasiquotes_2.10")
  </code></pre>
  
  <p>And surprise surprise when I try to run <code>assembly</code> I get</p>
  
  <pre><code>[error] java.lang.ClassNotFoundException: scala.quasiquotes.QuasiquoteCompat$
  </code></pre>
  
  <p>I also get a load more errors:</p>
  
  <pre><code>[error] bad symbolic reference
  . A signature in RuleDSLBasics.class refers to term internal
  [error] in package scala.reflect which is not available.
  [error] It may be completely missing from the current classpath, or the version on
  [error] the classpath might be incompatible with the version used when compiling RuleDSLBasics.class.
  [error] error while loading RuleDSLBasics, Missing dependency 'bad symbolic reference. A signature in RuleDSLBasics.class refers to term annotations
  [error] in value scala.reflect.internal which is not available.
  [error] It may be completely missing from the current classpath, or the version on
  [error] the classpath might be incompatible with the version used when compiling RuleDSLBasics.class.', required by ...
  </code></pre>
  
  <p>If I comment out the Spray dependencies (and code) I can successfully assembly a jar with the Calculator example.</p>
  
  <p>This is a major show stopper for me using parboiled2.  Is there some way other than <code>exclude</code> directives in order to make this stuff work?  Does anyone have a working build file with both Spray and parboiled2? If someone has managed to get around dependency hell with onejar or ProGuard I'd love it if they could explain just how.</p>
  
  <p>UPDATE:</p>
  
  <p>My build file:</p>
  
  <pre><code>resolvers ++= Seq(
    "Concurrent Maven Repo" at "http://conjars.org/repo",
    "spray repo" at "http://repo.spray.io"
  )
  
  val akkaV = "2.3.6"
  val sprayV = "1.3.2"
  
  libraryDependencies ++= Seq(
    "org.parboiled" %% "parboiled" % "2.0.1" withSources() withJavadoc(),
    // Causes org.scalamacros:quasiquotes _2.10, _2.10.3 cross-version problem
    "io.spray" %% "spray-testkit" % sprayV  % "test" withSources() withJavadoc(),
    // Causes com.chuusai:shapeless _2.10.4, _2.10 cross-version problem
    "io.spray" %% "spray-routing" % sprayV withSources() withJavadoc()
  )
  
  scalaVersion := "2.10.4"
  
  javaOptions ++= Seq("-target", "1.8", "-source", "1.8")
  
  organization := domain + "." + companyName
  </code></pre>
  
  <p>Plugins file:</p>
  
  <pre><code>addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.12.0")
  
  addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")
  </code></pre>
  
  <h2>Scala 2.11</h2>
  
  <p>It seems "simply" moving 2.11 may solve this, but this isn't always that easy if one has some other libraries that are not 2.11 ready.  Nevertheless I tried it, and the second I added parboiled2 as a dependency it broke my build again, sigh, here is the new problem: <a href="https://stackoverflow.com/questions/27942110/parboiled2-causes-missing-or-invalid-dependency-detected-while-loading-class-fi">Parboiled2 causes &quot;missing or invalid dependency detected while loading class file &#39;Prepender.class&#39;&quot;</a></p>