project loader grammar: do not transform build-packages
Metadata
Current evaluation
Merged a maintainer change to the project loader grammar that stops transforming build-packages. This prevents architecture conflicts and resolves undocumented behavior while preserving compatibility with explicit target-arch configurations.
Suggested action: —
No scores available.
Issue body
Build packages are almost never supposed to be a foreign
architecture. This may work if the package is effectively
a source package, but it ultimately very prone to conflicts
with the native host package.
Given that:
1. This behavior is more likely to do harm than good, it seems
doubtful that it has ever been in use.
2. This behavior appears to be undocumented.
3. Usage will continue to work in the cases where the
user is explicitly setting target-arch for build packages.
4. Usage will likely work in cases where the user is getting
the implied target-arch package.
5. Cross-compiling via --target-arch is quite limited.
This patch applies this change globally.
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
- [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged a maintainer change to the project loader grammar that stops transforming build-packages. This prevents architecture conflicts and resolves undocumented behavior while preserving compatibility with explicit target-arch configurations. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a project loader grammar update disabling automatic architecture transformation for build-packages. This prevents native host package conflicts, as foreign architecture for build packages is rarely needed. The change applies globally. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a global grammar fix preventing automatic transformation of build-packages to foreign architectures. This resolves undocumented behavior prone to host package conflicts, with negligible coverage impact. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1511 project_loader: support grammar on build-packages | snapcraft | merged | Merged: Added grammar support for build-packages at part and global levels. Approved by one reviewer, passed CI, and modified 19 files. Builds on issue #1492 and depends on PR #1509. | |
| #1500 grammar: move into project_loader | snapcraft | merged | Merged the stage package grammar extraction from pluginhandler into the refactored project_loader package. This structural change improves separation of concerns and establishes a generic foundation for broader YAML grammar usage. |