Merge "Reset contexts before calling LoadHook"
This commit is contained in:
commit
33132a4fd5
1 changed files with 8 additions and 8 deletions
|
@ -1368,16 +1368,16 @@ func runAndRemoveLoadHooks(ctx *Context, config interface{}, module *moduleInfo,
|
|||
|
||||
if v, exists := pendingHooks.Load(module.logicModule); exists {
|
||||
hooks := v.(*[]LoadHook)
|
||||
mctx := &loadHookContext{
|
||||
baseModuleContext: baseModuleContext{
|
||||
context: ctx,
|
||||
config: config,
|
||||
module: module,
|
||||
},
|
||||
scopedModuleFactories: scopedModuleFactories,
|
||||
}
|
||||
|
||||
for _, hook := range *hooks {
|
||||
mctx := &loadHookContext{
|
||||
baseModuleContext: baseModuleContext{
|
||||
context: ctx,
|
||||
config: config,
|
||||
module: module,
|
||||
},
|
||||
scopedModuleFactories: scopedModuleFactories,
|
||||
}
|
||||
hook(mctx)
|
||||
newModules = append(newModules, mctx.newModules...)
|
||||
deps = append(deps, mctx.ninjaFileDeps...)
|
||||
|
|
Loading…
Reference in a new issue