Skip to content
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

sbt-missinglink complains about shapeless in Scala 2.13 #1021

Open
diesalbla opened this issue May 13, 2020 · 9 comments
Open

sbt-missinglink complains about shapeless in Scala 2.13 #1021

diesalbla opened this issue May 13, 2020 · 9 comments

Comments

@diesalbla
Copy link

diesalbla commented May 13, 2020

WE have a project, in which we are using several packages that depend on shapeless, and for which we are using the version 2.13.2 of Scala. I have analysed the build with the https://github.com/scalacenter/sbt-missinglink plugin, and running the missingLinkCheck command I got the following messages:

[info] 4 conflicts found!
[error] Category: Class being called not found
[error]   In artifact: shapeless_2.13-2.3.3.jar
[error]     In class: shapeless.ScalaVersionSpecifics
[error]       In method:  implicitNotFoundMessage(scala.reflect.macros.whitebox.Context, scala.reflect.api.Types$TypeApi):29
[error]       Call to: scala.tools.nsc.typechecker.Implicits$Message.formatDefSiteMessage(scala.reflect.internal.Types$Type)
[error]       Problem: Class not found: scala.tools.nsc.typechecker.Implicits$Message
[error]       --------
[error]       In method:  implicitNotFoundMessage(scala.reflect.macros.whitebox.Context, scala.reflect.api.Types$TypeApi):28
[error]       Call to: scala.tools.nsc.Global.analyzer()
[error]       Problem: Class not found: scala.tools.nsc.Global
[error]       --------
[error]       In method:  implicitNotFoundMessage(scala.reflect.macros.whitebox.Context, scala.reflect.api.Types$TypeApi):28
[error]       Call to: scala.tools.nsc.typechecker.Analyzer.ImplicitNotFoundMsg()
[error]       Problem: Class not found: scala.tools.nsc.typechecker.Analyzer
[error]       --------
[error]       In method:  implicitNotFoundMessage(scala.reflect.macros.whitebox.Context, scala.reflect.api.Types$TypeApi):28
[error]       Call to: scala.tools.nsc.typechecker.Implicits$ImplicitNotFoundMsg$.unapply(scala.reflect.internal.Symbols$Symbol)
[error]       Problem: Class not found: scala.tools.nsc.typechecker.Implicits$ImplicitNotFoundMsg$
[error]       --------

Has anyone seen a similar errors?

@joroKr21
Copy link
Collaborator

But those are scala-compiler classes not shapeless classes 🤔

@plokhotnyuk
Copy link

AFAIK binary compatibility is not guaranteed for the Scala compiler between patch versions.

@joroKr21
Copy link
Collaborator

Right but this method implicitNotFoundMessage is called in macros at compile time.

@milessabin
Copy link
Owner

milessabin commented May 13, 2020

@diesalbla is this causing a problem for your build, other than the report from sbt-missinglink?

@milessabin
Copy link
Owner

It looks to me as though sbt-missing link isn't aware of the internal compiler classes that shapeless uses. Does it have scala-compiler.jar on its classpath?

@diesalbla
Copy link
Author

@milessabin Sorry, it has been a little while since this error first happen, and it somehow went away. For some projects, we use the missing link check as part of our code sanity checks. Could it be that sbt-missinglink would not include the scala-compiler.jar in its classpath, if it is only used at compile time?

@jendakol
Copy link

It has just happened to me 😞 SBT 1.4.7, Scala 2.13.4, missinglink 0.3.1, shapeless 2.3.3. Solved by excluding the Shapeless from Missinglink... 😐

@joroKr21
Copy link
Collaborator

Does it also happen with 2.3.4?

@joroKr21
Copy link
Collaborator

Those classes are called at compile time by macros - maybe the issue is with sbt-missinglink

@joroKr21 joroKr21 changed the title Possible Binary Incompatibility in Scala 2.13 sbt-missinglink complains about shapeless in Scala 2.13 Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants