Releases: sparsetech/toml-scala
v0.2.2
Compatibility 💻
This release improves compliance with the TOML specification.
If you previously parsed TOML files containing inline tables spanning multiple lines, you will need to explicitly enable this feature from now on:
toml.Toml.parse("""key = {
a = 23,
b = 42,
}""", Set(toml.Extension.MultiLineInlineTables))
Multi-line tables are a language extension that are not part of the standard yet and were therefore disabled.
Furthermore, there were two minor user-facing changes:
NamedTable
takes aList
instead of aMap
to preserve the item orderCodec.Error
was moved toParse.Error
since duplicate keys now trigger an error too
Changes ⭐
v0.2.1
v0.2.0
v0.2.0 features a new codec for boolean values (thanks, @vaartis), improved error reporting, support for generating TOML and fixes to the TOML parser.
Also, lists can now be mapped onto case class
es. As an example, consider the following data model:
case class Point(x: Int, y: String, z: Int)
case class Root(points: List[Point])
Previously, you had to represent Point
by a table:
points = [ { x = 1, y = "2", z = 3 },
{ x = 7, y = "8", z = 9 },
{ x = 2, y = "4", z = 8 } ]
With this release, you can use a list as a more succinct alternative:
points = [ [ 1, "2", 3 ],
[ 7, "8", 9 ],
[ 2, "4", 8 ] ]
Finally, a few improvements to the build were made. From now on, the test suites will be run with Scala Native as part of the CI.
Change log
The detailed list of changes is as follows:
- Build: Use official Shapeless dependency for Scala Native (a00865b)
- Build: Macro Paradise is not needed (b81574c)
- Build: Add partial support for running Scala Native tests (ee57191)
- Codecs: Add boolean codec (9bf0024)
- Codecs: Do not suppress errors in optional fields (2540e2b)
- Codecs: Add support for parsing lists as case classes (20a006b)
- Rules: Fix parsing of escaped table keys (3aae75f)