Phase 2 complete!
Published on July 7, 2020 by Ben Burdette

Good news! Changes are merged, tests are passing, the technical changes of the nix error project are complete. The new features this time around:

  • show-trace data is included in the ErrorInfo class now.
  • the lines of code surrounding the error are printed, with the error location highlighted.
  • lines of code are printed for show-trace as well.

So far I've found it pretty interesting to see the call sites in show-trace for common nix errors. Nix language laziness means that sometimes things get evaluated in unexpected places. The PR has some screenshots of that in action: https://github.com/NixOS/nix/pull/3773.

Big thanks to everyone who funded this phase! We've accomplished a lot, and made some significant changes to error presentation. If you're brave enough to try the master brach of nix, let me know what you think about the latest changes.

The next phase will be to work on content of the error messages. That will begin once we reach the phase 3 funding level. I'm looking forward to making nix errors as friendly as possible!

Cheers,

Ben Burdette