Stop processing modules when one fails.
This change causes Blueprint to stop calling GenerateBuildActions on modules when one such call results in errors being generated. If a module has failed for some reason and another module depends on it, then processing the dependee could end up trying to use the failed module, which may be in an invalid state. Change-Id: I5cc165b7f4e169f90e9570ec7b2a5f9baac2895a
This commit is contained in:
parent
6a40c19e1c
commit
ae4430cd9e
1 changed files with 6 additions and 0 deletions
|
@ -726,6 +726,9 @@ func (c *Context) generateModuleBuildActions(config interface{},
|
|||
for _, dep := range info.directDeps {
|
||||
if !visited[dep] {
|
||||
walk(dep)
|
||||
if len(errs) > 0 {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -755,6 +758,9 @@ func (c *Context) generateModuleBuildActions(config interface{},
|
|||
for _, module := range c.modules {
|
||||
if !visited[module] {
|
||||
walk(module)
|
||||
if len(errs) > 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue