Unfortunately this doesn't play well with protocols--unlike regular
Clojure constructs, compiling code that uses protocols hard-codes it
to the AOTed version of the protocol--it won't work with the protocol
from the .clj file if the .class file is absent. The extent of this
problem was not discovered until after Leiningen 1.4.0 was released,
so it left the deletion turned on by default.
This message is just a heads-up to let people who are having trouble
know that they can disable this behaviour if they are AOTing code that
uses protocols. Simply set the :keep-non-project-classes key to true
in project.clj. I will release a 1.4.1 version of Leiningen soon that
has this as default behaviour.
Here's the ticket discussing the problem:
https://github.com/technomancy/leiningen/issues#issue/141
I'm up for discussing alternatives--I would love to offer a way to
automatically detect problematic .class files and exclude them from
the purge.
-Phil