Non-list `build-for` values are no longer allowed
Metadata
Current evaluation
A valid scalar build-for value regresses in Snapcraft 8.13.0: core22 falls back, then crashes with “cannot determine build-for architecture.” The issue is triaged and remains open.
Suggested action: keep open
Reason: The report provides an exact YAML form, command, affected spread test, and a traceback ending at get_build_for() with “cannot determine build-for architecture.” The Status: Triaged label and maintainer-authored report establish an acknowledged regression; it should remain open until current behavior is rerun and any resolving change is identified.
Evaluated by: mr-cal-bot
Impact:
52
Quick Win:
27
Complexity:
40
Confidence:
82
Actionability:
88
Issue body
### Bug Description
The following (valid) form of a platform no longer works:
```yaml
platforms:
p:
- build-on: [amd64]
build-for: amd64
```
It also gives an incredibly unhelpful error message (see below)
### To Reproduce
Attempt to run `snapcraft pull --enable-experimental-plugins` on the test at `tests/spread/plugins/craft-parts/kernel`.
### Environment
snapcraft 8.13.0
### snapcraft.yaml
```yaml
see above
```
### Relevant log output
```shell
Traceback (most recent call last):
File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/application.py", line 472, in main
return app.run()
^^^^^^^^^
File "/snap/snapcraft/x1/lib/python3.12/site-packages/craft_application/application.py", line 663, in run
return_code = self._run_inner()
^^^^^^^^^^^^^^^^^
File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/application.py", line 183, in _run_inner
return_code = super()._run_inner()
^^^^^^^^^^^^^^^^^^^^
File "/snap/snapcraft/x1/lib/python3.12/site-packages/craft_application/application.py", line 606, in _run_inner
dispatcher = self._get_dispatcher()
^^^^^^^^^^^^^^^^^^^^^^
File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/application.py", line 410, in _get_dispatcher
self._check_for_classic_fallback()
File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/application.py", line 322, in _check_for_classic_fallback
raise errors.ClassicFallback()
snapcraft.errors.ClassicFallback
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/snap/snapcraft/x1/bin/snapcraft", line 7, in <module>
sys.exit(main())
^^^^^^
File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/application.py", line 475, in main
return cli.run()
^^^^^^^^^
File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/cli.py", line 259, in run
_run_dispatcher(dispatcher, global_args)
File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/cli.py", line 232, in _run_dispatcher
dispatcher.run()
File "/snap/snapcraft/x1/lib/python3.12/site-packages/craft_cli/dispatcher.py", line 564, in run
return self._loaded_command.run(self._parsed_command_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/commands/core22/lifecycle.py", line 268, in run
super().run(parsed_args)
File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/commands/core22/lifecycle.py", line 141, in run
parts_lifecycle.run(self.name, parsed_args)
File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/parts/lifecycle.py", line 105, in run
_run_command(
File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/parts/lifecycle.py", line 141, in _run_command
_run_in_provider(project, command_name, parsed_args)
File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/parts/lifecycle.py", line 475, in _run_in_provider
cmd.append(project.get_build_for())
^^^^^^^^^^^^^^^^^^^^^^^
File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/models/project.py", line 2214, in get_build_for
raise RuntimeError("cannot determine build-for architecture")
RuntimeError: cannot determine build-for architecture
```
### Additional context
_No response_
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
52
Quick Win:
27
Complexity:
40
Confidence:
82
Actionability:
88
|
keep open | A valid scalar build-for value regresses in Snapcraft 8.13.0: core22 falls back, then crashes with “cannot determine build-for architecture.” The issue is triaged and remains open. | |
| stealth/space-bunny-alpha |
Impact:
48
Quick Win:
26
Complexity:
42
Confidence:
90
Actionability:
94
|
keep open | A valid scalar build-for in a platform-list entry regresses in Snapcraft 8.13.0, causing classic fallback and an opaque architecture error; the issue is triaged but unresolved. | |
| qwen/qwen3.6-35b-a3b |
Impact:
70
Quick Win:
45
Complexity:
20
Confidence:
85
Actionability:
80
|
keep open | Regression: get_build_for() fails when build-for is a scalar string instead of a list, raising RuntimeError | |
| qwen/qwen3.8-27b |
Impact:
50
Quick Win:
30
Staleness:
55
Complexity:
40
Confidence:
70
Support Request:
5
|
keep open | snapcraft 8.13.0 rejects valid non-list build-for values (e.g. build-for: amd64) in core22 platforms, raising an unhelpful RuntimeError instead of treating the string as a single-entry list. Triaged, open, no fix yet. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
75
Complexity:
45
Confidence:
80
Support Request:
10
|
keep open | Bug report stating non-list build-for values in snapcraft.yaml are rejected with an unhelpful error. Labeled as triaged but inactive for 264 days with no maintainer follow-up. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
85
Complexity:
45
Confidence:
75
Support Request:
10
|
keep open | Regression in snapcraft 8.13.0 where single-string build-for values are rejected, causing a RuntimeError. Issue is triaged but has seen no maintainer activity in 250 days. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4854 Accept `build-for: [all]` and `--build-for=all` for architecture-independent snaps | snapcraft | closed | Resolved: Snapcraft supports build-for [all] and --build-for=all for remote builds/core24 in 8.4.0 and core22 in 8.7.0; requested core22/core24 regression tests were added. | |
| #1885150 Cannot use --build-on, architecture list is already set in snapcraft.yaml. | snapcraft (launchpad) | closed | Resolved in Snapcraft 8.7.0: remote-build added --build-for filtering for projects defining architectures or platforms, replacing the unusable --build-on workaround. | |
| #4150 meta: use build-for in snap.yaml architecture | snapcraft | merged | Merged #4150 as 77d3454d: build-for: all now writes architectures: all to meta/snap.yaml instead of the build-on architecture, fixing CRAFT-1535. |