Skip to content

Releases: sparsetech/toml-scala

v0.2.2

14 Oct 12:26
Compare
Choose a tag to compare

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 a List instead of a Map to preserve the item order
  • Codec.Error was moved to Parse.Error since duplicate keys now trigger an error too

Changes ⭐

  • Rules: Fix parsing of floating point numbers (#12)
  • Embed: Forbid duplicate keys (#13)
  • Introduce language extension for multi-line inline tables (#15)
  • Build: Update dependencies (#17)
  • Build: Retrieve version from Git tag (#17)

v0.2.1

06 Jul 18:23
Compare
Choose a tag to compare

Compatibility 💻

This release is fully backward-compatible.

Changes ⭐

  • Add Seed configuration (#8)
  • Add support for Scala 2.13 (#10)

v0.2.0

06 Jan 10:13
Compare
Choose a tag to compare

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 classes. 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)
    • Detect unknown fields when mapping tables (d57a650)
    • Detect if tuples have too many elements when mapping lists (18f6a9f)
    • Include row number in trace (b83d899)
    • Generate correct trace for tables (2540e2b)
  • Rules: Fix parsing of escaped table keys (3aae75f)

v0.1.1

30 Dec 23:17
Compare
Choose a tag to compare

Improvements

  • Codecs: Support default parameters (36dff11)
  • Codecs: Add codec derivation for java.time (feb678c)
  • Codecs: Add codec for Map[String, T] (6c888fd)
  • Rules: Allow trailing comma in inline tables (b491d8a)
  • Documentation: Describe custom codecs (d025fe7)
  • Build: Bump dependencies (27246dd)