Scala/SBT plugin copies dependent project into IntelliJ Cache now, how do I undo this?

Hi,

For a while now I've had two projects, where project A is dependent on project B. Their project/build.scala files were set up like the following:

Project A:

import sbt._

object A extends Build {
  lazy val A = Project("A", file(".")) aggregate(B) dependsOn(B)
  lazy val B = RootProject(file("../B"))
}

Project B:

import sbt._

object B extends Build {
  lazy val B = Project("B", file("."))
}


(this comes from https://github.com/mpeltonen/sbt-idea - section "Project with dependencies")

This setup enables SBT to automatically download and build the right version of Project B from github whenever Project A is built, which is pretty handy. Project B is downloaded into my ~/.sbt directory.

For a while now, I've used IntelliJ + Scala & SBT plugins to edit my code. IntelliJ would handle Project B by locating the downloaded sources in the ~/.sbt folder and showing them in the Project window. This made it easy to edit Project B and then build both projects with SBT.

Sometime over the last week, however, IntelliJ started handling this situation differently. It now makes a copy of the dependent project into its own cache directory (ex: /Users/[username]/Library/Caches/IdeaIC13/SBT), and shows those files. This is annoying because SBT doesn't know about IntelliJ's cache directory, and uses the sources in the .sbt folder. Therefore, any edits I make in IntelliJ regarding Project B are ignored.

Did a change recently happen to the Scala plugin? Does anyone know how I can revert IntelliJ back to the old behavior?

Thanks!

2 comments
Comment actions Permalink

I know this isn't ideal, but as a work around maybe try symlinking the intellij cache folder to point to project b's folder or vice-versa.

0
Comment actions Permalink

I created an issue not to forget about this problem when Pavel Fatin will return from vacation: http://youtrack.jetbrains.com/issue/SCL-7310

Best regards,
Alexander Podkhalyuzin.

0

Please sign in to leave a comment.