question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dependency on both lightbend and typelevel versions of scala-library

See original GitHub issue

I am trying to bundle an app that depends on freestyle as a single jar using sbt-assembly and i am getting conflicts about duplicate classes from scala-library. The issue seems to come from iota which shows this dependency tree including both versions of the scala-library (the tree is generated using https://github.com/jrudolph/sbt-dependency-graph):

[info] io.frees:freestyle_2.12:0.2.1-SNAPSHOT [S]
[info]   +-com.47deg:iota-core_2.12:0.2.0
[info]   | +-org.typelevel:cats-core_2.12:0.9.0
[info]   | | +-com.github.mpilquist:simulacrum_2.12:0.10.0
[info]   | | | +-org.scala-lang:scala-library:2.12.2
[info]   | | | +-org.typelevel:macro-compat_2.12:1.1.1
[info]   | | |   +-org.scala-lang:scala-library:2.12.2
...
[info]   | +-org.typelevel:scala-library:2.12.1
...

I have searched this repo and the only reference to typelevel seems to be in the scalaOrganization at file https://github.com/47deg/iota/blob/master/project/ProjectPlugin.scala which may also explain why i am getting org.scala-lang:scala-library in version 2.12.2 and org.typelevel:scala-library in version 2.12.1. It seems that the scalaOrganization defined as typelevel or some other sbt configuration may be causing the problem. Ideally since most projects will already include org.scala-lang:scala-library anyway it may be better if no dependency on the typelevel version existed although i am not sure about the implications of this.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
andyscottcommented, Sep 4, 2017

I finally got a fix together. Awaiting review and merge of #63.

0reactions
andyscottcommented, Sep 4, 2017

Sure thing. It wound up being substantially more complicated originally anticipated due to a slew of SBT plugins and the need for cross building across different Scala versions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Library build dependencies
This page lists the build dependency information for the latest versions of Lightbend Platform libraries. To take full advantage of Lightbend Platform, ...
Read more >
Prerequisites | Scala 3 Migration Guide
For each of these macro dependencies in your project, you need to upgrade it to a cross-built version—a version available on both Scala...
Read more >
Cats - Typelevel
Cats is a library which provides abstractions for functional programming in the Scala programming language. Scala supports both object-oriented and functional ...
Read more >
Reflections on using Typelevel Scala - kubuszok.com
Latest such version was Typelevel Scala 4 based on Lightbend Scala ... (There are some issues when it comes to settings up dependencies, ......
Read more >
sbt/sbt - Gitter
excludeDependencies += "org.typelevel" % "scala-library" does it, thank you. Still, this is also dangerous since we can end up in the reverse situation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found