← Back to issue list

If architecture after to is an array, it is not matched corretly

View original Github issue

Metadata

Project
craft-grammar
Number
#31
Type
issue
State
open
Author
dariuszd21
Labels
Created
Updated
Closed

Current evaluation

to clause with multiple selectors (e.g. to amd64,arm64) never matches because selectors use AND logic, not OR. Maintainers confirmed this is by design but documentation is misleading. mr-cal committed to fixing docs in June 2024; no evidence of completion since.

Suggested action: keep open

Reason: Maintainers mr-cal and dilyn-corner actively discussed the issue and confirmed the AND behavior is by design, with mr-cal explicitly stating 'I am happy to fix it and will try to make the document less misleading.' No labels or assignee were set, and there is no evidence the documentation fix was completed in the 486 days since last activity, so the documentation concern likely remains open.

Impact: 40 Quick Win: 28.0 Staleness: 65 Complexity: 30 Confidence: 60 Support Request: 15

Issue body

If there is a to set to an array e.g. (`to [amd64,arm64]`) and not single value (e.g. `to amd64`), grammar processor does not handle it correctly. The value is accepted, but it's never matched. I think it should either raise validation error if array is not an accepted value, or match architecture correctly. Here is an example failing UT: https://github.com/canonical/craft-grammar/commit/cc15ba9cc65b46b5451f541b640b46a7a1277a4a

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 40
Quick Win: 28.0
Staleness: 65
Complexity: 30
Confidence: 60
Support Request: 15
keep open to clause with multiple selectors (e.g. to amd64,arm64) never matches because selectors use AND logic, not OR. Maintainers confirmed this is by design but documentation is misleading. mr-cal committed to fixing docs in June 2024; no evidence of completion since.
qwen/qwen3.6-35b-a3b
Staleness: 85
Complexity: 20
Confidence: 85
Support Request: 80
close not a bug Clarification that the to clause uses AND logic for architecture selectors, not OR. Maintainers confirmed the behavior is intentional and noted documentation was misleading, with plans to update docs.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 10
Confidence: 90
Support Request: 90
close not a bug Clarification that to clause uses AND logic, making array syntax invalid for OR matching. Maintainers confirmed intended behavior and plan to update docs.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 15
Confidence: 90
Support Request: 85
close not a bug Grammar processor fails matching architecture arrays in to clauses. Discussion confirms to clauses use AND logic, making arrays invalid. Maintainer plans to update docs and add validation to reject unsupported syntax. Awaiting implementation.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.