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:
Jamie Gennis 2014-07-23 14:37:21 -07:00
parent 6a40c19e1c
commit ae4430cd9e

View file

@ -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
}
}
}