vala: Fix duplicate output detection

The same vapi or vala might be added multiple times. Don't freak out if
that happens. Only freak out if a vapi or vala generated source by the
same name and the output same path is added twice.

This should never happen anyway since we would refuse to create the
target in the first place in theory, but it might happen because of bugs
in generators and custom targets.

Closes #1084
pull/1194/head
Nirbheek Chauhan 8 years ago
parent 627faa0d39
commit fc540b72a6
  1. 2
      mesonbuild/backend/ninjabackend.py

@ -951,7 +951,7 @@ int dummy;
else: else:
srctype = othersgen srctype = othersgen
# Duplicate outputs are disastrous # Duplicate outputs are disastrous
if f in srctype: if f in srctype and srctype[f] is not gensrc:
msg = 'Duplicate output {0!r} from {1!r} {2!r}; ' \ msg = 'Duplicate output {0!r} from {1!r} {2!r}; ' \
'conflicts with {0!r} from {4!r} {3!r}' \ 'conflicts with {0!r} from {4!r} {3!r}' \
''.format(f, type(gensrc).__name__, gensrc.name, ''.format(f, type(gensrc).__name__, gensrc.name,

Loading…
Cancel
Save