boulder-d-legacy
boulder-d-legacy copied to clipboard
`*.10` version truncated to `*.1` in manifest
I just built a package with version 2.10
set. When I build the recipe, the resulting manifest.x86_64.jsonc
contains the following line:
"source-version": "2.1"
When I change the version to 2.11
in the stone.yaml
, it is showing the correct version in the manifest as well. Looks like something is truncating the 0
from the version.
Example can be seen in https://github.com/snekpit/main/pull/19
This is an artefact of how YAML is parsed by the dyaml parser we use; unquoted values that look like floats will be implicitly coerced to floats by dyaml before we encounter them and save them as strings:
[16:17:25] TRACE boulder.controller.Controller.build: Parsing recipe file stone.yml
[16:17:25] TRACE '- Parsing YamlSchema for member: name
[16:17:25] TRACE '- Parsing YAML key 'name':
[16:17:25] TRACE '- <string> (= 'lzo')
[16:17:25] TRACE '- Parsing YamlSchema for member: versionIdentifier
[16:17:25] TRACE '- Parsing YAML key 'version':
[16:17:25] TRACE '- <string> (= '2.1')
The solution (or workaround, depending on your perspective) could be to make it a LINT error to not have the version string quoted in the stone.yml
recipe (as a very firm hint to every single packager that the version field is considered an arbitrary string).
For now, the outcome is that you will need to manually ensure you that you properly quote problematic float-parseable version strings.