Version without quotation marks results in an error
Metadata
Current evaluation
Closed as working as designed: unquoted version: 1.0 is parsed by YAML as a number, while Snapcraft requires a string; quotes force string typing.
Resolution: closed not a bug
Reason: In the closing maintainer comment on 30 November 2018, Sergiusens explained that YAML applies its own scalar-typing rules and that Snapcraft's documented examples use quotes to ensure version is a string. The validation error was therefore considered appropriate.
Evaluated by: mr-cal-bot
No scores available.
Issue body
If one uses version without quotation marks, snapcraft build fails.
The displayed error (and matching documentation) does not mention the requirement to use the quotation marks:
Issues while validating snapcraft.yaml: The ‘version’ property does not match the required schema: 1.0 is not a valid snap version string.
version: 1.0
Quotation marks not mentioned in the description:
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.
Expected behavior:
- Auto-encapsulate numbers
- Change documentation to reflect behavior
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed not a bug | Closed as working as designed: unquoted version: 1.0 is parsed by YAML as a number, while Snapcraft requires a string; quotes force string typing. | |
| stealth/space-bunny-alpha | — | closed not a bug | Closed as expected YAML behavior: unquoted 1.0 parses as a number, so snapcraft correctly requires a string; the maintainer cited documentation and suggested optional documentation improvements. | |
| stealth/space-bunny-alpha | — | closed not a bug | Closed as working as designed: YAML parses unquoted 1.0 as a number, while snap versions must be strings; the documentation examples already quote version values. | |
| stealth/space-bunny-alpha | — | closed stale | Closed as stale after over seven years without activity; no fix or documentation update addressed quoted numeric versions in snapcraft.yaml. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution after over seven years of inactivity. The version field in snapcraft.yaml requires quotes to prevent build failures, but no code fix or documentation update was implemented. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution due to inactivity. The build failure caused by unquoted version strings in snapcraft.yaml was not fixed or documented. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution due to inactivity. The reported validation error when omitting quotation marks around the version field in snapcraft.yaml remains unfixed. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution. The YAML float parsing issue causing snapcraft build failures for unquoted version strings remains unfixed. Documentation updates and auto-quoting were not implemented. |
Update history
| Date | Change |
|---|---|
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1813925 "version: 0.2" returns confusing error message (trunk) | snapcraft (launchpad) | open | Unquoted YAML numeric versions such as 2.11 are parsed as floats and rejected with a misleading snap-version error; quoting works, but compatibility or clearer messaging remains unaddressed. |