score:0
depending on how complex is the subset of the library that you use, it may be possible to write a wrapper around slick objects that has the interface similar to 2.1.0 (only for things that are actually used) but implemented in terms of 3.0.0. it may be non-trivial and time consuming though.
score:1
afaik this can't be done, because you can only have one version of a dependency in the classpath. even if there was a way to force it, there would be no way to differentiate which version you want when you import.
could be worth looking into osgi as java/maven/etc suffer from the same problem because of how the jvm classloader works.
score:3
having the newer version classes override the older version classes if exists
i believe this is impossible.
what you've encountered is commonly known as "jar hell". the only way i know of to work around it is by using shaded depenedencies (see https://github.com/sbt/sbt-assembly#shading for one example), but that causes other problems.
the cleanest solution (which is unfortunately also the most work) is to just bite the bullet and solve all the issues at once.
Source: stackoverflow.com
Related Query
- Scala SBT: Can you import two different versions of the same dependency into one build file?
- Can the same Scala source file be compiled into class files containing different @ScalaSignature annotations?
- I have two scala projects - basically the same - one works and one does not. Can someone tell me why?
- Two libraries bring in different version of the same dependency. How to import them both?
- Why does sbt download a different Scala version than the one in build.sbt?
- How to create a generic function that can be applied to two one or more types containing the same parameters?
- How to setup different Scala versions on the same machine?
- Can two variables reference the same object and both change values, when one is changed
- Scala matching, resolving the same variable from two different patterns
- Can you import user-defined scala classes into proto?
- How can two different class extend same class return same type in Scala
- how can I write a function in scala called Order that takes one arguement: a list of Ints. And returns the same List of Ints from least to greatest
- How to create new commands that you can run after running the sbt command Scala
- Why does sbt use a different version of Scala to the one I asked for?
- How to map two different urls in a Akka-HTTP: one url with param and the same without the param?
- How can I apply the same Pattern on two different Kafka Streams in Flink?
- Can I create a proto jar for scalaVersion 2.11/2.12 and use it within the same sbt under different sub-project?
- Extract emojis from Dataframe column and add them into a different Column of the same Dataframe Scala Spark
- Do I need to re-use the same Akka ActorSystem or can I just create one every time I need one?
- how do I get sbt to gather all the jar files my code depends on into one place?
- Can you start a Scala REPL in SBT when compilation is broken?
- When using Scala futures, will chained callbacks with the same execution context be optimised into synchronous calls?
- Can I use the Scala lift-json library to parse a JSON into a Map?
- Can a Scala script reference other uncompiled scala code in the same directory?
- What's the relationship of the versions of scala when I use sbt to build a scala project?
- Can you override the stream writers in scala @serializable objects?
- How can I use a library dependency in the definition of an sbt task?
- Transform one case class into another when the argument list is the same
- How can I manage multiple versions of Scala & SBT in my dev environment?
- Scala Puzzle: enforcing that two function arguments are of the same type AND both are a subtype of a given class
More Query from same tag
- How do I update an HTML class from a CometActor
- TypeError Expected: Result, Actual: Future[SimpleResult]
- Play 2.2 EssentialAction With Futures
- Join multiple dataframes in scala
- Scala - construct method name from generic type?
- Intertwine all the request to a single one
- Scala: Assign names to anonymous objects in List
- Import package as another
- How to extract information from ClassFileAnnotArg in Scala 2.10
- What means "xs @ _*" in PathList of SBT assembly-plugin?
- Caused by: java.lang.ClassNotFoundException: net.jpountz.lz4.LZ4BlockOutputStream
- Caching implicit resolution
- how to get java.io.file by using play.WS?
- ZIO, Getting started, pure functional downloader
- Spark Streaming filter condition inside foreach - NullPointerException
- Why can't I convert this type into a generic one?
- How to get form values on click of save button in orbeon
- Slick PostgreSQL Integration
- How to convert a map to Spark's RDD
- SQLServerException: No column name was specified for column 1 of 'bounds'
- Writing List of tuple into a file in Scala
- Why does Numeric treat unary differently to binary?
- How do you use StaticQuery.update in Slick with parameters?
- Hive- Quicker way to check for data
- Parameterized Option Type
- Spark - How to take logarithm of every value minus smallest element in a column
- Spark filter based on the max date record
- Spark UDAF dynamic input schema handling
- How do I print the contents of an ApacheSpark RDD in my terminal?
- Are there any Scala template engines other than scalate?