Currently Netlify will only cache dependencies in Clojure projects if there is a valid project.clj or build.boot file, which are used by the Leiningen and Boot build tools.
However Clojure now has an official API for dependency management and uses a deps.edn file rather than the project.clj or build.boot files used in older build tools.
It makes sense to add support for deps.edn files as this is the official way to manage dependencies in Clojure now.
Relevant PR https://github.com/netlify/build-image/pull/117/files
Are there any known workarounds for the time being?
The only one I can think off is maintaining a project.clj as well, but that's a bit of a pain
Actually just looked at the code and seems like it doesn't actually matter what's in the project.clj file, just that it exists. I'll test with an empty project.clj to make sure tomorrow but if that works then it will be easy to check for project.clj or deps.edn as they will both be cached in the same way.
I will make a PR when I get around to it if that's the case.
I think that will work well for most cases. Our build currently eats up ~2.5 mins of downloading deps on every build haha.
The one exception is that deps.edn allows for Git deps which are stored in ~/.gitlibs (by default. See docs).
A completely empty (touch project.clj) project.clj causes lein to try and run it, which results in an error.
I believe this would be fixed by #553.
@kennyjwilli Good suggestion. 馃憤 I've added caching of ~/.gitlibs to the PR and verified that it works by using the instructions for testing builds with the cache.
Most helpful comment
@kennyjwilli Good suggestion. 馃憤 I've added caching of
~/.gitlibsto the PR and verified that it works by using the instructions for testing builds with the cache.