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

`scalaInstance.allJars` doesn't include scala-compiler.jar depending on Scala version #3560

Closed
jastice opened this issue Sep 19, 2017 · 4 comments
Labels
Milestone

Comments

@jastice
Copy link
Contributor

@jastice jastice commented Sep 19, 2017

Using any scalaVersion setting other than "2.12.3", scalaInstance.allJars will be missing the scala-compiler.jar.

IntelliJ depends on this task to setup the compiler classpath when not using sbt directly.
Corresponding ticket: https://youtrack.jetbrains.com/issue/SCL-12591

steps

  • in build.properties:
sbt.version = 1.0.2
  • in build.sbt
scalaVersion := "2.12.1"

Run consoleProject on sbt shell:

> consoleProject

scala> scalaInstance.eval.allJars
res0: Array[java.io.File] = Array(/Users/jast/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.12.1.jar, /Users/jast/.ivy2/cache/org.scala-lang.modules/scala-xml_2.12/bundles/scala-xml_2.12-1.0.6.jar, /Users/jast/.ivy2/cache/jline/jline/jars/jline-2.14.1.jar)

Compare using scalaVersion := "2.12.3"

> consoleProject

scala> scalaInstance.eval.allJars
res2: Array[java.io.File] = Array(/Users/jast/.sbt/boot/scala-2.12.3/lib/jline.jar, /Users/jast/.sbt/boot/scala-2.12.3/lib/scala-compiler.jar, /Users/jast/.sbt/boot/scala-2.12.3/lib/scala-library.jar, /Users/jast/.sbt/boot/scala-2.12.3/lib/scala-reflect.jar, /Users/jast/.sbt/boot/scala-2.12.3/lib/scala-xml_2.12.jar)    

notes

sbt version: 1.0.0 - 1.0.2

@eed3si9n
Copy link
Member

@eed3si9n eed3si9n commented Sep 19, 2017

Thank you for the fix.

@smarter
Copy link
Contributor

@smarter smarter commented Sep 20, 2017

Duplicate of #3491 ?

@eed3si9n
Copy link
Member

@eed3si9n eed3si9n commented Sep 20, 2017

Yup.

@eed3si9n
Copy link
Member

@eed3si9n eed3si9n commented Sep 20, 2017

Fixed in #3561

@eed3si9n eed3si9n closed this Sep 20, 2017
@dwijnand dwijnand added this to the 1.0.3 milestone Sep 22, 2017
zimmermatt added a commit to Netflix/atlas that referenced this issue Oct 26, 2017
scala version must be 2.12.3 due to
sbt/sbt#3560.
djmittens pushed a commit to djmittens/jiggly that referenced this issue Nov 15, 2017
This turns out to be a problem with bullshit in sbt v1.0.1
Bumping it to 1.0.3 is supposed to fix it but it broke in a different
way:

https://youtrack.jetbrains.com/issue/SCL-12591
https://intellij-support.jetbrains.com/hc/en-us/community/posts/207303905-New-IntelliJ-Bug
sbt/sbt#3561
sbt/sbt#3560
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.