Open h-vetinari opened 4 months ago
Smells like there's some audit for YAML loading parts in order.
Meaning, I'm pretty sure we'll find no conversion from 10
to 1
happening, but rather 2022.10
to 2022.1
.
... And this is why I'm all the time stubbornly suggesting to always use https://yaml.org/spec/1.2.2/#101-failsafe-schema when reading YAML files and do all type conversions afterwards. (I.e., don't try to be clever and ultimately forget corner cases and/or create code smell.)
My take: Someone should review conda-build
's code and ensure we always use BaseLoader
(or equivalent -- that StringifyNumbersLoader
doesn't count and should be removed and replaced by BaseLoader
!).
Don't try to convince me of any maybe-working midway solution -- you won't!
In the meantime we could tell the linter to require quotes all the time (only half kidding).
In https://github.com/conda-forge/vc-feedstock/pull/79 we want to build:
However, this gets mis-transformed into:
I've tried setting
version: {{ vsyear }}.{{ update_version|int }}
, but that doesn't change anything.The logs show that the variable
update_version
definitely does get set to a string with the value'10'
:Later this runs into predictable resolution errors (because apparently, the version constraint gets up correctly):