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

Support the sbt/zinc build #36

Open
dwijnand opened this issue Apr 12, 2019 · 2 comments
Open

Support the sbt/zinc build #36

dwijnand opened this issue Apr 12, 2019 · 2 comments

Comments

@dwijnand
Copy link

I had to switch back to regular sbt-extras because the coursier-based one (https://github.com/coursier/sbt-extras) that uses this launcher doesn't completely work inside sbt/zinc's build.

It fails to correctly feed the compiler-interface dependency (xsbti) when compiling the compiler-bridge (xsbt) for anything other than Scala 2.12 (the default version):

> compilerBridge210/compile
[info] Compiling 24 Scala sources to /d/zinc/internal/compiler-bridge/target-2.10/scala-2.10/classes ...
[info] Non-compiled module 'compiler-bridge_2.10' for Scala 2.10.7. Compiling...
/var/folders/8r/km1jjvy15md88bvtrzvmn0rw0000gn/T/sbt_25bfa7c6/xsbt/API.scala:12: error: object api is not a member of package xsbti
import xsbti.api._
             ^
...

cc @jvican

@alexarchambault
Copy link
Member

That seems to originate from some issues with the DependencyResolution that sbt-lm-coursier provides via the dependencyResolution key. (sbt-lm-coursier being the coursier plugin injected by default by the coursier-based sbt launcher.)

As a workaround, one can manually add sbt-coursier (addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.1.0-M13-4") in project/project/plugins.sbt, then addSbtCoursier in project/plugins.sbt). That way, the sbt launcher doesn't try to inject sbt-lm-coursier.

@alexarchambault
Copy link
Member

In more details, the issue with the DependencyResolution from sbt-lm-coursier has to see with inter-project dependencies. Namely, there's a org.scala-sbt:compiler-interface project in the zinc build. It takes over any org.scala-sbt:compiler-interface dependency in the build. Which is an issue with org.scala-sbt:compiler-bridge_2.10:1.2.5, that should have directly pulled org.scala-sbt:compiler-interface:1.2.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants