Manual cross building requires changing scalaVersion and scalaBinaryVersion

130 views
Skip to first unread message

eugene yokota

unread,
Jun 27, 2012, 8:26:50 AM6/27/12
to simple-b...@googlegroups.com
Hi,

I have a project that I am able to run "+ compile" normally, but doing 
`set scalaVersion := "2.8.1"` confuses what I'm building.

    scalaxb> scala-version
    [info] 2.9.2
    scalaxb> set scalaVersion := "2.8.1"
    [info] Reapplying settings...
    [info] Set current project to scalaxb (in build file:/Users/eed3si9n/work/scalaxb/)
    scalaxb> scala-version
    [info] 2.8.1
    scalaxb> compile
    [info] Updating {file:/Users/eed3si9n/work/scalaxb/}app...
    [warn] Binary version (2.8.1) for dependency org.scala-lang#scala-library;2.8.1
    [warn]  in org.scalaxb#scalaxb_2.9.2;0.7.2-SNAPSHOT differs from Scala binary version in project (2.9.2).
    [info] Resolving org.scala-lang#scala-library;2.8.1 ...
    [info] Resolving com.github.scopt#scopt_2.9.2;2.0.1 ...

Now that `inspect tree` is part of the sbt, let's use it:

    scalaxb> inspect tree ivy-scala
    [info] app/*:ivy-scala = Some(IvyScala(2.8.1,2.9.2,List(),true,true,true))
    [info]   +-*/*:scala-home = None
    [info]   +-app/*:scala-version = 2.8.1
    [info]   +-*/*:scala-binary-version = 2.9.2

2.9.2?!

    scalaxb> set scalaBinaryVersion := "2.8.1"
    [info] Reapplying settings...
    [info] Set current project to scalaxb (in build file:/Users/eed3si9n/work/scalaxb/)
    scalaxb> compile
    [success] Total time: 0 s, completed Jun 27, 2012 8:22:41 AM

Is this how it's going to play out?

-eugene

Mark Harrah

unread,
Jun 28, 2012, 9:20:32 AM6/28/12
to simple-b...@googlegroups.com
Yes, I know. Unfortunately, it is another instance of the intermediate settings problem, #391. +compile overrides the scala version everywhere, which is why it works. It is equivalent to 'set every scalaVersion := "X"' instead of plain 'set scalaVersion := "X"'. 'set every' is new for 0.12.

-Mark

[#391] https://github.com/harrah/xsbt/issues/391

> -eugene
>

Reply all
Reply to author
Forward
0 new messages