How can I debug (compile) build.sbt as a Scala program?
Working on a large Scala (sbt) project (36 sub-projects) that has not been updated in a while. Getting some strange compilation errors on build.sbt, having to do with the changes in the sbt API between sbt 0.13 and 1.5. Some expressions just will not compile, and I would like to take a closer look at the types. I would like to put the text of build.sbt inside a Scala file, to see why it does not compile.
The build (with some parts cut out) works using sbt from a Linux command line. But in IntelliJ it's all red (errors), all the types are shown as "Any", etc. So I cannot figure out why some expressions (currently commented out) will not compile.
I expect to be able to do something like this (in a different project, created for this purpose):
SomeFileName.scala
import sbt._ // What should I import here?
import sbt.Keys._
class SomeFileName {
// paste the contents of the build.sbt file here
}
I expect this SomeFileName.scala to be a normal Scala class. Maybe it will have compilation errors, and I will be able to see exactly what they are, what the sbt API is, and figure out what is wrong with my build file.
How can I do that?