Skip to content

1.3.0

Compare
Choose a tag to compare
@yannham yannham released this 16 Nov 17:01
· 2 commits to 1.3.0-release since this release
4798c4d

Version 1.3

Version 1.3 includes several new optimizations following reports of long evaluation time for medium-sized codebase. The command-line interface (CLI) has been reworked to be more user-friendly, at the cost of breaking changes: see below. Finally, the LSP has seen continuous improvement as well.

Breaking changes

  • @vkleen improved the CLI UX in numerous ways in #1632

    • The file argument is now argument positional. That is, instead of running nickel export -f config.ncl, now use nickel export config.ncl instead.
    • Every command which can take a file argument can now take several of them. The program parsed from the files are then merged before applying the action. For example, the new nickel export config1.ncl config2.ncl config3.ncl is the equivalent of the previous nickel export <<< '(import "config1.ncl") & (import "config2.ncl") & (import "config3.ncl")'
    • Evaluation is now an explicit subcommand, instead of being the default action. Instead of running nickel -f config.ncl to evaluate a file, use nickel eval config.ncl instead.
  • Not a breaking change per se, because the customize mode is experimental, but @yannham introduced a new syntax for customize mode in #1709. Instead of dynamically generating a CLI where arguments are field paths, the new customize mode CLI directly take assignments written in a Nickel-like syntax as positional arguments. For example, in 1.2, the command:

    $ nickel eval -f confing.ncl -- \
      --input.field1 '"Value"' --input.flag false \
      --override output.bar 0`

    now becomes

    $ nickel eval config.ncl -- \
      'input.field1="Value"' input.flag=false \
      --override output.bar=0`

Fixes

  • Fix record.update by making record.insert act consistently by @yannham in #1669

Tooling

  • LSP:
    • implement type-based completion in the new completer by @jneem in #1577
    • Improve context completion by @jneem in #1584
    • Take the ancestor path into account when env-completing from uncles. by @jneem in #1661
    • Add goto support for pattern bindings by @jneem in #1665
    • Add cousin search to goto and hover by @jneem in #1670
    • Improve hover output for let patterns by @jneem in #1696
    • First prototype of contract evaluation by @jneem in #1672
  • LSP: a large refactoring work by @jneem to get rid of the old and
    hard-to-maintain code analysis implementation
    (#1623,
    #1629,
    #1658,
    #1663)
  • Honor nostdlib in customize mode as well by @vkleen in #1634
  • Add the list subcommand to the customize mode by @yannham in #1709
  • add %eval_nix% primop for Nix interop by @Radvendii in
    #1465 (requires to build with the
    corresponding experimental feature enabled)
  • Get rid of shallow_repr and print full terms in error messages by @yannham in
    #1676
  • Add suggestions to the error message when misspelling a record field by @yannham in #1710
  • Add a --field argument to subcommands to target a specific field whenever it makes sense by @yannham in #1712

Optimizations

Documentation

  • Fix invalid example code in doc of blame_with_message by @bgni in #1689
  • Fix doc, example code for pipe lacks prefix by @bgni in #1692
  • change nickel-nix to organist by @Radvendii in #1691

New Contributors

Full Changelog: 1.2.2...1.3.0