diff --git a/CHANGELOG.md b/CHANGELOG.md index 54d92ee..a2d7b53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,22 +54,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Strict decoding reports the smallest unknown key. Several unknown keys in - one table made the message depend on Go's random map iteration order, so - the same document reported different keys across runs. - A `MarshalTOML` result of `nil` with a nil error fails the marshal with `MarshalTOML returned a nil value`. The field silently vanished before, and inside a value array the nil result reached reflection as a zero value and panicked. +- Strict decoding reports the smallest unknown key. Several unknown keys in + one table made the message depend on Go's random map iteration order, so + the same document reported different keys across runs. - Decoding into a struct that embeds a pointer to itself terminates. The schema walk recursed through the embedded type forever, so such a `Unmarshal` call hung the process; the walk now tracks the struct types on the current path and stops when one repeats. -- `Marshal` emits exactly one key when two struct fields resolve to the same - TOML name, picking the field the decoder would fill (the shallower one, the - later declaration at equal depth). Such a struct previously marshalled into - a duplicate key, and the output never re-parsed, breaking the round-trip - guarantee. - An array-of-tables header whose path runs through an inline table (`a = {b = {}}` followed by `[[a.b.c]]`) is rejected. The frozen-inline-table check covered `[table]` headers and dotted keys but not the intermediate @@ -79,6 +74,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 and nested arrays of tables: `[[a]]`, `b.c = 1`, `[[a]]`, `[a.b]` parses, as the TOML examples in the spec shape it. The records of the previous element falsely rejected the same paths in the next one. +- `Marshal` emits exactly one key when two struct fields resolve to the same + TOML name, picking the field the decoder would fill (the shallower one, the + later declaration at equal depth). Such a struct previously marshalled into + a duplicate key, and the output never re-parsed, breaking the round-trip + guarantee. - `Marshal` returns an error for a table header key or an inline-table key that is not valid UTF-8, the way scalar keys already did, instead of silently emitting corrupt TOML (a header that lost its key, an inline table with a