mirror of https://github.com/sbt/sbt.git
More agressive overwrite.
This commit is contained in:
parent
cca5b7e2f7
commit
63aa36bd1e
|
|
@ -107,9 +107,8 @@ object SessionSettings
|
|||
val (_, oldShifted, replace, lineMap) = ((0, List[Setting[_]](), List[SessionSetting](), Map.empty[Int, (Int, List[String])]) /: inFile) {
|
||||
case ((offs, olds, repl, lineMap), s) =>
|
||||
val RangePosition(_, r@LineRange(start, end)) = s.pos
|
||||
def depends(s: Setting[_]) = !s.init.dependencies.isEmpty
|
||||
settings find (_._1.key == s.key) match {
|
||||
case Some(ss@(ns, newLines)) if !depends(s) && !depends(ns) =>
|
||||
case Some(ss@(ns, newLines)) if !ns.init.dependencies.contains(ns.key) =>
|
||||
val shifted = ns withPos RangePosition(path, LineRange(start - offs, start - offs + 1))
|
||||
(offs + end - start - newLines.size, shifted::olds, ss::repl, lineMap + (start -> (end, newLines)))
|
||||
case _ =>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
k1 := {error("k1")}
|
||||
|
||||
k2 := {
|
||||
}
|
||||
|
||||
k2 <<= k1 map identity
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
k1 := {}
|
||||
|
||||
k2 := {
|
||||
}
|
||||
|
||||
k2 <<= k1 map identity
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
k1 := {}
|
||||
|
||||
k2 := {}
|
||||
|
||||
k1 <<= k1 map {_ => error("k1")}
|
||||
|
||||
Loading…
Reference in New Issue