Allow missing variants when allowMissingDependencies=true
This commit is contained in:
parent
215230a3e8
commit
b77556bdca
1 changed files with 14 additions and 0 deletions
14
context.go
14
context.go
|
@ -1548,6 +1548,11 @@ func (c *Context) addDependency(module *moduleInfo, tag DependencyTag, depName s
|
|||
return nil
|
||||
}
|
||||
|
||||
if c.allowMissingDependencies {
|
||||
// Allow missing variants.
|
||||
return c.discoveredMissingDependencies(module, depName+c.prettyPrintVariant(module.dependencyVariant))
|
||||
}
|
||||
|
||||
return []error{&BlueprintError{
|
||||
Err: fmt.Errorf("dependency %q of %q missing variant:\n %s\navailable variants:\n %s",
|
||||
depName, module.Name(),
|
||||
|
@ -1578,6 +1583,11 @@ func (c *Context) findReverseDependency(module *moduleInfo, destName string) (*m
|
|||
return m, nil
|
||||
}
|
||||
|
||||
if c.allowMissingDependencies {
|
||||
// Allow missing variants.
|
||||
return module, c.discoveredMissingDependencies(module, destName+c.prettyPrintVariant(module.dependencyVariant))
|
||||
}
|
||||
|
||||
return nil, []error{&BlueprintError{
|
||||
Err: fmt.Errorf("reverse dependency %q of %q missing variant:\n %s\navailable variants:\n %s",
|
||||
destName, module.Name(),
|
||||
|
@ -1638,6 +1648,10 @@ func (c *Context) addVariationDependency(module *moduleInfo, variations []Variat
|
|||
}
|
||||
|
||||
if foundDep == nil {
|
||||
if c.allowMissingDependencies {
|
||||
// Allow missing variants.
|
||||
return c.discoveredMissingDependencies(module, depName+c.prettyPrintVariant(newVariant))
|
||||
}
|
||||
return []error{&BlueprintError{
|
||||
Err: fmt.Errorf("dependency %q of %q missing variant:\n %s\navailable variants:\n %s",
|
||||
depName, module.Name(),
|
||||
|
|
Loading…
Reference in a new issue