Fork me on GitHub
#leiningen
<
2020-02-24
>
vemv04:02:33

might be a long shot, but anyone has a lein deps wrapper that turns it into a no-op if project.clj's contents haven't changed?

vemv04:02:02

i.e. 0 JVMs spawned this would speed up my odd emacs setup

vemv09:02:59

Got it! It looks approximately like this:

deps(){
  if git diff master --exit-code -- project.clj > /dev/null;
  then
    echo "Nothing changed"
  else
    lein with-profile +test deps
  fi
}

noisesmith18:02:38

you don't need to use the deps command explicitly - any other command that evaluates in project context implicitly invokes it. If you use trampoline with FAST_TRAMPOLINE lein will keep a hash of project.clj and not recalculate the deps

noisesmith18:02:30

so eg. as soon as you invoke lein repl or lein run it will invoke lein deps implicitly - maybe that's good for you (no need to run lein deps by hand) or maybe it's bad (recalculating deps even though you didn't ask for it)

vemv19:02:50

Relatively often I use lein deps isolatedly, for reasons. Particularly when I set :pedantic? only in deps and never in repl Additionally, whenever my CIDER launches a JVM process via lein, it does not perform a deps. Don't know if that has changed (I version-froze cider) or can be configured.