Skip to content

Commit

Permalink
rename 'inherits' to the more appropriate 'delegates'
Browse files Browse the repository at this point in the history
  • Loading branch information
harrah committed Feb 14, 2011
1 parent cfd4b99 commit 83cb152
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions main/Build.scala
Expand Up @@ -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
Expand Down Expand Up @@ -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] =
{
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions main/Project.scala
Expand Up @@ -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)
Expand Down

0 comments on commit 83cb152

Please sign in to comment.