nix log prints @nix lines literally instead of interpreting them #20

Open
opened 2024-03-11 20:49:30 +00:00 by jade · 2 comments
Owner

Is your feature request related to a problem? Please describe.

Contemplate the following:

dev/lix » nix build -v -f test.nix
this derivation will be built:
  /nix/store/x3djqrhy0g5bcy85nk0bymwavx2lyih6-meow.drv
building '/nix/store/x3djqrhy0g5bcy85nk0bymwavx2lyih6-meow.drv'...
MEOW
error: builder for '/nix/store/x3djqrhy0g5bcy85nk0bymwavx2lyih6-meow.drv' failed to produce output path for output 'out' at '/nix/store/x3djqrhy0g5bcy85nk0bymwa
vx2lyih6-meow.drv.chroot/nix/store/n8diy9rfixrz9fym7nb0r9zx0hbg0hc9-meow'
dev/lix » nix log /nix/store/x3djqrhy0g5bcy85nk0bymwavx2lyih6-meow.drv
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/x3djqrhy0g5bcy
85nk0bymwavx2lyih6-meow.drv^*'
@nix {"action":"msg","column":13,"file":"random.nix","level":3,"line":2,"msg":"MEOW"}
dev/lix » cat test.nix
let pkgs = import <nixpkgs> {};
in
pkgs.runCommand "meow" {} ''
  echo "@nix {\"action\":\"msg\",\"column\":13,\"file\":\"random.nix\",\"level\":3,\"line\":2,\"msg\":\"MEOW\"}" >&$NIX_LOG_FD
''

Describe the solution you'd like

nix log without a new option --raw should print the log preprocessed to the log level desired. Phase setting should maybe be printed literally as json still due to external tools? Nobody .... yet ..... besides @qyriad actually uses the log level output, so it should not regress any tools if it vanishes.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Priorities

Add 👍 to issues you find important.

**Is your feature request related to a problem? Please describe.** Contemplate the following: ``` dev/lix » nix build -v -f test.nix this derivation will be built: /nix/store/x3djqrhy0g5bcy85nk0bymwavx2lyih6-meow.drv building '/nix/store/x3djqrhy0g5bcy85nk0bymwavx2lyih6-meow.drv'... MEOW error: builder for '/nix/store/x3djqrhy0g5bcy85nk0bymwavx2lyih6-meow.drv' failed to produce output path for output 'out' at '/nix/store/x3djqrhy0g5bcy85nk0bymwa vx2lyih6-meow.drv.chroot/nix/store/n8diy9rfixrz9fym7nb0r9zx0hbg0hc9-meow' dev/lix » nix log /nix/store/x3djqrhy0g5bcy85nk0bymwavx2lyih6-meow.drv warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/x3djqrhy0g5bcy 85nk0bymwavx2lyih6-meow.drv^*' @nix {"action":"msg","column":13,"file":"random.nix","level":3,"line":2,"msg":"MEOW"} dev/lix » cat test.nix let pkgs = import <nixpkgs> {}; in pkgs.runCommand "meow" {} '' echo "@nix {\"action\":\"msg\",\"column\":13,\"file\":\"random.nix\",\"level\":3,\"line\":2,\"msg\":\"MEOW\"}" >&$NIX_LOG_FD '' ``` **Describe the solution you'd like** `nix log` without a new option `--raw` should print the log preprocessed to the log level desired. Phase setting should maybe be printed literally as json still due to external tools? Nobody .... yet ..... besides @qyriad actually uses the log level output, so it should not regress any tools if it vanishes. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** Add any other context or screenshots about the feature request here. **Priorities** Add :+1: to [issues you find important](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc).
Owner

Add 👍 to issues you find important.

didn't I remove this thing

> Add 👍 to issues you find important. didn't I remove this thing
Author
Owner

repo config somewhere also?

repo config somewhere also?
jade added the
ux
label 2024-03-13 18:44:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#20
No description provided.