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?
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
}
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
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)
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.
i.e. 0 JVMs spawned this would speed up my odd :emacs: setup
Would it be better to define a custom selector that achieves the same thing? Your selector section in project.clj
is just an expression anyway, so the actual selector name does not need to match the selector tag that you applied on a test/ns level.
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
}
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
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)
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.