rename 'inherits' to the more appropriate 'delegates'

This commit is contained in:
Mark Harrah 2011-02-14 18:56:29 -05:00
parent cfd4b99f29
commit 83cb152fd7
2 changed files with 5 additions and 5 deletions

View File

@ -239,7 +239,7 @@ object Load
getConfiguration(lb.units, ref._1, ref._2, config).extendsConfigs.map(c => ConfigKey(c.name))
def projectInherit(lb: LoadedBuild, ref: (URI, String)): Seq[ProjectRef] =
getProject(lb.units, ref._1, ref._2).inherits
getProject(lb.units, ref._1, ref._2).delegates
// build, load, and evaluate all units.
// 1) Compile all plugin definitions
@ -423,7 +423,7 @@ object Load
def resolveRefs(prs: Seq[ProjectRef]) = prs map resolveRef
def resolveDeps(ds: Seq[Project.ClasspathDependency]) = ds map resolveDep
def resolveDep(d: Project.ClasspathDependency) = d.copy(project = resolveRef(d.project))
p => p.copy(aggregate = resolveRefs(p.aggregate), dependencies = resolveDeps(p.dependencies), inherits = resolveRefs(p.inherits))
p => p.copy(aggregate = resolveRefs(p.aggregate), dependencies = resolveDeps(p.dependencies), delegates = resolveRefs(p.delegates))
}
def projects(unit: BuildUnit): Seq[Project] =
{
@ -564,7 +564,7 @@ object Load
// these are unresolved references
def referenced(definitions: Seq[Project]): Seq[ProjectRef] = definitions flatMap referenced
def referenced(definition: Project): Seq[ProjectRef] = definition.inherits ++ definition.aggregate ++ definition.dependencies.map(_.project)
def referenced(definition: Project): Seq[ProjectRef] = definition.delegates ++ definition.aggregate ++ definition.dependencies.map(_.project)
final class BuildStructure(val units: Map[URI, LoadedBuildUnit], val root: URI, val settings: Seq[Setting[_]], val data: Settings[Scope], val index: StructureIndex, val streams: Streams, val delegates: Scope => Seq[Scope], val scopeLocal: ScopeLocal)

View File

@ -11,11 +11,11 @@ package sbt
import CommandSupport.logger
import compile.Eval
final case class Project(id: String, base: File, aggregate: Seq[ProjectRef] = Nil, dependencies: Seq[Project.ClasspathDependency] = Nil, inherits: Seq[ProjectRef] = Nil,
final case class Project(id: String, base: File, aggregate: Seq[ProjectRef] = Nil, dependencies: Seq[Project.ClasspathDependency] = Nil, delegates: Seq[ProjectRef] = Nil,
settings: Seq[Project.Setting[_]] = Project.defaultSettings, configurations: Seq[Configuration] = Configurations.default)
{
def dependsOn(deps: Project.ClasspathDependency*): Project = copy(dependencies = dependencies ++ deps)
def inherits(from: ProjectRef*): Project = copy(inherits = inherits ++ from)
def delegates(from: ProjectRef*): Project = copy(delegates = delegates ++ from)
def aggregate(refs: ProjectRef*): Project = copy(aggregate = aggregate ++ refs)
def configs(cs: Configuration*): Project = copy(configurations = configurations ++ cs)
def settings(ss: Project.Setting[_]*): Project = copy(settings = settings ++ ss)