Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature module: Fix handling of multiple conflicts per attribute #12

Open
wants to merge 1 commit into
base: main-numpymeson
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions mesonbuild/modules/features/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,15 +371,12 @@ def fail_result(fail_reason: str, is_disabled: bool = False
values: List[ConflictAttr] = getattr(fet, attr)
accumulate_values = test_result[attr] # type: ignore
for conflict in values:
if not conflict.match:
accumulate_values.append(conflict.val)
continue
conflict_vals: List[str] = []
# select the acc items based on the match
new_acc: List[str] = []
for acc in accumulate_values:
# not affected by the match so we keep it
if not conflict.match.match(acc):
if not (conflict.match and conflict.match.match(acc)):
new_acc.append(acc)
continue
# no filter so we totaly escape it
Expand All @@ -396,7 +393,7 @@ def fail_result(fail_reason: str, is_disabled: bool = False
continue
conflict_vals.append(conflict.mjoin.join(filter_val))
new_acc.append(conflict.val + conflict.mjoin.join(conflict_vals))
test_result[attr] = new_acc # type: ignore
accumulate_values = test_result[attr] = new_acc # type: ignore

test_args = compiler.has_multi_arguments
args = test_result['args']
Expand Down