mirror of https://github.com/sbt/sbt.git
Merge pull request #4447 from eatkins/managed-source-fix
Fix '~' for dependent projects with a broken parent (1.2.x)
This commit is contained in:
commit
67b109c4bd
|
|
@ -41,7 +41,7 @@ env:
|
|||
- SBT_CMD="scripted source-dependencies/*1of3"
|
||||
- SBT_CMD="scripted source-dependencies/*2of3"
|
||||
- SBT_CMD="scripted source-dependencies/*3of3"
|
||||
- SBT_CMD="scripted tests/*"
|
||||
- SBT_CMD="scripted tests/* watch/*"
|
||||
- SBT_CMD="repoOverrideTest:scripted dependency-management/*"
|
||||
|
||||
notifications:
|
||||
|
|
|
|||
|
|
@ -361,14 +361,19 @@ object Defaults extends BuildCommon {
|
|||
val include = (includeFilter in unmanagedSources).value
|
||||
val exclude = (excludeFilter in unmanagedSources).value match {
|
||||
case e =>
|
||||
(managedSources in ThisScope).value match {
|
||||
case l if l.nonEmpty =>
|
||||
e || new FileFilter {
|
||||
private val files = l.toSet
|
||||
override def accept(pathname: File): Boolean = files.contains(pathname)
|
||||
override def toString = s"ManagedSourcesFilter($files)"
|
||||
}
|
||||
case _ => e
|
||||
val s = state.value
|
||||
try {
|
||||
Project.extract(s).runTask(managedSources in Compile in ThisScope, s) match {
|
||||
case (_, l) if l.nonEmpty =>
|
||||
e || new FileFilter {
|
||||
private val files = l.toSet
|
||||
override def accept(pathname: File): Boolean = files.contains(pathname)
|
||||
override def toString = s"ManagedSourcesFilter($files)"
|
||||
}
|
||||
case _ => e
|
||||
}
|
||||
} catch {
|
||||
case NonFatal(_) => e
|
||||
}
|
||||
}
|
||||
val baseSources =
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
lazy val root = (project in file(".")).aggregate(parent, child)
|
||||
lazy val parent = project
|
||||
lazy val child = project.enablePlugins(JmhPlugin).dependsOn(parent)
|
||||
|
|
@ -0,0 +1 @@
|
|||
class Foo
|
||||
|
|
@ -0,0 +1 @@
|
|||
class Bar
|
||||
|
|
@ -0,0 +1 @@
|
|||
class Foo {
|
||||
|
|
@ -0,0 +1 @@
|
|||
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.4")
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
> watchTransitiveSources
|
||||
|
||||
-> compile
|
||||
|
||||
$ copy-file changes/Foo.scala parent/src/main/scala/Foo.scala
|
||||
|
||||
> watchTransitiveSources
|
||||
|
||||
> compile
|
||||
Loading…
Reference in New Issue