We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Nix error traces improvements #6204

Formal Metadata

Title
Nix error traces improvements #6204
Title of Series
Number of Parts
28
Author
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Based on simple examples, this will showcase error reporting improvements implemented in the open https://github.com/NixOS/nix/pull/6204 PR. For some errors, nix reports an odd, seemingly unrelated position. Or no position at all. Usually, the same location is used for several potential errors inside a given scope. This PR makes the relation between the error and the location more explicit. For example using "in the second argument of the function call" when the only available location is the function call itself. In some occasion, it adds error messages with no location, and an intermediate "context" trace for the closest known location.