v1.7.1 — Out-of-range numbers are refused
A fixed-width number outside its range is refused at the sender instead of wrapped.
Out-of-range numbers are refused before validators run
Section titled “Out-of-range numbers are refused before validators run”A fixed-width number reserves an exact number of bits. A NumberU8 is one byte,
which holds 0 to 255.
Twill.Net.Declare("SetStack", { Twill.Net.Types.NumberU8 })Given 256, the codec used to write the value wrapped: 256 arrived as 0, -1 as
255, and a signed byte holding 200 as -56. The wrap happened before any
Validate or Schema hook saw the value, so a handler that refuses anything
above 100 was handed 0 and let it through.
before: 256 → written as 0 → validator sees 0 → acceptedafter: 256 → refused at the sender, before the handler runsSingle values and every element of an array of fixed-width numbers are now refused when they are out of range.
Unions carry fixed-width numbers
Section titled “Unions carry fixed-width numbers”A Union that named a fixed-width number compiled, then threw the first time it
carried a number.
Twill.Net.Types.Union(Twill.Net.Types.NumberU8, Twill.Net.Types.NumberF64)Every numeric kind is now reachable, matched widest first, so a union keeps the number it was given.
Other changes
Section titled “Other changes”- The last refusal messages with a
Twill.Net:prefix, in the codec and the frame reader, now follow the shape introduced in v1.7.0.
Full changelog
Section titled “Full changelog”Every change in this release is listed in the changelog.