Best practice for running a watcher sensitive to devenv.nix
changes?
#1363
Labels
question
Further information is requested
devenv.nix
changes?
#1363
I ran into a minor pain point recently that could potentially inform the design of #1362. It could easily be out of scope too; I'm not sure.
I have a
scripts.watch-tests.exec
that usescargo-watch
to rerun tests implemented inscripts.run-tests.exec
whenever files change. For the most part this works really well. I havedirenv
set up I justcd
into my project directory and runwatch-tests
to get continuous feedback as I develop.Now, the minor pain point: whenever I change
devenv.nix
I have to remember toctrl+c
out of thatwatch-tests
script, patiently wait fordirenv
to reload, and then rerunwatch-tests
. Sometimes I hitctrl+c
twice, either accidentally or because I needed to do something else, and this aborts thedirenv reload
before it can finish. In that case, I need to remember to manually reload before I launchwatch-tests
again. Although the watcher I run picks up on thedevenv.nix
change and rerunsrun-tests
, it doesn't actually incorporate the effects of changes todevenv.nix
.I'd prefer to have
watch-tests
seamlessly reload direnv wheneverdevenv.nix
changes so I can get immediate feedback. Addingdirenv reload
to the start ofscripts.run-tests.exec
doesn't fix it.I haven't investigated much yet, but I suspect another devenv abstraction may be more fitting than scripts. Perhaps I should revisit
processes
orservices
now that other aspects of this project's workflow have matured more.The text was updated successfully, but these errors were encountered: