feat(remote-build/legacy): improve error when building with --build-for
Metadata
Current evaluation
Merged PR #6090 improved legacy remote-builder errors for core20, clarifying that --build-for requires shorthand architectures because of Launchpad limitations. It addresses #5817 and supersedes #5819.
Resolution: closed resolved
Reason: Merged PR #6090 preserved legacy-builder behavior while replacing the misleading --build-on error with actionable architecture-notation guidance. The PR explicitly supersedes #5819 and addresses #5817 under SNAPCRAFT-1283.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Due to a limitation of Launchpad's legacy builder service that handles core20 projects, `--build-on` only works if a project is using the shorthand architecture notation. The legacy remote-builder has rejected `--build-on` at least since Snapcraft 4. Modern Snapcraft maps the more recent `--build-for` to `--build-on`, as documented in the legacy remote builder explanation page. This remapping caused a confusing error message previously, saying `--build-on` was the problem regardless of if it was actually used. The error message also did not word the problem in a way that a user could easily correct.
This PR preserves the behavior of the legacy remote-builder, but presents a much clearer error message for the problem.
<img width="612" height="282" alt="image" src="https://github.com/user-attachments/assets/6c84609a-1bd8-4326-bacd-d00852a0af43" />
Closes #5817.
Supersedes #5819.
SNAPCRAFT-1283
---
- [x] I've followed the [contribution guidelines](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md).
- [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/).
- [x] I've successfully run `make lint && make test`.
- [x] I've added or updated any relevant documentation.
- [x] I've updated the relevant release notes.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #6090 improved legacy remote-builder errors for core20, clarifying that --build-for requires shorthand architectures because of Launchpad limitations. It addresses #5817 and supersedes #5819. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #6090 made legacy remote-builder errors for --build-for actionable, explaining the core20/Launchpad limitation; it supersedes #5819 and addresses #5817. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #6090 (SNAPCRAFT-1283), improving legacy core20 remote-build errors for --build-for without changing behavior; resolves #5817 and supersedes #5819. | |
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged update improving legacy remote builder error messages when using --build-for. Clarifies the underlying --build-on limitation, replacing confusing output with actionable guidance. Closes #5817, supersedes #5819. |
Update history
No update history recorded yet.
Related work
-
Related To:
snapcraft#5819
(confidence 100%)
Earlier implementation was closed as superseded by PR #6090.
-
Related To:
snapcraft#5817
(confidence 98%)
Reported the confusing core20 remote-build error addressed by merged PR #6090.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #5819 fix(legacy): accept --build-for on long-form architecture remote build | snapcraft | closed | PR #5819 was closed as superseded by merged PR #6090 (commit 527ff6d2c), which improved the legacy remote-builder’s --build-for error handling instead. | |
| #5817 Unclear remote build error with ``--build-for`` on core20 | snapcraft | open | Legacy remote-build rejected --build-for on core20 long-form architectures with a cryptic 'architecture list is already set' error. Maintainers traced it to a long-standing Launchpad/legacy builder limitation; fixed as a better error message in #6090, and the legacy builder was later removed entirely. | |
| #4895 fix(remotebuild): require core20 snaps to use the legacy remote builder | snapcraft | merged | Merged in #4895 (d9c8781a1), requiring core20 remote builds to use the legacy builder because the new builder could not parse core20 snapcraft.yaml files; fixes #4886. | |
| #4724 feat(remote)!: use craft-application remote build for core22 | snapcraft | merged | Merged PR #4724 (9905f2831) switched core22 remote builds to craft-application, added a core20 disable-fallback opt-in, removed --build-on, and fixed #4710. | |
| #5351 fix(remote): error early for invalid platform usage | snapcraft | merged | PR #5351 merged as commit 0c224fc7d, adding an early, friendlier error when --build-for is used with shorthand project platforms instead of failing at Launchpad. Fixes #5270 (CRAFT-4186); restriction later lifted by #5687. | |
| #4886 Use legacy remote builder for core20 snaps | snapcraft | closed | Fixed by merged PR #4895 (commit d9c8781a1), routing core20 snaps to the legacy remote builder because the new builder could not parse architectures with run-on. | |
| #5687 feat(remote): allow using shorthand platforms with --build-for | snapcraft | merged | Merged PR #5687 (commit aa2d9ef0d), enabling --build-for with shorthand platform declarations after Launchpad removed the underlying restrictions. | |
| #4343 feat(remote-build): check base before executing | snapcraft | merged | Merged into main as commit 128e0acb2. Added base validation before remote-build, allowing fallback for core20/core22 while rejecting unsupported bases and fixing #4318. | |
| #5806 fix: show modern help text for remote-build --help in core20 projects | snapcraft | closed | Closed unmerged: modern core20 remote-build help was rejected because it advertised flags unsupported by the legacy builder; #5994 later removed that builder. | |
| #5265 fix(remotebuild): don't fail when cross-compiling | snapcraft | merged | Merged PR #5265 fixed remote cross-compilation by sending build-on architectures to Launchpad; commit f94da8f13 closed #4996. |