← Back to issue list

Implement --build-for in addition to --platform

View original Github issue

Metadata

Project
craft-application
Number
#254
Type
issue
State
closed
Author
cmatsuoka
Labels
—
Created
Updated
Closed

Current evaluation

Implemented --build-for platform selection in merged PR canonical/craft-application#272 (commit e99ee656).

Resolution: closed resolved

Reason: PR #272 was approved and merged, adding build-for and build-on build-plan filtering and explicitly fixing issue #254.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### What needs to get done When `platforms:` is used, craft applications should be able to select build platforms using `--build-for`, according to the following rules: - If there's only one platform entry with the specified target architecture, choose that one. - If that results in more than one entry, and there's one entry using the architecture name as the platform name, choose that one. - Otherwise fail with an error. ### Why it needs to get done `--build-for` is extensively used and there's a reasonable way to map it to pick platform entries.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Implemented --build-for platform selection in merged PR canonical/craft-application#272 (commit e99ee656).
stealth/space-bunny-alpha — closed stale The --build-for platform-selection request was closed without a documented fix, replacement, or further activity for over two years.
qwen/qwen3.6-35b-a3b — — Closed without implementation or an associated pull request. No fix or merge details were provided, indicating the feature request was likely abandoned or deferred.
qwen/qwen3.6-35b-a3b — — Requesting --build-for platform selection was closed as superseded. A maintainer confirmed that existing platforms configuration syntax already handles the desired behavior, resolving the need for new code.

Update history

No update history recorded yet.

Related work

Related issues

Issue Project State Summary Similarity
#360 Allow build-for "all" for platform-independent builds. craft-application closed Merged PR #365 to support build-for [all] for platform-independent builds, including validation, an application-level opt-out, and tests; resolved #360 and CRAFT-3016.
77%
#365 feat: accept build-for: [all] in platforms craft-application merged Merged PR canonical/craft-application#365 (CRAFT-3016): accepts 'build-for: [all]' in platform definitions, disallowing other platforms when set; closes craft-application#360, related to snapcraft#4854.
75%
#192 Introduce a platform format that can have both `build-for: all` and architecture-specific builds craft-platforms closed Implemented Debcraft-specific mixed-architecture and build-for-all platform handling in merged PR #197 (commit 312896f).
73%
#272 feat(platforms): support --build-for to select platform craft-application merged PR #272 (merge commit e99ee656) added --build-for platform selection with build-on/build-for plan filtering and host_arch support in _filter_plan; approved and merged by maintainer syu-w, fixing #254.
73%
#83 Support "platforms" for the build plans craft-application closed Platform support for build plans was merged in craft-application#86 (commit e494797a), adding platform-name selection/filtering and closing #83.
72%
#4994 fix(remotebuild): parse '--build-for' and '--platform' snapcraft merged Merged as 5cd480725: remote-build now parses and validates --build-for and --platform, enforces usage restrictions, and updates error and command documentation.
70%