← Back to issue list

Unclear remote build error with ``--build-for`` on core20

View original Github issue

Metadata

Project
snapcraft
Number
#5817
Type
issue
State
open
Author
bepri
Labels
Status: Triaged Type: Bug
Created
Updated
Closed

Current evaluation

core20 remote-build with --build-for and long-form architectures emits a misleading --build-on error. Triaged by maintainers as a likely legacy limitation; addressed in 8.14.4 via PR #6090 which improved the error message.

Suggested action: keep open

Reason: The issue is triaged (Status: Triaged, Type: Bug) and was actively scoped by @mr-cal with a concrete plan (test across versions, document limitation, add warning). The 8.14.4 release notes list #5817 as fixed and PR #6090 improved the error, but the underlying limitation (legacy remote builder not supporting --build-for with long-form architectures) may still exist, so the issue should remain open until maintainers confirm the scope of work is complete.

Impact: 40 Quick Win: 22.0 Staleness: 25 Complexity: 45 Confidence: 85 Support Request: 10

Issue body

### Bug Description When building a core20 project _not_ using the architecture shorthand, `--build-for` produces the following error: ``` Error: Cannot use --build-on, architecture list is already set in snapcraft.yaml. ``` ### To Reproduce Run `snapcraft remote-build --build-for amd64` with the attached project. ### Environment snapcraft 8.12.0, ubuntu 25.04 ### snapcraft.yaml ```yaml name: testing # you probably want to 'snapcraft register <name>' base: core20 # the base snap is the execution environment for this snap version: "0.1" # just for humans, typically '1.2+git' or '1.3.2' summary: Single-line elevator pitch for your amazing snap # 79 char long summary description: | This is my-snap's description. You have a paragraph or two to tell the most important story about your snap. Keep it under 100 words though, we live in tweetspace and your description wants to look good in the snap store. grade: devel # must be 'stable' to release into candidate/stable channels confinement: devmode # use 'strict' once you have the right plugs and slots architectures: - build-on: [arm64] run-on: [arm64] - build-on: [amd64] run-on: [amd64] parts: my-part: # See 'snapcraft plugins' plugin: nil ``` ### Relevant log output ```shell n/a ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 40
Quick Win: 22.0
Staleness: 25
Complexity: 45
Confidence: 85
Support Request: 10
keep open core20 remote-build with --build-for and long-form architectures emits a misleading --build-on error. Triaged by maintainers as a likely legacy limitation; addressed in 8.14.4 via PR #6090 which improved the error message.
qwen/qwen3.6-35b-a3b
Staleness: 45
Complexity: 20
Confidence: 85
Support Request: 10
keep open Remote build fails with unclear error when using --build-for alongside architectures in snapcraft.yaml. Maintainer suspects legacy limitation and proposed scoping work to verify version behavior and either document the limitation or plan a fix.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 40
Confidence: 90
Support Request: 10
keep open Reports unclear error when using --build-for with core20 projects that explicitly define architectures. Currently under maintainer investigation to determine if it is a regression or legacy limitation.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 40
Confidence: 90
Support Request: 5
keep open Unclear error using --build-for on core20 projects with explicit architectures. Triaged. Maintainer suspects a legacy limitation, planning to test historical versions to decide whether to document the behavior with a warning or fix it.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: snapcraft#6090 (confidence 80%)

    Commit 527ff6d2c 'feat(remote-build/legacy): improve error when building with --build-for (#6090)' and 8.14.4 release notes list #5817 as fixed.

  • Related To: snapcraft#5789 (confidence 75%)

    Closed as unfixable due to historical core20 behavior; the remote-build --build-for inconsistency was tracked separately in #5817 (this issue).

  • Related To: snapcraft#5819 (confidence 70%)

    PR attempting to fix legacy remote build --build-for with long-form architectures; closed in favor of #6090.

Related issues

Issue Project State Summary Similarity
#5819 fix(legacy): accept --build-for on long-form architecture remote build snapcraft closed Superseded by PR #6090. This PR attempted to fix legacy remote build handling of the --build-for flag with long-form architectures. Testing revealed it still failed, so the maintainer closed it in favor of a newer fix.
74%
#6090 feat(remote-build/legacy): improve error when building with --build-for snapcraft merged Merged improvement to legacy remote builder error messaging for --build-for. Clarifies that --build-on is unsupported and provides actionable guidance, resolving #5817 and superseding #5819.
74%
#5789 `core20` behaviour with short-hand architecture snapcraft closed Closed without fixing the core20 shorthand architecture bug, deemed a load-bearing behavior that cannot be changed. The related remote-build inconsistency was identified as a separate fixable issue tracked in #5817.
71%
#4724 feat(remote)!: use craft-application remote build for core22 snapcraft merged Replaced deprecated remote build code with craft-application for core22. Core20 support enabled via environment variable. The --build-on flag was removed. Fixes #4710. Merged after approval and passing CI checks.
71%