← Back to issue list

fix(remotebuild): parse '--build-for' and '--platform'

View original Github issue

Metadata

Project
snapcraft
Number
#4994
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Merged as 5cd480725: remote-build now parses and validates --build-for and --platform, enforces usage restrictions, and updates error and command documentation.

Resolution: closed resolved

Reason: PR snapcraft#4994 merged as commit 5cd480725, implementing remote-build parsing and validation for both options, rejecting incompatible metadata and core22 use, and improving related documentation.

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] Have you successfully run `tox run -m lint`? - [x] Have you successfully run `tox run -e test-py310`? (supported versions: `py39`, `py310`, `py311`, `py312`) ----- * '--build-for' and '--platform' can only be used when 'platforms' and 'architectures' are not defined in the project metadata * '--platform' cannot be used for core22 snaps * Add links to documentation for remote-build errors * Update remote-build documentation Creates #4992 Fixes #4858 Fixes #4881 (CRAFT-3070)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged as 5cd480725: remote-build now parses and validates --build-for and --platform, enforces usage restrictions, and updates error and command documentation.
stealth/space-bunny-alpha — closed resolved Merged in canonical/snapcraft#4994 (5cd480725): added remote-build parsing and validation for --build-for and --platform, with usage restrictions and updated documentation.
qwen/qwen3.6-35b-a3b — — Merged fix for remote-build parsing of --build-for and --platform flags. Enforces flag restrictions, updates documentation, and resolves issues #4858 and #4881. Approved by two reviewers with passing CI checks.
qwen3.6-35b-a3b-mtp-q6 — — Merged fix for remote build flag parsing. Handles --build-for and --platform options, restricts usage when platforms or architectures are defined, blocks --platform on core22, updates docs, and resolves #4858 and #4881.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: snapcraft#4858 (confidence 100%)

    PR #4994 explicitly fixes remote-build parsing failures involving --platform.

  • Likely Fixed By: snapcraft#4881 (confidence 100%)

    PR #4994 explicitly fixes --platform and --build-for handling when platforms or architectures are undefined.

  • Related To: snapcraft#4992 (confidence 100%)

    PR #4994 created the tracking issue; its behavior was later reworked by merged PR snapcraft#5216.

Related issues

Issue Project State Summary Similarity
#5028 fix(remotebuild): parse comma-separated architectures snapcraft merged Merged PR #5028 (commit 189edf429) restored comma-separated parsing for remote-build --build-for and --platform, fixing #4990.
78%
#4990 remote build: Allow comma-separated values for `--build-for` and `--platform` snapcraft closed Regression in remote-build parsing of comma-separated `--build-for`/`--platform` values was restored by merged PR #5028 (commit 189edf429). Maintainer mr-cal closed the issue on 2024-09-13 pointing to #5028.
77%
#6453 fix(remote-build): error with a resolution when '--platform' is used snapcraft closed PR #6453 proposed clearer remote-build --platform guidance pointing to --build-for, but was closed unmerged after no review; issue #5387 remains open.
77%
#4858 remote build: platform definitions cannot be parsed by Launchpad snapcraft closed Launchpad parsing was addressed upstream, and merged PR canonical/snapcraft#4994 (5cd480725) fixed remote-build handling of --platform and --build-for.
71%
#5216 feat(remotebuild)!: filter build-plan with --build-for, drop --platform snapcraft merged Merged as commit 359a364cb (CRAFT-3277): `remote-build` now filters the build plan with `--build-for`, `--platform` was removed, and Launchpad errors are caught instead of surfacing as internal errors. Ships in snapcraft 8.7; closes #4992.
71%
#254 Implement --build-for in addition to --platform craft-application closed Implemented --build-for platform selection in merged PR canonical/craft-application#272 (commit e99ee656).
70%