Skip to content

Commit 7300f5f

Browse files
authored
Merge pull request #12 from Vogtinator/fix-feature-args
feature module: Fix handling of multiple conflicts per attribute
2 parents 0d93515 + 79e7c3c commit 7300f5f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

mesonbuild/modules/features/module.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -371,15 +371,12 @@ def fail_result(fail_reason: str, is_disabled: bool = False
371371
values: List[ConflictAttr] = getattr(fet, attr)
372372
accumulate_values = test_result[attr] # type: ignore
373373
for conflict in values:
374-
if not conflict.match:
375-
accumulate_values.append(conflict.val)
376-
continue
377374
conflict_vals: List[str] = []
378375
# select the acc items based on the match
379376
new_acc: List[str] = []
380377
for acc in accumulate_values:
381378
# not affected by the match so we keep it
382-
if not conflict.match.match(acc):
379+
if not (conflict.match and conflict.match.match(acc)):
383380
new_acc.append(acc)
384381
continue
385382
# no filter so we totaly escape it
@@ -396,7 +393,7 @@ def fail_result(fail_reason: str, is_disabled: bool = False
396393
continue
397394
conflict_vals.append(conflict.mjoin.join(filter_val))
398395
new_acc.append(conflict.val + conflict.mjoin.join(conflict_vals))
399-
test_result[attr] = new_acc # type: ignore
396+
accumulate_values = test_result[attr] = new_acc # type: ignore
400397

401398
test_args = compiler.has_multi_arguments
402399
args = test_result['args']

0 commit comments

Comments
 (0)