forked from lix-project/lix
Maximilian Bosch
6ccfdb79c7
The new error-format is pretty nice from a UX point-of-view, however it's fairly hard to parse the output e.g. for editor plugins such as vim-ale[1] that use `nix-instantiate --parse` to determine syntax errors in Nix expression files. This patch extends the `internal-json` logger by adding the fields `line`, `column` and `file` to easily locate an error in a file and the field `raw_msg` which contains the error-message itself without code-lines and additional helpers. An exemplary output may look like this: ``` [nix-shell]$ ./inst/bin/nix-instantiate ~/test.nix --log-format minimal {"action":"msg","column":1,"file":"/home/ma27/test.nix","level":0,"line":4,"raw_msg":"syntax error, unexpected IF, expecting $end","msg":"<full error-msg with code-lines etc>"} ``` [1] https://github.com/dense-analysis/ale |
||
---|---|---|
.. | ||
command-ref.xml | ||
conf-file.xml | ||
env-common.xml | ||
files.xml | ||
main-commands.xml | ||
nix-build.xml | ||
nix-channel.xml | ||
nix-collect-garbage.xml | ||
nix-copy-closure.xml | ||
nix-daemon.xml | ||
nix-env.xml | ||
nix-hash.xml | ||
nix-instantiate.xml | ||
nix-prefetch-url.xml | ||
nix-shell.xml | ||
nix-store.xml | ||
opt-common-syn.xml | ||
opt-common.xml | ||
opt-inst-syn.xml | ||
utilities.xml |