devenv icon indicating copy to clipboard operation
devenv copied to clipboard

Tasks should accept rerunIfModified only run if a file was modified since task execution

Open farnoy opened this issue 11 months ago • 1 comments

There's a common pattern with language-specific package managers only needing to re-run if I changed something like Cargo.toml, or if I checked out another revision and my Cargo.lock was updated. It's already possible to implement this with the status command, but I feel like this should come built-in with devenv.

tasks.cargo = {
  exec = "cargo fetch";
  rerunIfModified = [ "Cargo.toml" "Cargo.lock" ];
};

farnoy avatar Jan 23 '25 13:01 farnoy

Related: https://github.com/cachix/devenv/issues/1616

sandydoo avatar Jan 23 '25 14:01 sandydoo