Typos and missing parameter names use in doc comment
Test: N/A Bug: N/A Change-Id: I01331365925decef22502da02a23ed4ce610da98
This commit is contained in:
parent
c643dd96cd
commit
ee7a5d7a16
4 changed files with 19 additions and 27 deletions
11
context.go
11
context.go
|
@ -486,7 +486,7 @@ func (c *Context) RegisterModuleType(name string, factory ModuleFactory) {
|
||||||
type SingletonFactory func() Singleton
|
type SingletonFactory func() Singleton
|
||||||
|
|
||||||
// RegisterSingletonType registers a singleton type that will be invoked to
|
// RegisterSingletonType registers a singleton type that will be invoked to
|
||||||
// generate build actions. Each registered singleton type is instantiated and
|
// generate build actions. Each registered singleton type is instantiated
|
||||||
// and invoked exactly once as part of the generate phase. Each registered
|
// and invoked exactly once as part of the generate phase. Each registered
|
||||||
// singleton is invoked in registration order.
|
// singleton is invoked in registration order.
|
||||||
//
|
//
|
||||||
|
@ -1443,14 +1443,11 @@ func (c *Context) prettyPrintGroupVariants(group *moduleGroup) string {
|
||||||
func newModule(factory ModuleFactory) *moduleInfo {
|
func newModule(factory ModuleFactory) *moduleInfo {
|
||||||
logicModule, properties := factory()
|
logicModule, properties := factory()
|
||||||
|
|
||||||
module := &moduleInfo{
|
return &moduleInfo{
|
||||||
logicModule: logicModule,
|
logicModule: logicModule,
|
||||||
factory: factory,
|
factory: factory,
|
||||||
|
properties: properties,
|
||||||
}
|
}
|
||||||
|
|
||||||
module.properties = properties
|
|
||||||
|
|
||||||
return module
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func processModuleDef(moduleDef *parser.Module,
|
func processModuleDef(moduleDef *parser.Module,
|
||||||
|
@ -2171,7 +2168,7 @@ func cycleError(cycle []*moduleInfo) (errs []error) {
|
||||||
// additional fields based on the dependencies. It builds a sorted list of modules
|
// additional fields based on the dependencies. It builds a sorted list of modules
|
||||||
// such that dependencies of a module always appear first, and populates reverse
|
// such that dependencies of a module always appear first, and populates reverse
|
||||||
// dependency links and counts of total dependencies. It also reports errors when
|
// dependency links and counts of total dependencies. It also reports errors when
|
||||||
// it encounters dependency cycles. This should called after resolveDependencies,
|
// it encounters dependency cycles. This should be called after resolveDependencies,
|
||||||
// as well as after any mutator pass has called addDependency
|
// as well as after any mutator pass has called addDependency
|
||||||
func (c *Context) updateDependencies() (errs []error) {
|
func (c *Context) updateDependencies() (errs []error) {
|
||||||
c.cachedDepsModified = true
|
c.cachedDepsModified = true
|
||||||
|
|
|
@ -132,14 +132,14 @@ type EarlyModuleContext interface {
|
||||||
// the module was created, but may have been modified by calls to BaseMutatorContext.Rename.
|
// the module was created, but may have been modified by calls to BaseMutatorContext.Rename.
|
||||||
ModuleName() string
|
ModuleName() string
|
||||||
|
|
||||||
// ModuleDir returns the path to the directory that contains the defintion of the module.
|
// ModuleDir returns the path to the directory that contains the definition of the module.
|
||||||
ModuleDir() string
|
ModuleDir() string
|
||||||
|
|
||||||
// ModuleType returns the name of the module type that was used to create the module, as specified in
|
// ModuleType returns the name of the module type that was used to create the module, as specified in
|
||||||
// RegisterModuleType.
|
// Context.RegisterModuleType().
|
||||||
ModuleType() string
|
ModuleType() string
|
||||||
|
|
||||||
// BlueprintFile returns the name of the blueprint file that contains the definition of this
|
// BlueprintsFile returns the name of the blueprint file that contains the definition of this
|
||||||
// module.
|
// module.
|
||||||
BlueprintsFile() string
|
BlueprintsFile() string
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ type BaseModuleContext interface {
|
||||||
// invalidated by future mutators.
|
// invalidated by future mutators.
|
||||||
VisitDepsDepthFirst(visit func(Module))
|
VisitDepsDepthFirst(visit func(Module))
|
||||||
|
|
||||||
// VisitDepsDepthFirst calls pred for each transitive dependency, and if pred returns true calls visit, traversing
|
// VisitDepsDepthFirstIf calls pred for each transitive dependency, and if pred returns true calls visit, traversing
|
||||||
// the dependency tree in depth first order. visit will only be called once for any given module, even if there are
|
// the dependency tree in depth first order. visit will only be called once for any given module, even if there are
|
||||||
// multiple paths through the dependency tree to the module or multiple direct dependencies with different tags.
|
// multiple paths through the dependency tree to the module or multiple direct dependencies with different tags.
|
||||||
// OtherModuleDependencyTag will return the tag for the first path found to the module. The return value of pred
|
// OtherModuleDependencyTag will return the tag for the first path found to the module. The return value of pred
|
||||||
|
@ -834,7 +834,7 @@ type BaseMutatorContext interface {
|
||||||
type EarlyMutatorContext interface {
|
type EarlyMutatorContext interface {
|
||||||
BaseMutatorContext
|
BaseMutatorContext
|
||||||
|
|
||||||
// CreateVariations splits a module into mulitple variants, one for each name in the variationNames
|
// CreateVariations splits a module into multiple variants, one for each name in the variationNames
|
||||||
// parameter. It returns a list of new modules in the same order as the variationNames
|
// parameter. It returns a list of new modules in the same order as the variationNames
|
||||||
// list.
|
// list.
|
||||||
//
|
//
|
||||||
|
@ -885,7 +885,7 @@ type BottomUpMutatorContext interface {
|
||||||
// module's dependency list.
|
// module's dependency list.
|
||||||
AddReverseDependency(module Module, tag DependencyTag, name string)
|
AddReverseDependency(module Module, tag DependencyTag, name string)
|
||||||
|
|
||||||
// CreateVariations splits a module into mulitple variants, one for each name in the variationNames
|
// CreateVariations splits a module into multiple variants, one for each name in the variationNames
|
||||||
// parameter. It returns a list of new modules in the same order as the variationNames
|
// parameter. It returns a list of new modules in the same order as the variationNames
|
||||||
// list.
|
// list.
|
||||||
//
|
//
|
||||||
|
@ -896,16 +896,16 @@ type BottomUpMutatorContext interface {
|
||||||
// If a module is split, and then a module depending on the first module is not split
|
// If a module is split, and then a module depending on the first module is not split
|
||||||
// when the Mutator is later called on it, the dependency of the depending module will
|
// when the Mutator is later called on it, the dependency of the depending module will
|
||||||
// automatically be updated to point to the first variant.
|
// automatically be updated to point to the first variant.
|
||||||
CreateVariations(...string) []Module
|
CreateVariations(variationNames ...string) []Module
|
||||||
|
|
||||||
// CreateLocationVariations splits a module into mulitple variants, one for each name in the variantNames
|
// CreateLocalVariations splits a module into multiple variants, one for each name in the variationNames
|
||||||
// parameter. It returns a list of new modules in the same order as the variantNames
|
// parameter. It returns a list of new modules in the same order as the variantNames
|
||||||
// list.
|
// list.
|
||||||
//
|
//
|
||||||
// Local variations do not affect automatic dependency resolution - dependencies added
|
// Local variations do not affect automatic dependency resolution - dependencies added
|
||||||
// to the split module via deps or DynamicDependerModule must exactly match a variant
|
// to the split module via deps or DynamicDependerModule must exactly match a variant
|
||||||
// that contains all the non-local variations.
|
// that contains all the non-local variations.
|
||||||
CreateLocalVariations(...string) []Module
|
CreateLocalVariations(variationNames ...string) []Module
|
||||||
|
|
||||||
// SetDependencyVariation sets all dangling dependencies on the current module to point to the variation
|
// SetDependencyVariation sets all dangling dependencies on the current module to point to the variation
|
||||||
// with given name. This function ignores the default variation set by SetDefaultDependencyVariation.
|
// with given name. This function ignores the default variation set by SetDefaultDependencyVariation.
|
||||||
|
@ -942,7 +942,7 @@ type BottomUpMutatorContext interface {
|
||||||
AddFarVariationDependencies([]Variation, DependencyTag, ...string) []Module
|
AddFarVariationDependencies([]Variation, DependencyTag, ...string) []Module
|
||||||
|
|
||||||
// AddInterVariantDependency adds a dependency between two variants of the same module. Variants are always
|
// AddInterVariantDependency adds a dependency between two variants of the same module. Variants are always
|
||||||
// ordered in the same orderas they were listed in CreateVariations, and AddInterVariantDependency does not change
|
// ordered in the same order as they were listed in CreateVariations, and AddInterVariantDependency does not change
|
||||||
// that ordering, but it associates a DependencyTag with the dependency and makes it visible to VisitDirectDeps,
|
// that ordering, but it associates a DependencyTag with the dependency and makes it visible to VisitDirectDeps,
|
||||||
// WalkDeps, etc.
|
// WalkDeps, etc.
|
||||||
AddInterVariantDependency(tag DependencyTag, from, to Module)
|
AddInterVariantDependency(tag DependencyTag, from, to Module)
|
||||||
|
@ -952,7 +952,7 @@ type BottomUpMutatorContext interface {
|
||||||
// after the mutator pass is finished.
|
// after the mutator pass is finished.
|
||||||
ReplaceDependencies(string)
|
ReplaceDependencies(string)
|
||||||
|
|
||||||
// ReplaceDependencies replaces all dependencies on the identical variant of the module with the
|
// ReplaceDependenciesIf replaces all dependencies on the identical variant of the module with the
|
||||||
// specified name with the current variant of this module as long as the supplied predicate returns
|
// specified name with the current variant of this module as long as the supplied predicate returns
|
||||||
// true.
|
// true.
|
||||||
//
|
//
|
||||||
|
@ -1035,13 +1035,8 @@ func (mctx *mutatorContext) SetVariationProvider(module Module, provider Provide
|
||||||
panic(fmt.Errorf("module %q is not a newly created variant of %q", module, mctx.module))
|
panic(fmt.Errorf("module %q is not a newly created variant of %q", module, mctx.module))
|
||||||
}
|
}
|
||||||
|
|
||||||
type pendingAlias struct {
|
|
||||||
fromVariant variant
|
|
||||||
target *moduleInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
func (mctx *mutatorContext) createVariations(variationNames []string, local bool) []Module {
|
func (mctx *mutatorContext) createVariations(variationNames []string, local bool) []Module {
|
||||||
ret := []Module{}
|
var ret []Module
|
||||||
modules, errs := mctx.context.createVariations(mctx.module, mctx.name, mctx.defaultVariation, variationNames, local)
|
modules, errs := mctx.context.createVariations(mctx.module, mctx.name, mctx.defaultVariation, variationNames, local)
|
||||||
if len(errs) > 0 {
|
if len(errs) > 0 {
|
||||||
mctx.errs = append(mctx.errs, errs...)
|
mctx.errs = append(mctx.errs, errs...)
|
||||||
|
|
|
@ -81,7 +81,7 @@ type packageContext struct {
|
||||||
ninjaFileDeps []string
|
ninjaFileDeps []string
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ PackageContext = &packageContext{}
|
var _ PackageContext = (*packageContext)(nil)
|
||||||
|
|
||||||
func (p *packageContext) getScope() *basicScope {
|
func (p *packageContext) getScope() *basicScope {
|
||||||
return p.scope
|
return p.scope
|
||||||
|
|
|
@ -35,7 +35,7 @@ type Definition interface {
|
||||||
}
|
}
|
||||||
|
|
||||||
// An Assignment is a variable assignment at the top level of a Blueprints file, scoped to the
|
// An Assignment is a variable assignment at the top level of a Blueprints file, scoped to the
|
||||||
// file and and subdirs.
|
// file and subdirs.
|
||||||
type Assignment struct {
|
type Assignment struct {
|
||||||
Name string
|
Name string
|
||||||
NamePos scanner.Position
|
NamePos scanner.Position
|
||||||
|
@ -289,7 +289,7 @@ func (x *Map) getPropertyImpl(name string) (Property *Property, found bool, inde
|
||||||
return nil, false, -1
|
return nil, false, -1
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetProperty removes the property with the given name, if it exists.
|
// RemoveProperty removes the property with the given name, if it exists.
|
||||||
func (x *Map) RemoveProperty(propertyName string) (removed bool) {
|
func (x *Map) RemoveProperty(propertyName string) (removed bool) {
|
||||||
_, found, index := x.getPropertyImpl(propertyName)
|
_, found, index := x.getPropertyImpl(propertyName)
|
||||||
if found {
|
if found {
|
||||||
|
|
Loading…
Reference in a new issue