You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.
The background evaluator will need to listen for new projects to watch. To do so, the evaluator should listen on a unix socket at a Well Known Location (see XDG spec for where -- not sure which subsection at this time) new projects. The API should also support "cancel" messages, to stop watching a project.
Note, because of the nature of direnv -- many shells opening the same project -- we'll want to implement a refcount like system, and only "cancel" the evaluation when the last shell closes.
Another approach would be to "keep-alive" the daemon:
the user enters the project folder: lorri evaluate --folder $PWD is called
if $XDG_RUNTIME_DIR/lorri/daemon.sock doesn't exist (or isn't alive), start the daemon
send a message watch /path/to/project to the daemon
The daemon is started with a default TTL per project. If the TTL is reached, stop watching the project. If no projects are to be watched, shutdown the daemon and remove the socket.
Whenever files are changed in the project, extend the TTL.
The only issue is if the user sits too long in the project, with no files changing. Let's say the user goes to lunch and comes back to his seat. In that case the user would still be in the shell but the daemon has shutdown. This could be solved by running lorri evaluate --folder $PWD on each prompt, but then it means that lorri needs to hook into the shell as well.
@grahamc writes:
@zimbatm writes:
@shlevy writes:
The text was updated successfully, but these errors were encountered: