Do not bother user with rebuilds that don’t change the result
I believe this is not a precise duplicate of any existing issues, but I might be wrong, in that case, sorry.
My nix-shell involes some evaluation-time computation that is easily triggered (in fact, it reads .git/index). Lorri detects that it uses that file (good), watches that file for changes (good), re-starts a build when that files changed (good), and when the build is finished, even thought the resulting derivation is identicaly, reloads my direnv (bad, because very noisy).
Maybe this is naive, but couldn’t lorri notice that the shell derivation is unchanged in most cases, and not do anything?
Maybe this is naive, but couldn’t
lorrinotice that the shell derivation is unchanged in most cases, and not do anything?
It should, by just comparing the store path of the new gc_root with the old one, and not replacing it if it doesn’t change.
The root_result call here, should be a fairly easy change:
https://github.com/target/lorri/blob/200f4a2b5b1bbf9a2dd8c9b51c2cb907c7aebab3/src/build_loop.rs#L187-L195