lorri
lorri copied to clipboard
lorri daemon fails with "No such file or directory (os error 2)", but lorri watch succeeds
Describe the bug
The lorri daemon fails to build my project's environment, saying "No such file or directory (os error 2)" in the logs. But running lorri watch
successfully builds it.
To Reproduce Steps to reproduce the behavior:
- Start
journalctl --user -u lorri.service --no-pager -f
to monitor the lorri daemon log - In a separate terminal, cd into the project using lorri
- The lorri daemon log shows an error
Jul 28 01:12:50 host lorri[358780]: Jul 28 01:12:50.503 INFO build status, message: BuildEvent(Started { nix_file: NixFile(AbsPathBuf("/home/avh4/workspace/music/shell.nix")), reason: PingReceived }) Jul 28 01:12:50 host lorri[358780]: Jul 28 01:12:50.503 INFO build status, message: BuildEvent(Failure { nix_file: NixFile(AbsPathBuf("/home/avh4/workspace/music/shell.nix")), failure: Spawn { cmd: "\"nix-instantiate\" \"-vv\" \"--add-root\" \"/tmp/.tmpedU3ei/result\" \"--indirect\" \"--argstr\" \"runTimeClosure\" \"/nix/store/69pg642v7d9s1z0nb0i3n2jynkmjkd9n-runtime-closure.nix\" \"--argstr\" \"src\" \"/home/avh4/workspace/music/shell.nix\" \"--\" \"/home/avh4/.cache/lorri/cas/de251a4170888ea8b8fb1ece0590735a\"", msg: "No such file or directory (os error 2)" } })
- Run
lorri watch
in the project directory (it succeeds)Jul 28 01:14:59.356 INFO build message, message: BuildEvent(Started { nix_file: NixFile(AbsPathBuf("/home/avh4/workspace/music/shell.nix")), reason: PingReceived }), nix_file: /home/avh4/workspace/music/shell.nix Jul 28 01:15:04.476 INFO build message, message: BuildEvent(Completed { nix_file: NixFile(AbsPathBuf("/home/avh4/workspace/music/shell.nix")), rooted_output_paths: OutputPath { shell_gc_root: RootPath(AbsPathBuf("/home/avh4/.cache/lorri/gc_roots/96cf60f25c1bca4f0bab7e20322abdeb/gc_root/shell_gc_root")) } }), nix_file: /home/avh4/workspace/music/shell.nix
Expected behavior
The lorri daemon build should succeed.
Metadata
$ lorri info
error: The following required arguments were not provided:
--shell-file <nix_file>
USAGE:
lorri info --shell-file <nix_file>
For more information try --help
$ lorri info --shell-file shell.nix
lorri version: 1.5
GC roots exist, shell_gc_root: /home/avh4/.cache/lorri/gc_roots/96cf60f25c1bca4f0bab7e20322abdeb/gc_root/shell_gc_root
$ uname -a
Linux host 5.15.0-41-generic #44-Ubuntu SMP Wed Jun 22 14:20:53 UTC 2022 x86_64 GNU/Linux
Additional context
After restarting the daemon with systemctl --user restart lorri.service
, the result is the same.