| Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 1 | // Copyright 2015 Google Inc. All rights reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| Colin Cross | 798bfce | 2016-10-12 14:28:16 -0700 | [diff] [blame] | 15 | package android |
| Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 16 | |
| Colin Cross | 4498afc | 2016-10-13 14:18:27 -0700 | [diff] [blame] | 17 | import ( |
| Paul Duffin | 0a28683 | 2019-12-19 12:23:01 +0000 | [diff] [blame] | 18 | "fmt" |
| Colin Cross | 9aed5bc | 2020-12-28 15:15:34 -0800 | [diff] [blame] | 19 | "reflect" |
| Paul Duffin | 0a28683 | 2019-12-19 12:23:01 +0000 | [diff] [blame] | 20 | |
| Colin Cross | 4498afc | 2016-10-13 14:18:27 -0700 | [diff] [blame] | 21 | "github.com/google/blueprint" |
| 22 | ) |
| Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 23 | |
| 24 | type moduleType struct { |
| 25 | name string |
| Colin Cross | 7089c27 | 2019-01-25 22:43:35 -0800 | [diff] [blame] | 26 | factory ModuleFactory |
| Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | var moduleTypes []moduleType |
| Colin Cross | 9aed5bc | 2020-12-28 15:15:34 -0800 | [diff] [blame] | 30 | var moduleTypesForDocs = map[string]reflect.Value{} |
| Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 31 | |
| 32 | type singleton struct { |
| 33 | name string |
| Colin Cross | 06fa588 | 2020-10-29 18:21:38 -0700 | [diff] [blame] | 34 | factory SingletonFactory |
| Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 35 | } |
| 36 | |
| 37 | var singletons []singleton |
| Colin Cross | 5a79c83 | 2017-11-07 13:35:38 -0800 | [diff] [blame] | 38 | var preSingletons []singleton |
| Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 39 | |
| Colin Cross | 6362e27 | 2015-10-29 15:25:03 -0700 | [diff] [blame] | 40 | type mutator struct { |
| 41 | name string |
| 42 | bottomUpMutator blueprint.BottomUpMutator |
| 43 | topDownMutator blueprint.TopDownMutator |
| Colin Cross | e8a67a7 | 2016-08-07 21:17:54 -0700 | [diff] [blame] | 44 | parallel bool |
| Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 45 | } |
| 46 | |
| Colin Cross | 3624285 | 2017-06-23 15:06:31 -0700 | [diff] [blame] | 47 | type ModuleFactory func() Module |
| 48 | |
| Colin Cross | 0875c52 | 2017-11-28 17:34:01 -0800 | [diff] [blame] | 49 | // ModuleFactoryAdaptor wraps a ModuleFactory into a blueprint.ModuleFactory by converting a Module |
| Colin Cross | 3624285 | 2017-06-23 15:06:31 -0700 | [diff] [blame] | 50 | // into a blueprint.Module and a list of property structs |
| 51 | func ModuleFactoryAdaptor(factory ModuleFactory) blueprint.ModuleFactory { |
| 52 | return func() (blueprint.Module, []interface{}) { |
| 53 | module := factory() |
| 54 | return module, module.GetProperties() |
| 55 | } |
| 56 | } |
| 57 | |
| Colin Cross | 0875c52 | 2017-11-28 17:34:01 -0800 | [diff] [blame] | 58 | type SingletonFactory func() Singleton |
| 59 | |
| 60 | // SingletonFactoryAdaptor wraps a SingletonFactory into a blueprint.SingletonFactory by converting |
| 61 | // a Singleton into a blueprint.Singleton |
| Colin Cross | 06fa588 | 2020-10-29 18:21:38 -0700 | [diff] [blame] | 62 | func SingletonFactoryAdaptor(ctx *Context, factory SingletonFactory) blueprint.SingletonFactory { |
| Colin Cross | 0875c52 | 2017-11-28 17:34:01 -0800 | [diff] [blame] | 63 | return func() blueprint.Singleton { |
| 64 | singleton := factory() |
| Colin Cross | ed023ec | 2019-02-19 12:38:45 -0800 | [diff] [blame] | 65 | if makevars, ok := singleton.(SingletonMakeVarsProvider); ok { |
| Colin Cross | 06fa588 | 2020-10-29 18:21:38 -0700 | [diff] [blame] | 66 | registerSingletonMakeVarsProvider(ctx.config, makevars) |
| Colin Cross | ed023ec | 2019-02-19 12:38:45 -0800 | [diff] [blame] | 67 | } |
| Colin Cross | 4c83e5c | 2019-02-25 14:54:28 -0800 | [diff] [blame] | 68 | return &singletonAdaptor{Singleton: singleton} |
| Colin Cross | 0875c52 | 2017-11-28 17:34:01 -0800 | [diff] [blame] | 69 | } |
| 70 | } |
| 71 | |
| Colin Cross | 3624285 | 2017-06-23 15:06:31 -0700 | [diff] [blame] | 72 | func RegisterModuleType(name string, factory ModuleFactory) { |
| Colin Cross | 7089c27 | 2019-01-25 22:43:35 -0800 | [diff] [blame] | 73 | moduleTypes = append(moduleTypes, moduleType{name, factory}) |
| Colin Cross | 9aed5bc | 2020-12-28 15:15:34 -0800 | [diff] [blame] | 74 | RegisterModuleTypeForDocs(name, reflect.ValueOf(factory)) |
| 75 | } |
| 76 | |
| 77 | // RegisterModuleTypeForDocs associates a module type name with a reflect.Value of the factory |
| 78 | // function that has documentation for the module type. It is normally called automatically |
| 79 | // by RegisterModuleType, but can be called manually after RegisterModuleType in order to |
| 80 | // override the factory method used for documentation, for example if the method passed to |
| 81 | // RegisterModuleType was a lambda. |
| 82 | func RegisterModuleTypeForDocs(name string, factory reflect.Value) { |
| 83 | moduleTypesForDocs[name] = factory |
| Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 84 | } |
| 85 | |
| Colin Cross | 0875c52 | 2017-11-28 17:34:01 -0800 | [diff] [blame] | 86 | func RegisterSingletonType(name string, factory SingletonFactory) { |
| Colin Cross | 06fa588 | 2020-10-29 18:21:38 -0700 | [diff] [blame] | 87 | singletons = append(singletons, singleton{name, factory}) |
| Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 88 | } |
| 89 | |
| Colin Cross | 0875c52 | 2017-11-28 17:34:01 -0800 | [diff] [blame] | 90 | func RegisterPreSingletonType(name string, factory SingletonFactory) { |
| Colin Cross | 06fa588 | 2020-10-29 18:21:38 -0700 | [diff] [blame] | 91 | preSingletons = append(preSingletons, singleton{name, factory}) |
| Colin Cross | 5a79c83 | 2017-11-07 13:35:38 -0800 | [diff] [blame] | 92 | } |
| 93 | |
| Colin Cross | cec8171 | 2017-07-13 14:43:27 -0700 | [diff] [blame] | 94 | type Context struct { |
| 95 | *blueprint.Context |
| Colin Cross | ae8600b | 2020-10-29 17:09:13 -0700 | [diff] [blame] | 96 | config Config |
| Colin Cross | cec8171 | 2017-07-13 14:43:27 -0700 | [diff] [blame] | 97 | } |
| Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 98 | |
| Colin Cross | ae8600b | 2020-10-29 17:09:13 -0700 | [diff] [blame] | 99 | func NewContext(config Config) *Context { |
| 100 | ctx := &Context{blueprint.NewContext(), config} |
| Colin Cross | 988414c | 2020-01-11 01:11:46 +0000 | [diff] [blame] | 101 | ctx.SetSrcDir(absSrcDir) |
| 102 | return ctx |
| Colin Cross | cec8171 | 2017-07-13 14:43:27 -0700 | [diff] [blame] | 103 | } |
| 104 | |
| Jingwen Chen | 4133ce6 | 2020-12-02 04:34:15 -0500 | [diff] [blame] | 105 | // RegisterForBazelConversion registers an alternate shadow pipeline of |
| 106 | // singletons, module types and mutators to register for converting Blueprint |
| 107 | // files to semantically equivalent BUILD files. |
| 108 | func (ctx *Context) RegisterForBazelConversion() { |
| 109 | for _, t := range moduleTypes { |
| 110 | ctx.RegisterModuleType(t.name, ModuleFactoryAdaptor(t.factory)) |
| 111 | } |
| 112 | |
| Jingwen Chen | daa54bc | 2020-12-14 02:58:54 -0500 | [diff] [blame] | 113 | // Required for SingletonModule types, even though we are not using them. |
| 114 | for _, t := range singletons { |
| Liz Kammer | 2dd9ca4 | 2020-11-25 16:06:39 -0800 | [diff] [blame] | 115 | ctx.RegisterSingletonType(t.name, SingletonFactoryAdaptor(ctx, t.factory)) |
| 116 | } |
| Jingwen Chen | 4133ce6 | 2020-12-02 04:34:15 -0500 | [diff] [blame] | 117 | |
| Liz Kammer | 356f7d4 | 2021-01-26 09:18:53 -0500 | [diff] [blame] | 118 | RegisterMutatorsForBazelConversion(ctx.Context, bp2buildPreArchMutators, bp2buildDepsMutators, bp2buildMutators) |
| Jingwen Chen | 4133ce6 | 2020-12-02 04:34:15 -0500 | [diff] [blame] | 119 | } |
| 120 | |
| Jingwen Chen | daa54bc | 2020-12-14 02:58:54 -0500 | [diff] [blame] | 121 | // Register the pipeline of singletons, module types, and mutators for |
| 122 | // generating build.ninja and other files for Kati, from Android.bp files. |
| Colin Cross | cec8171 | 2017-07-13 14:43:27 -0700 | [diff] [blame] | 123 | func (ctx *Context) Register() { |
| Colin Cross | 5a79c83 | 2017-11-07 13:35:38 -0800 | [diff] [blame] | 124 | for _, t := range preSingletons { |
| Colin Cross | 06fa588 | 2020-10-29 18:21:38 -0700 | [diff] [blame] | 125 | ctx.RegisterPreSingletonType(t.name, SingletonFactoryAdaptor(ctx, t.factory)) |
| Colin Cross | 5a79c83 | 2017-11-07 13:35:38 -0800 | [diff] [blame] | 126 | } |
| 127 | |
| Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 128 | for _, t := range moduleTypes { |
| Colin Cross | 7089c27 | 2019-01-25 22:43:35 -0800 | [diff] [blame] | 129 | ctx.RegisterModuleType(t.name, ModuleFactoryAdaptor(t.factory)) |
| Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 130 | } |
| 131 | |
| 132 | for _, t := range singletons { |
| Colin Cross | 06fa588 | 2020-10-29 18:21:38 -0700 | [diff] [blame] | 133 | ctx.RegisterSingletonType(t.name, SingletonFactoryAdaptor(ctx, t.factory)) |
| Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 134 | } |
| 135 | |
| Martin Stjernholm | 710ec3a | 2020-01-16 15:12:04 +0000 | [diff] [blame] | 136 | registerMutators(ctx.Context, preArch, preDeps, postDeps, finalDeps) |
| Colin Cross | 1e676be | 2016-10-12 14:38:15 -0700 | [diff] [blame] | 137 | |
| Colin Cross | 06fa588 | 2020-10-29 18:21:38 -0700 | [diff] [blame] | 138 | ctx.RegisterSingletonType("bazeldeps", SingletonFactoryAdaptor(ctx, BazelSingleton)) |
| Chris Parsons | a798d96 | 2020-10-12 23:44:08 -0400 | [diff] [blame] | 139 | |
| Colin Cross | c3d87d3 | 2020-06-04 13:25:17 -0700 | [diff] [blame] | 140 | // Register phony just before makevars so it can write out its phony rules as Make rules |
| Colin Cross | 06fa588 | 2020-10-29 18:21:38 -0700 | [diff] [blame] | 141 | ctx.RegisterSingletonType("phony", SingletonFactoryAdaptor(ctx, phonySingletonFactory)) |
| Colin Cross | c3d87d3 | 2020-06-04 13:25:17 -0700 | [diff] [blame] | 142 | |
| Colin Cross | 580d2ce | 2019-02-09 22:59:32 -0800 | [diff] [blame] | 143 | // Register makevars after other singletons so they can export values through makevars |
| Colin Cross | 06fa588 | 2020-10-29 18:21:38 -0700 | [diff] [blame] | 144 | ctx.RegisterSingletonType("makevars", SingletonFactoryAdaptor(ctx, makeVarsSingletonFunc)) |
| Colin Cross | 580d2ce | 2019-02-09 22:59:32 -0800 | [diff] [blame] | 145 | |
| Colin Cross | 1212929 | 2020-10-29 18:23:58 -0700 | [diff] [blame] | 146 | // Register env and ninjadeps last so that they can track all used environment variables and |
| 147 | // Ninja file dependencies stored in the config. |
| Colin Cross | 06fa588 | 2020-10-29 18:21:38 -0700 | [diff] [blame] | 148 | ctx.RegisterSingletonType("env", SingletonFactoryAdaptor(ctx, EnvSingleton)) |
| Colin Cross | 1212929 | 2020-10-29 18:23:58 -0700 | [diff] [blame] | 149 | ctx.RegisterSingletonType("ninjadeps", SingletonFactoryAdaptor(ctx, ninjaDepsSingletonFactory)) |
| Colin Cross | 463a90e | 2015-06-17 14:20:06 -0700 | [diff] [blame] | 150 | } |
| Colin Cross | 7089c27 | 2019-01-25 22:43:35 -0800 | [diff] [blame] | 151 | |
| 152 | func ModuleTypeFactories() map[string]ModuleFactory { |
| 153 | ret := make(map[string]ModuleFactory) |
| 154 | for _, t := range moduleTypes { |
| 155 | ret[t.name] = t.factory |
| 156 | } |
| 157 | return ret |
| 158 | } |
| Paul Duffin | f9b1da0 | 2019-12-18 19:51:55 +0000 | [diff] [blame] | 159 | |
| Colin Cross | 9aed5bc | 2020-12-28 15:15:34 -0800 | [diff] [blame] | 160 | func ModuleTypeFactoriesForDocs() map[string]reflect.Value { |
| 161 | return moduleTypesForDocs |
| 162 | } |
| 163 | |
| Paul Duffin | f9b1da0 | 2019-12-18 19:51:55 +0000 | [diff] [blame] | 164 | // Interface for registering build components. |
| 165 | // |
| 166 | // Provided to allow registration of build components to be shared between the runtime |
| 167 | // and test environments. |
| 168 | type RegistrationContext interface { |
| 169 | RegisterModuleType(name string, factory ModuleFactory) |
| Colin Cross | 9aed5bc | 2020-12-28 15:15:34 -0800 | [diff] [blame] | 170 | RegisterSingletonModuleType(name string, factory SingletonModuleFactory) |
| Paul Duffin | eafc16b | 2021-02-24 01:43:18 +0000 | [diff] [blame] | 171 | RegisterPreSingletonType(name string, factory SingletonFactory) |
| Paul Duffin | f9b1da0 | 2019-12-18 19:51:55 +0000 | [diff] [blame] | 172 | RegisterSingletonType(name string, factory SingletonFactory) |
| Paul Duffin | a48f758 | 2019-12-19 11:25:19 +0000 | [diff] [blame] | 173 | PreArchMutators(f RegisterMutatorFunc) |
| Paul Duffin | a80ef84 | 2020-01-14 12:09:36 +0000 | [diff] [blame] | 174 | |
| 175 | // Register pre arch mutators that are hard coded into mutator.go. |
| 176 | // |
| 177 | // Only registers mutators for testing, is a noop on the InitRegistrationContext. |
| 178 | HardCodedPreArchMutators(f RegisterMutatorFunc) |
| 179 | |
| Paul Duffin | 2ccaffd | 2019-12-19 15:12:58 +0000 | [diff] [blame] | 180 | PreDepsMutators(f RegisterMutatorFunc) |
| 181 | PostDepsMutators(f RegisterMutatorFunc) |
| Martin Stjernholm | 710ec3a | 2020-01-16 15:12:04 +0000 | [diff] [blame] | 182 | FinalDepsMutators(f RegisterMutatorFunc) |
| Paul Duffin | f9b1da0 | 2019-12-18 19:51:55 +0000 | [diff] [blame] | 183 | } |
| 184 | |
| 185 | // Used to register build components from an init() method, e.g. |
| 186 | // |
| 187 | // init() { |
| 188 | // RegisterBuildComponents(android.InitRegistrationContext) |
| 189 | // } |
| 190 | // |
| 191 | // func RegisterBuildComponents(ctx android.RegistrationContext) { |
| 192 | // ctx.RegisterModuleType(...) |
| 193 | // ... |
| 194 | // } |
| 195 | // |
| 196 | // Extracting the actual registration into a separate RegisterBuildComponents(ctx) function |
| 197 | // allows it to be used to initialize test context, e.g. |
| 198 | // |
| Colin Cross | ae8600b | 2020-10-29 17:09:13 -0700 | [diff] [blame] | 199 | // ctx := android.NewTestContext(config) |
| Paul Duffin | f9b1da0 | 2019-12-18 19:51:55 +0000 | [diff] [blame] | 200 | // RegisterBuildComponents(ctx) |
| Paul Duffin | 0a28683 | 2019-12-19 12:23:01 +0000 | [diff] [blame] | 201 | var InitRegistrationContext RegistrationContext = &initRegistrationContext{ |
| 202 | moduleTypes: make(map[string]ModuleFactory), |
| 203 | singletonTypes: make(map[string]SingletonFactory), |
| 204 | } |
| Paul Duffin | f9b1da0 | 2019-12-18 19:51:55 +0000 | [diff] [blame] | 205 | |
| 206 | // Make sure the TestContext implements RegistrationContext. |
| 207 | var _ RegistrationContext = (*TestContext)(nil) |
| 208 | |
| Paul Duffin | 0a28683 | 2019-12-19 12:23:01 +0000 | [diff] [blame] | 209 | type initRegistrationContext struct { |
| Colin Cross | 9aed5bc | 2020-12-28 15:15:34 -0800 | [diff] [blame] | 210 | moduleTypes map[string]ModuleFactory |
| 211 | singletonTypes map[string]SingletonFactory |
| Paul Duffin | eafc16b | 2021-02-24 01:43:18 +0000 | [diff] [blame] | 212 | preSingletonTypes map[string]SingletonFactory |
| Colin Cross | 9aed5bc | 2020-12-28 15:15:34 -0800 | [diff] [blame] | 213 | moduleTypesForDocs map[string]reflect.Value |
| Paul Duffin | 0a28683 | 2019-12-19 12:23:01 +0000 | [diff] [blame] | 214 | } |
| Paul Duffin | f9b1da0 | 2019-12-18 19:51:55 +0000 | [diff] [blame] | 215 | |
| Paul Duffin | 0a28683 | 2019-12-19 12:23:01 +0000 | [diff] [blame] | 216 | func (ctx *initRegistrationContext) RegisterModuleType(name string, factory ModuleFactory) { |
| 217 | if _, present := ctx.moduleTypes[name]; present { |
| 218 | panic(fmt.Sprintf("module type %q is already registered", name)) |
| 219 | } |
| 220 | ctx.moduleTypes[name] = factory |
| Paul Duffin | f9b1da0 | 2019-12-18 19:51:55 +0000 | [diff] [blame] | 221 | RegisterModuleType(name, factory) |
| Colin Cross | 9aed5bc | 2020-12-28 15:15:34 -0800 | [diff] [blame] | 222 | RegisterModuleTypeForDocs(name, reflect.ValueOf(factory)) |
| 223 | } |
| 224 | |
| 225 | func (ctx *initRegistrationContext) RegisterSingletonModuleType(name string, factory SingletonModuleFactory) { |
| 226 | s, m := SingletonModuleFactoryAdaptor(name, factory) |
| 227 | ctx.RegisterSingletonType(name, s) |
| 228 | ctx.RegisterModuleType(name, m) |
| 229 | // Overwrite moduleTypesForDocs with the original factory instead of the lambda returned by |
| 230 | // SingletonModuleFactoryAdaptor so that docs can find the module type documentation on the |
| 231 | // factory method. |
| 232 | RegisterModuleTypeForDocs(name, reflect.ValueOf(factory)) |
| Paul Duffin | f9b1da0 | 2019-12-18 19:51:55 +0000 | [diff] [blame] | 233 | } |
| 234 | |
| Paul Duffin | 0a28683 | 2019-12-19 12:23:01 +0000 | [diff] [blame] | 235 | func (ctx *initRegistrationContext) RegisterSingletonType(name string, factory SingletonFactory) { |
| 236 | if _, present := ctx.singletonTypes[name]; present { |
| 237 | panic(fmt.Sprintf("singleton type %q is already registered", name)) |
| 238 | } |
| 239 | ctx.singletonTypes[name] = factory |
| Paul Duffin | f9b1da0 | 2019-12-18 19:51:55 +0000 | [diff] [blame] | 240 | RegisterSingletonType(name, factory) |
| 241 | } |
| Paul Duffin | a48f758 | 2019-12-19 11:25:19 +0000 | [diff] [blame] | 242 | |
| Paul Duffin | eafc16b | 2021-02-24 01:43:18 +0000 | [diff] [blame] | 243 | func (ctx *initRegistrationContext) RegisterPreSingletonType(name string, factory SingletonFactory) { |
| 244 | if _, present := ctx.preSingletonTypes[name]; present { |
| 245 | panic(fmt.Sprintf("pre singleton type %q is already registered", name)) |
| 246 | } |
| 247 | ctx.preSingletonTypes[name] = factory |
| 248 | RegisterPreSingletonType(name, factory) |
| 249 | } |
| 250 | |
| Paul Duffin | 0a28683 | 2019-12-19 12:23:01 +0000 | [diff] [blame] | 251 | func (ctx *initRegistrationContext) PreArchMutators(f RegisterMutatorFunc) { |
| Paul Duffin | a48f758 | 2019-12-19 11:25:19 +0000 | [diff] [blame] | 252 | PreArchMutators(f) |
| 253 | } |
| Paul Duffin | 2ccaffd | 2019-12-19 15:12:58 +0000 | [diff] [blame] | 254 | |
| Paul Duffin | a80ef84 | 2020-01-14 12:09:36 +0000 | [diff] [blame] | 255 | func (ctx *initRegistrationContext) HardCodedPreArchMutators(f RegisterMutatorFunc) { |
| 256 | // Nothing to do as the mutators are hard code in preArch in mutator.go |
| 257 | } |
| 258 | |
| Paul Duffin | 2ccaffd | 2019-12-19 15:12:58 +0000 | [diff] [blame] | 259 | func (ctx *initRegistrationContext) PreDepsMutators(f RegisterMutatorFunc) { |
| 260 | PreDepsMutators(f) |
| 261 | } |
| 262 | |
| 263 | func (ctx *initRegistrationContext) PostDepsMutators(f RegisterMutatorFunc) { |
| 264 | PostDepsMutators(f) |
| 265 | } |
| Martin Stjernholm | 710ec3a | 2020-01-16 15:12:04 +0000 | [diff] [blame] | 266 | |
| 267 | func (ctx *initRegistrationContext) FinalDepsMutators(f RegisterMutatorFunc) { |
| 268 | FinalDepsMutators(f) |
| 269 | } |