Typos and missing parameter names use in doc comment am: ee7a5d7a16 am: 25c221eb36

Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1953566

Change-Id: Ida9ae56572e49b8e059b15aa4a1ac222a855b155
This commit is contained in:
Usta Shrestha 2022-01-18 23:52:40 +00:00 committed by Automerger Merge Worker
commit 234f303482
4 changed files with 19 additions and 27 deletions

View file

@ -486,7 +486,7 @@ func (c *Context) RegisterModuleType(name string, factory ModuleFactory) {
type SingletonFactory func() Singleton
// 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
// singleton is invoked in registration order.
//
@ -1443,14 +1443,11 @@ func (c *Context) prettyPrintGroupVariants(group *moduleGroup) string {
func newModule(factory ModuleFactory) *moduleInfo {
logicModule, properties := factory()
module := &moduleInfo{
return &moduleInfo{
logicModule: logicModule,
factory: factory,
properties: properties,
}
module.properties = properties
return 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
// such that dependencies of a module always appear first, and populates reverse
// 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
func (c *Context) updateDependencies() (errs []error) {
c.cachedDepsModified = true

View file

@ -132,14 +132,14 @@ type EarlyModuleContext interface {
// the module was created, but may have been modified by calls to BaseMutatorContext.Rename.
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
// ModuleType returns the name of the module type that was used to create the module, as specified in
// RegisterModuleType.
// Context.RegisterModuleType().
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.
BlueprintsFile() string
@ -227,7 +227,7 @@ type BaseModuleContext interface {
// invalidated by future mutators.
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
// 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
@ -834,7 +834,7 @@ type BaseMutatorContext interface {
type EarlyMutatorContext interface {
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
// list.
//
@ -885,7 +885,7 @@ type BottomUpMutatorContext interface {
// module's dependency list.
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
// 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
// when the Mutator is later called on it, the dependency of the depending module will
// 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
// list.
//
// Local variations do not affect automatic dependency resolution - dependencies added
// to the split module via deps or DynamicDependerModule must exactly match a variant
// 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
// with given name. This function ignores the default variation set by SetDefaultDependencyVariation.
@ -942,7 +942,7 @@ type BottomUpMutatorContext interface {
AddFarVariationDependencies([]Variation, DependencyTag, ...string) []Module
// 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,
// WalkDeps, etc.
AddInterVariantDependency(tag DependencyTag, from, to Module)
@ -952,7 +952,7 @@ type BottomUpMutatorContext interface {
// after the mutator pass is finished.
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
// 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))
}
type pendingAlias struct {
fromVariant variant
target *moduleInfo
}
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)
if len(errs) > 0 {
mctx.errs = append(mctx.errs, errs...)

View file

@ -81,7 +81,7 @@ type packageContext struct {
ninjaFileDeps []string
}
var _ PackageContext = &packageContext{}
var _ PackageContext = (*packageContext)(nil)
func (p *packageContext) getScope() *basicScope {
return p.scope

View file

@ -35,7 +35,7 @@ type Definition interface {
}
// 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 {
Name string
NamePos scanner.Position
@ -289,7 +289,7 @@ func (x *Map) getPropertyImpl(name string) (Property *Property, found bool, inde
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) {
_, found, index := x.getPropertyImpl(propertyName)
if found {