mirror of https://github.com/sbt/sbt.git
Make bare setting loading order alphabetical
Fixes https://github.com/sbt/sbt/issues/2697 Ref https://twitter.com/not_xuwei_k/status/1230140477959286848 Note that this is could potentially break an existing build that was relying on previous behavior, which seem to return `build.sbt` at the end if you have `a.sbt`, `b.sbt`, `c.sbt`, and `build.sbt`.
This commit is contained in:
parent
523795e204
commit
4b847b148f
|
|
@ -8,6 +8,7 @@
|
|||
package sbt
|
||||
|
||||
import java.io.File
|
||||
import java.util.Locale
|
||||
import KeyRanks.DSetting
|
||||
|
||||
import sbt.io.{ GlobFilter, Path }
|
||||
|
|
@ -114,7 +115,9 @@ object BuildPaths {
|
|||
private[this] def defaultDependencyBase(globalBase: File) = globalBase / "dependency"
|
||||
private[this] def defaultGlobalZinc(globalBase: File) = globalBase / "zinc"
|
||||
|
||||
def configurationSources(base: File): Seq[File] = (base * (GlobFilter("*.sbt") - ".sbt")).get
|
||||
def configurationSources(base: File): Seq[File] =
|
||||
(base * (GlobFilter("*.sbt") - ".sbt")).get
|
||||
.sortBy(_.getName.toLowerCase(Locale.ENGLISH))
|
||||
def pluginDirectory(definitionBase: File) = definitionBase / PluginsDirectoryName
|
||||
|
||||
def evalOutputDirectory(base: File) = outputDirectory(base) / "config-classes"
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Compile / scalacOptions += "a"
|
||||
|
|
@ -0,0 +1 @@
|
|||
Compile / scalacOptions += "b"
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
val check = taskKey[Unit]("")
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
Compile / scalacOptions += "multi-project",
|
||||
check := {
|
||||
val xs = (Compile / scalacOptions).value
|
||||
assert(xs.toList == List("multi-project", "a", "b", "bare", "c"), s"$xs")
|
||||
}
|
||||
)
|
||||
|
||||
Compile / scalacOptions += "bare"
|
||||
|
|
@ -0,0 +1 @@
|
|||
Compile / scalacOptions += "c"
|
||||
|
|
@ -0,0 +1 @@
|
|||
> check
|
||||
Loading…
Reference in New Issue