grammar: support compound on..to statement
Metadata
Current evaluation
Merged PR #2088 in commit d81e0fa38, adding compound on <arch> to <arch> grammar and defaulting packages to the target architecture; fixes #1689.
Resolution: closed resolved
Reason: PR #2088 was merged as commit d81e0fa38, implementing the compound on-to statement and its target-architecture default.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
-----
Snapcraft currently supports a few different standalone statements in its grammar. However, as [designed in the forum](https://forum.snapcraft.io/t/specifying-architecture-on-cross-compilations/1641/20), there is a desire to support a compound version of the **on** and **to** statements. Specifically, referring back to that post, this PR implements numbers 7 and 8:
> 7. The two statements may be used together as “on <arch> to <arch>:” to precisely specify the case of a particular cross-compilation
> 8. The default architecture for packages under “on <arch> to <arch>:” is the target architecture
This PR lays the groundwork for compound statements, and implements the on..to compound statement. Note that this PR is based upon #1800, and it fixes #1689.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2088 in commit d81e0fa38, adding compound on <arch> to <arch> grammar and defaulting packages to the target architecture; fixes #1689. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2088 as d81e0fa38, adding compound on <arch> to <arch> grammar and making the target architecture the package default. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged implementation of compound on..to grammar statements for Snapcraft, resolving issue #1689. Approved by one reviewer with passing CI. A maintainer noted potential macOS test impacts requiring future guards. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged implementation of compound on..to grammar statements for Snapcraft, resolving #1689. Enables precise cross-compilation targeting. A maintainer flagged potential OSX test breakage and recommended adding temporary guards until a full refactor. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
snapcraft#1689
(confidence 100%)
PR #2088 explicitly fixes the on <arch> to selectors issue.
-
Superseded By:
snapcraft#1800
(confidence 95%)
The earlier PR was based on #1800 and was superseded by the merged implementation in #2088.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1639 grammar: to statement | snapcraft | merged | Merged in canonical/snapcraft#1639 via f5e82e550, adding “to <arch>:” selectors and target-architecture defaults. Compound “on <arch> to <arch>:” support followed in #2088. | |
| #1857 grammar: make on statement work with host arch | snapcraft | merged | Merged as b451f48fc: package selectors now distinguish host architecture with on, target architecture with to, and combined on-to cases. | |
| #1800 grammar: on..to statement | snapcraft | closed | Closed unmerged; its compound on <arch> to <arch> grammar was implemented by merged PR #2088 in commit d81e0fa38. | |
| #1689 Implement "on <arch> to" selectors (statements) in project_loader | snapcraft | closed | Compound on <arch> to <arch> selectors were implemented by merged PR #2088 (d81e0fa38); the earlier #1800 attempt closed unmerged. |