For the record, I was trying to add an extra layer of checks:
let check_ids node_list =
let compare ta tb = String.compare (Target.id ta) (Target.id tb) in
match node_list |> List.find_a_dup ~compare with
| None -> node_list
| Some trgt ->
Log.(s "Check-IDs-error: " % n
% s "There are duplicate IDs within the workflow, \
consider making your workflow generation not rely \
on constants." % n
% s "Example: " %n
% Target.log trgt
@ error);
failwith (fmt "Duplicate ID found: %s" (Target.id trgt))
But it's actually impossible to trigger, since the flatten_to_pure_targets already removes “internal duplicates.”
This fixes #538.
For the record, I was trying to add an extra layer of checks:
But it's actually impossible to trigger, since the
flatten_to_pure_targets
already removes “internal duplicates.”