error messages: compute connections between conditions
This commit is contained in:
parent
9d20be5fe5
commit
004ff9d4e2
@ -1289,7 +1289,7 @@ def package_dependencies_rules(self, pkg):
|
||||
if not deptypes:
|
||||
continue
|
||||
|
||||
msg = "%s depends on %s" % (pkg.name, dep.spec.name)
|
||||
msg = "%s depends on %s" % (pkg.name, dep.spec)
|
||||
if cond != spack.spec.Spec():
|
||||
msg += " when %s" % cond
|
||||
|
||||
|
@ -203,6 +203,28 @@ attr(Name, A1, A2, A3, A4) :- impose(ID), imposed_constraint(ID, Name, A1, A2, A
|
||||
not imposed_constraint(Hash, "node_flag", Package, FlagType, Flag),
|
||||
internal_error("imposed hash without imposing all flag values").
|
||||
|
||||
% associated conditions by cause -> effect
|
||||
condition_cause(Effect, Cause) :-
|
||||
condition_holds(Effect), condition_holds(Cause),
|
||||
attr(Name, A1),
|
||||
condition_requirement(Effect, Name, A1),
|
||||
imposed_constraint(Cause, Name, A1).
|
||||
condition_cause(Effect, Cause) :-
|
||||
condition_holds(Effect), condition_holds(Cause),
|
||||
attr(Name, A1, A2),
|
||||
condition_requirement(Effect, Name, A1, A2),
|
||||
imposed_constraint(Cause, Name, A1, A2).
|
||||
condition_cause(Effect, Cause) :-
|
||||
condition_holds(Effect), condition_holds(Cause),
|
||||
attr(Name, A1, A2, A3),
|
||||
condition_requirement(Effect, Name, A1, A2, A3),
|
||||
imposed_constraint(Cause, Name, A1, A2, A3).
|
||||
condition_cause(Effect, Cause) :-
|
||||
condition_holds(Effect), condition_holds(Cause),
|
||||
attr(Name, A1, A2, A3, A4),
|
||||
condition_requirement(Effect, Name, A1, A2, A3, A4),
|
||||
imposed_constraint(Cause, Name, A1, A2, A3, A4).
|
||||
|
||||
#defined condition/2.
|
||||
#defined condition_requirement/3.
|
||||
#defined condition_requirement/4.
|
||||
|
@ -24,4 +24,8 @@
|
||||
#show error/5.
|
||||
#show error/6.
|
||||
|
||||
% show cause -> effect data for errors
|
||||
#show condition_cause/2.
|
||||
#show condition/2.
|
||||
|
||||
% debug
|
||||
|
Loading…
Reference in New Issue
Block a user