← Back to issue list

grammar: on..to statement

View original Github issue

Metadata

Project
snapcraft
Number
#1800
Type
pull request
State
closed
Author
kalikiana
Labels
—
Created
Updated
Closed

Current evaluation

Closed unmerged; its compound on <arch> to <arch> grammar was implemented by merged PR #2088 in commit d81e0fa38.

Resolution: closed superseded

Reason: PR #1800 was superseded by PR #2088, which merged as d81e0fa38, added compound on <arch> to <arch> parsing, and made the target architecture the package 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`? ----- This is the implementation of the "to" statement [as discussed in the forum](https://forum.snapcraft.io/t/specifying-architecture-on-cross-compilations/1641/20). This PR implements the **bold items**. Items 4, 5 and 6 are implemented in #1639. 1. The existing “on <arch>:” syntax will be accepted under build-packages as well 2. The default architecture for packages under “on <arch>” is the one from the build machine 3. Packages under “on <arch>:” are installed only when the build machine has that architecture 4. A new “to <arch>:” statement will be supported in build-packages and stage-packages 5. The default architecture for packages under “to <arch>:” is the target architecture 6. Packages under “to <arch>:” are installed only when the target architecture is the one listed, which includes both a cross-compilation towards that architecture and a native build on that architecture 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** Docs: [snappy-docs#325](https://github.com/canonical-docs/snappy-docs/pull/325)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed superseded Closed unmerged; its compound on <arch> to <arch> grammar was implemented by merged PR #2088 in commit d81e0fa38.
stealth/space-bunny-alpha — closed superseded PR #1800 (compound 'on..to' grammar) was closed unmerged and superseded by #2088, merged as d81e0fa38, which added the 'on <arch> to <arch>' grammar with target-arch default packages and fixed #1689.
stealth/space-bunny-alpha — closed superseded PR implementing the "to <arch>:" grammar (incl. compound on..to) was closed unmerged after refactoring; the feature landed later via PR #2088, commit d81e0fa38, which also closed issue #1689.
stealth/space-bunny-alpha — closed superseded Closed unmerged and superseded by #2088 (d81e0fa38), which added compound on <arch> to <arch> grammar and made the target architecture the package default.
qwen/qwen3.6-35b-a3b — — The on..to grammar PR was closed and superseded. Maintainers requested refactoring to dynamically parse the compound syntax as nested statements during processing. The author began investigating this alternative approach before closure.
qwen3.6-35b-a3b-mtp-q6 — — Closed without merging. Reviewers requested dynamically rewriting the on..to syntax into nested on: to blocks during parsing to reduce duplication. The contributor began refactoring, but the PR was superseded by the new approach.

Update history

No update history recorded yet.

Related work

  • Superseded By: snapcraft#2088 (confidence 100%)

    Merged PR implementing the compound on-to grammar intended by #1800.

  • Related To: snapcraft#1857 (confidence 95%)

    Merged prerequisite that refined on-statement behavior before #1800 was reworked.

Related issues

Issue Project State Summary Similarity
#2088 grammar: support compound on..to statement snapcraft merged Merged PR #2088 in commit d81e0fa38, adding compound on <arch> to <arch> grammar and defaulting packages to the target architecture; fixes #1689.
75%
#1966 grammar: support `to` statement in source snapcraft closed RFC spike #1966 proposed architecture-aware transformations for `to` but was closed unmerged. Related compound `on..to` grammar later merged in #2088 (d81e0fa38).
72%
#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.
71%