Totally misleading error on non-string version
Metadata
Current evaluation
⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.
Closed without resolution. The suggested improvement for clearer error handling when non-string versions are provided in snapcraft.yaml was not implemented.
Suggested action: —
No scores available.
Issue body
I had this in my snapcraft.yaml:
version: 8.1
the error it gave me was:
Issues while validating snapcraft.yaml: The 'version' property does not match the required schema: 8.1 is not a valid snap version string. Snap versions consist of upper- and lower-case alphanumeric characters, as well as periods, colons, plus signs, tildes, and hyphens. They cannot begin with a period, colon, plus sign, tilde, or hyphen. They cannot end with a period, colon, or hyphen.
However, my 8.1 totally matched what was described there!!!
Turns out (I guess) that the problem was that it was a number, I changed it to
version: "8.1"
and it seems to work ok now.
So, snapcraft should first check if it's a string or not, and error out with something like "The 'version' property needs to be a string, found a float".
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The suggested improvement for clearer error handling when non-string versions are provided in snapcraft.yaml was not implemented. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without implementation. The error stems from YAML schema validation requiring explicit string typing. No code changes or error message improvements were made. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution. The user resolved the issue locally by quoting the version value, as the schema requires a string rather than a number. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1807875 Wrong error when no source specified | snapcraft (launchpad) | closed | Closed without resolution. Reported a misleading error when the source field was omitted from snapcraft.yaml, which should explicitly require the source instead of failing on command execution. | |
| #1806058 Version without quotation marks results in an error | snapcraft (launchpad) | closed | Closed without resolution due to inactivity. The build failure caused by unquoted version strings in snapcraft.yaml was not fixed or documented. | |
| #1719968 Misleading error messages | snapcraft (launchpad) | closed | Closed without resolution. The report notes that missing dependencies cause snapcraft to output verbose Python tracebacks instead of clear error messages. No fix or follow-up was provided. |