Lines Matching defs:Context
87 type Context struct { struct
88 context.Context argument
91 EventHandler *metrics.EventHandler
93 BeforePrepareBuildActionsHook func() error
95 moduleFactories map[string]ModuleFactory
96 nameInterface NameInterface
97 moduleGroups []*moduleGroup
98 moduleInfo map[Module]*moduleInfo
99 singletonInfo []*singletonInfo
100 mutatorInfo []*mutatorInfo
101 variantMutatorNames []string
103 variantCreatingMutatorOrder []string
105 transitionMutators []*transitionMutatorImpl
107 needsUpdateDependencies uint32 // positive if a mutator modified the dependencies
109 dependenciesReady bool // set to true on a successful ResolveDependencies
110 buildActionsReady bool // set to true on a successful PrepareBuildActions
113 ignoreUnknownModuleTypes bool
116 allowMissingDependencies bool
119 nameTracker *nameTracker
120 liveGlobals *liveTracker
121 globalVariables map[Variable]*ninjaString
122 globalPools map[Pool]*poolDef
123 globalRules map[Rule]*ruleDef
126 outDir *ninjaString // The builddir special Ninja variable
127 requiredNinjaMajor int // For the ninja_required_version variable
128 requiredNinjaMinor int // For the ninja_required_version variable
129 requiredNinjaMicro int // For the ninja_required_version variable
131 subninjas []string
134 cachedSortedModuleGroups []*moduleGroup
136 cachedDepsModified bool
138 globs map[globKey]pathtools.GlobResult
139 globLock sync.Mutex
141 srcDir string
142 fs pathtools.FileSystem
143 moduleListFile string
148 providerMutators []*mutatorInfo
151 finishedMutators []bool
158 SkipCloneModulesAfterMutators bool
161 includeTags *IncludeTags
163 sourceRootDirs *SourceRootDirs
168 incrementalAnalysis bool
176 incrementalEnabled bool
178 buildActionsToCache BuildActionCache
179 buildActionsToCacheLock sync.Mutex
180 buildActionsFromCache BuildActionCache
181 orderOnlyStringsFromCache OrderOnlyStringsCache
182 orderOnlyStringsToCache OrderOnlyStringsCache
218 func (c *Context) AddSourceRootDirs(dirs ...string) {
236 func (c *Context) AddIncludeTags(names ...string) {
240 func (c *Context) ContainsIncludeTag(name string) bool {
245 func (c *Context) iterateAllVariants() iter.Seq[*moduleInfo] {
653 func (c *Context) RegisterModuleType(name string, factory ModuleFactory) {
675 func (c *Context) RegisterSingletonType(name string, factory SingletonFactory, parallel bool) {
690 func (c *Context) SetNameInterface(i NameInterface) {
694 func (c *Context) SetIncrementalAnalysis(incremental bool) {
698 func (c *Context) GetIncrementalAnalysis() bool {
702 func (c *Context) SetIncrementalEnabled(incremental bool) {
706 func (c *Context) GetIncrementalEnabled() bool {
710 func (c *Context) updateBuildActionsCache(key *BuildActionCacheKey, data *BuildActionCachedData) {
718 func (c *Context) getBuildActionsFromCache(key *BuildActionCacheKey) *BuildActionCachedData {
725 func (c *Context) CacheAllBuildActions(soongOutDir string) error {
742 func (c *Context) RestoreAllBuildActions(soongOutDir string) error {
763 func (c *Context) SetSrcDir(path string) {
768 func (c *Context) SrcDir() string {
798 func (c *Context) RegisterTopDownMutator(name string, mutator TopDownMutator) MutatorHandle {
826 func (c *Context) RegisterBottomUpMutator(name string, mutator BottomUpMutator) MutatorHandle {
847 func (c *Context) HasMutatorFinished(mutatorName string) bool {
933 func (c *Context) SetIgnoreUnknownModuleTypes(ignoreUnknownModuleTypes bool) {
941 func (c *Context) SetAllowMissingDependencies(allowMissingDependencies bool) {
945 func (c *Context) SetModuleListFile(listFile string) {
949 func (c *Context) ListModulePaths(baseDir string) (paths []string, err error) {
994 func (c *Context) ParseBlueprintsFiles(rootFile string,
1017 func shouldVisitFile(c *Context, file *parser.File) shouldVisitFileInfo {
1041 func (c *Context) ParseFileList(rootDir string, filePaths []string,
1203 func (c *Context) WalkBlueprintsFiles(rootDir string, filePaths []string,
1334 func (c *Context) MockFileSystem(files map[string][]byte) {
1357 func (c *Context) SetFs(fs pathtools.FileSystem) {
1362 func (c *Context) openAndParse(filename string, scope *parser.Scope, rootDir string,
1420 func (c *Context) parseOne(rootDir, filename string, reader io.Reader,
1479 func (c *Context) findBuildBlueprints(dir string, build []string,
1521 func (c *Context) findSubdirBlueprints(dir string, subdirs []string, subdirsPos scanner.Position,
1596 func (c *Context) cloneLogicModule(origModule *moduleInfo) (Module, []interface{}) {
1630 func (c *Context) createVariations(origModule *moduleInfo, mutator *mutatorInfo,
1730 …vertDepsToVariation(module *moduleInfo, variationIndex int, depChooser depChooser) (errs []error) {
1749 func (c *Context) prettyPrintVariant(variations variationMap) string {
1763 func (c *Context) prettyPrintGroupVariants(group *moduleGroup) string {
1829 func (c *Context) addModule(module *moduleInfo) []error {
1867 func (c *Context) ResolveDependencies(config interface{}) (deps []string, errs []error) {
1906 …ntext) resolveDependencies(ctx context.Context, config interface{}) (deps []string, errs []error) {
1963 …*moduleInfo, config any, requestedVariations []Variation, destName string) (*moduleInfo, []error) {
2004 …Context) applyTransitions(config any, module *moduleInfo, group *moduleGroup, variant variationMap,
2081 func (c *Context) findVariant(module *moduleInfo, config any,
2142 …ddVariationDependency(module *moduleInfo, mutator *mutatorInfo, config any, variations []Variation,
2541 func (c *Context) updateDependencies() (errs []error) {
2735 …*Context) GetWeightedOutputsFromPredicate(predicate func(*JsonModule) (bool, int)) map[string]int {
2756 func (c *Context) PrintJSONGraphAndActions(wGraph io.Writer, wActions io.Writer) {
2806 func (c *Context) PrepareBuildActions(config interface{}) (deps []string, errs []error) {
2899 …ontext.Context, config interface{}, mutatorGroups [][]*mutatorInfo) (deps []string, errs []error) {
2989 func (c *Context) runMutator(config interface{}, mutatorGroup []*mutatorInfo,
3218 func (c *Context) clearTransitionMutatorInputVariants() {
3227 func (c *Context) cloneModules() {
3283 func (c *Context) generateModuleBuildActions(config interface{},
3391 func (c *Context) generateOneSingletonBuildActions(config interface{},
3438 func (c *Context) generateParallelSingletonBuildActions(config interface{},
3489 func (c *Context) generateSingletonBuildActions(config interface{},
3526 func (c *Context) processLocalBuildActions(out, in *localBuildActions,
3567 func (c *Context) walkDeps(topModule *moduleInfo, allowDuplicates bool,
3615 func (c *Context) moduleVariantsThatDependOn(name string, dep *moduleInfo) []*moduleInfo {
3634 func (c *Context) handleRenames(renames []rename) []error {
3648 func (c *Context) handleReplacements(replacements []replace) []error {
3672 …issingDependencies(module *moduleInfo, depName string, depVariations variationMap) (errs []error) {
3683 func (c *Context) missingDependencyError(module *moduleInfo, depName string) (errs error) {
3692 func (c *Context) moduleGroupFromName(name string, namespace Namespace) *moduleGroup {
3700 func (c *Context) sortedModuleGroups() []*moduleGroup {
3717 func (c *Context) visitAllModules(visit func(Module)) {
3734 func (c *Context) visitAllModulesIf(pred func(Module) bool,
3755 func (c *Context) visitAllModuleVariants(module *moduleInfo,
3772 func (c *Context) visitAllModuleInfos(visit func(*moduleInfo)) {
3789 func (c *Context) requireNinjaVersion(major, minor, micro int) {
3802 func (c *Context) setOutDir(value *ninjaString) {
3808 func (c *Context) makeUniquePackageNames(
3870 …ext) memoizeFullNames(liveGlobals *liveTracker, pkgNames map[*packageContext]string) *nameTracker {
3889 func (c *Context) checkForVariableReferenceCycles(
3963 func (c *Context) ModuleTypePropertyStructs() map[string][]interface{} {
3972 func (c *Context) ModuleTypeFactories() map[string]ModuleFactory {
3976 func (c *Context) ModuleName(logicModule Module) string {
3981 func (c *Context) ModuleDir(logicModule Module) string {
3985 func (c *Context) ModuleSubDir(logicModule Module) string {
3990 func (c *Context) ModuleType(logicModule Module) string {
3999 func (c *Context) ModuleProvider(logicModule Module, provider AnyProviderKey) (any, bool) {
4004 func (c *Context) BlueprintFile(logicModule Module) string {
4009 func (c *Context) moduleErrorf(module *moduleInfo, format string,
4027 func (c *Context) ModuleErrorf(logicModule Module, format string,
4032 func (c *Context) PropertyErrorf(logicModule Module, property string, format string,
4060 func (c *Context) VisitAllModules(visit func(Module)) {
4064 func (c *Context) VisitAllModulesIf(pred func(Module) bool,
4070 func (c *Context) VisitDirectDeps(module Module, visit func(Module)) {
4076 func (c *Context) VisitDirectDepsWithTags(module Module, visit func(Module, DependencyTag)) {
4094 func (c *Context) VisitDirectDepsIf(module Module, pred func(Module) bool, visit func(Module)) {
4114 func (c *Context) VisitDepsDepthFirst(module Module, visit func(Module)) {
4132 func (c *Context) VisitDepsDepthFirstIf(module Module, pred func(Module) bool, visit func(Module)) {
4152 func (c *Context) PrimaryModule(module Module) Module {
4156 func (c *Context) IsFinalModule(module Module) bool {
4160 func (c *Context) VisitAllModuleVariants(module Module,
4167 func (c *Context) Singletons() []Singleton {
4176 func (c *Context) SingletonName(singleton Singleton) string {
4188 func (c *Context) VerifyProvidersWereUnchanged() []error {
4243 …nc (c *Context) WriteBuildFile(w StringWriterWriter, shardNinja bool, ninjaFileName string) error {
4318 func (c *Context) writeBuildFileHeader(nw *ninjaWriter) error {
4357 func (c *Context) writeNinjaRequiredVersion(nw *ninjaWriter) error {
4369 func (c *Context) writeSubninjas(nw *ninjaWriter) error {
4379 func (c *Context) writeBuildDir(nw *ninjaWriter) error {
4394 func (c *Context) writeGlobalVariables(nw *ninjaWriter) error {
4446 func (c *Context) writeGlobalPools(nw *ninjaWriter) error {
4473 func (c *Context) writeGlobalRules(nw *ninjaWriter) error {
4567 … (c *Context) writeAllModuleActions(nw *ninjaWriter, shardNinja bool, ninjaFileName string) error {
4676 func orderOnlyForIncremental(c *Context, modules []*moduleInfo, phonys *localBuildActions) error {
4740 func writeIncrementalModules(c *Context, baseFile string, modules []*moduleInfo, headerTemplate *te…
4777 …riteModuleAction(modules []*moduleInfo, nw *ninjaWriter, headerTemplate *template.Template) error {
4827 func (c *Context) writeAllSingletonActions(nw *ninjaWriter) error {
4883 func (c *Context) GetEventHandler() *metrics.EventHandler {
4887 func (c *Context) BeginEvent(name string) {
4891 func (c *Context) EndEvent(name string) {
4895 func (c *Context) SetBeforePrepareBuildActionsHook(hookFn func() error) {
4966 func (c *Context) deduplicateOrderOnlyDeps(modules []*moduleInfo) *localBuildActions {
5000 func (c *Context) writeLocalBuildActions(nw *ninjaWriter,
5334 func (this *Context) GenerateModuleDebugInfo(filename string) {