github tweag/nickel 1.15.1

4 hours ago

For several releases now, the runtime representation of Nickel expressions has been completely reworked behind the scenes for improved performance. Nickel 1.15 is the first version to migrate to the new representation. Our microbenchmarks show run time improvements since 1.14 on every single benchmark, ranging from 10% to 65%. On a large real-world configuration that was supplied to us by a user, run-time decreased by 35% and peak memory usage decreased by 50%. Most of these performance improvements were implemented in #2302. As always, the impact on your specific codebase may vary.

This release is also the first to provide a public API for Nickel as a library. Some intrepid users were already embedding the nickel-lang-core crate, and this remains the only way to access certain internal features. However, we hope that most users will find it easier to use the nickel-lang crate (published at initial version 2.0.0, repurposed from the former all-in-one Nickel crate), which is simpler, better documented, and more stable. We also now have a public C API: the header file is available as a release artifact, as are pre-built libraries for various architectures. Finally, a go-lang API is available at https://github.com/nickel-lang/go-nickel.

Breaking changes

  • Add a YamlDocuments export format by @jneem in #2445
    This change adds a new supported format 'YamlDocuments to std.serialize and std.deserialize. While standard calls to serialize or deserialize should not be impacted even in statically typed code, this can be a breaking change if you copied the stdlib's format enum type in an annotation, for example: my_serialize : [| 'Json, 'Yaml, 'Toml, 'Text |] -> [...]. In this case, you must update such enum types. Run any evaluation or typehecking command on your codebase and simply let the typechecking errors guide you.

LSP

  • NLS completions can now see through the built-in any_of, all_of and Sequence contracts by @jneem in #2391
  • NLS can now report errors in YAML files by @jneem in #2383
  • Better error messages for incomplete records, thanks to typechecking changes by @L0r3m1p5um in #2439

Tooling

Performance

Stdlib

Full Changelog: 1.14.0...1.15.0

Don't miss a new nickel release

NewReleases is sending notifications on new releases.