These are chat archives for sbt/sbt

13th
Dec 2015
Mirco Dotta
@dotta
Dec 13 2015 07:50
@pfn I guess that would work if I had a proper sbt project to use for scoping, but I don’t. What I ended up doing is creating a configuration, scoping the ModuleID to the created configuration, and then use update in <my-configuration>.value.allFiles. That seems to give me all transitive dependencies. If I use instead dependencyClasspath in <my-configuration> I get back an error References to undefined settings: foo/<my-configuration>:dependencyClasspath from foo/*:<my-task>
Dale Wijnand
@dwijnand
Dec 13 2015 13:18
TIL the scalaBinaryVersion for 2.12.0-M3 is 2.12.0-M3
matanster
@matanster
Dec 13 2015 13:44

While your attention has very incidentally been on scalaBinaryVersion for a moment - is there a special way for getting the scala binary version for a sub-project? I seem to get the version of the root project by simply using that scalaBinaryVersion, so I assume that's not the way for getting the scala version for a subproject. This is for an sbt plugin that needs to inject the right binary version of a compiler plugin into the compilation phase of each sub-project in multiple-project builds.
Currently in this sbt plugin I iterate over the sub-projects as follows

val extracted: Extracted = Project.extract(state)
 val newSettings: Seq[Def.Setting[Task[Seq[String]]]] = extracted.structure.allProjectRefs map { projRef =>
.
.
.

And relying on scalaBinaryVersion fails me there..
This just popped up while CANVE/extractor#12. I assume one can derive it from the project ref.

matanster
@matanster
Dec 13 2015 13:50
I would need to have libraryDependencies += compilerPluginOrg % (compilerPluginArtifact + "_" + scalaBinaryVersion.value) % compilerPluginVersion at the subproject level in order to pull in the right compiler plugin per sub-project, but for that I need to obtain the correct binary version...
Dale Wijnand
@dwijnand
Dec 13 2015 14:09
yeah variant cross build lists in a multi-module project is broken, there's an alternative implementation available as a plugin: https://github.com/sbt/sbt-doge use that
It was implemented by @eed3si9n as an external plugin to iterate and trial it out, but given it's use (even within the build for the sbt sources) and success I think it might become the new implementation in 1.0
matanster
@matanster
Dec 13 2015 16:27
I think the problem here is different, as I can easily get the binary version of each subproject with (scalaBinaryVersion in projRef). What I can't do is then add the corresponding binary version of a compiler plugin to the project. It seems that appending to libraryDependencies in projRef takes no effect. Moved this to StackOverflow
matanster
@matanster
Dec 13 2015 17:13
@dotta would you care sharing your solution? maybe your approach would be applicable to my problem with updating dependencies
Sam Halliday
@fommil
Dec 13 2015 17:43
@dwijnand this is the project I was talking about yesterday https://github.com/fommil/sbt-big-project
taking a break from it today, but I'll be back on it tomorrow
Dale Wijnand
@dwijnand
Dec 13 2015 19:48
@fommil yeah I've seen you reference to it