Confusing schema validation message for `platforms.<platform>.build-on`.
Metadata
Current evaluation
Resolved by merged PR #567 (5f898b32): validation now identifies platforms.<platform>.build-on; the reporter confirmed the clearer message and requested closure.
Resolution: closed resolved
Reason: PR #567 was merged and indirectly fixed the report by improving the validation path to include platforms.my-platform.build-on. The reporter confirmed this resolved the confusion and asked for the issue to be marked resolved.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
When mis-inputting the `platforms.<platform>.build-on` rockcraft.yaml field as a single string instead of a list of strings, the resulting error message makes it sound like the `<platform>:` dict should be the one which is a list.
### To Reproduce
Please `rockcraft build` the below-listed `rockcraft.yml`.
### Environment
* Ubuntu 22.04
* x86_64 VM on VMware vSphere FWIW
* rockcraft 1.5.2 from snap (`snap install rockcraft --classic`)
### rockcraft.yaml
```shell
# Basically the example from the below tutorial with a modified `platforms` section:
# https://documentation.ubuntu.com/rockcraft/en/latest/tutorials/chisel/#project-setup
platforms:
arm64:
# NOTE: this should be a list of strings:
build-on: amd64
### Unmodified rest of spec:
name: chiselled-hello
summary: Hello world from Chisel slices
description: A "bare" rock containing the "hello" package binaries from Chisel slices.
license: Apache-2.0
version: "latest"
base: bare
build_base: "ubuntu@22.04"
parts:
hello:
plugin: nil
stage-packages:
- hello_bins
```
### Relevant log output
```shell
$ rockcraft build --debug
Bad rockcraft.yaml content:
- error for platform entry 'arm64': value is not a valid list (in field 'platforms')
For more information, check out: https://documentation.ubuntu.com/rockcraft/en/stable/reference/rockcraft.yaml
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Resolved by merged PR #567 (5f898b32): validation now identifies platforms.<platform>.build-on; the reporter confirmed the clearer message and requested closure. | |
| stealth/space-bunny-alpha | — | closed resolved | Closed as already fixed: merged PR #567 (commit 5f898b32, adopting craft-application's default BuildPlanner) changed the message to "value is not a valid list (in field 'platforms.my-platform.build-on')". Reporter agreed it was enough and asked to close. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed incidentally by merged PR #567, which improved the error path to platforms.my-platform.build-on; the reporter confirmed the clearer message. | |
| stealth/space-bunny-alpha | — | closed resolved | Closed as already fixed: merged PR #567 (commit 5f898b32) improved the error to name 'platforms.<platform>.build-on'; reporter confirmed the clearer message and asked to close. | |
| stealth/space-bunny-alpha | — | closed resolved | Validation message already improved by merged PR #567 (commit 5f898b32); errors now read "value is not a valid list (in field 'platforms.my-platform.build-on')". Reporter agreed and asked to close as resolved. | |
| stealth/space-bunny-alpha | — | closed resolved | Resolved by merged PR #567 (commit 5f898b32): build-on type errors now name platforms.<platform>.build-on instead of only platforms. | |
| stealth/space-bunny-alpha | — | closed resolved | #567 merged, adopting craft-application’s default BuildPlanner. Its validation now identifies platforms.<platform>.build-on, and the author confirmed the issue was resolved. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved by PR #567, which updated the validation error to explicitly include the platform name and field path. The improved message eliminates confusion, and the author confirmed the fix. Issue closed as resolved. | |
| qwen/qwen3.6-35b-a3b | — | — | Confusing schema validation errors for platforms.build-on were resolved by PR #567. The updated error message now explicitly includes the platform name, eliminating ambiguity. The issue was closed as resolved. | |
| qwen/qwen3.6-35b-a3b | — | — | PR 567 merged, fixing the confusing build-on schema validation error. The updated message now explicitly identifies platforms.<platform>.build-on, eliminating ambiguity. Issue closed as resolved. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Resolved by PR #567, which updated the validation error to include the full field path, eliminating the previous confusion. The issue was closed as fixed. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/rockcraft#567
(confidence 99%)
The merged BuildPlanner refactor changed the error from field 'platforms' to the full platforms.<platform>.build-on path.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #633 fix: improve `platforms.<platform>.build-on` validation | rockcraft | closed | Closed unmerged as redundant: PR canonical/rockcraft#567 had already improved build-on validation by adopting craft-application's default BuildPlanner. | |
| #4650 Refactor `platform` validation | snapcraft | closed | Closed as completed after platform validation was refactored and the build planner moved to the craft-application 5 and craft-platforms architecture. |