Fork me on GitHub
#tools-deps
<
2019-09-08
>
tianshu07:09:29

yeah, make sense. thanks very much! @seancorfield

cfleming22:09:29

I’m adding code to Cursive to cache project dependency resolution, and also classpaths for things like running REPLs. Here’s what I’m hashing to create a cache key: 1. Global config (whether using CLI or t.d.a directly, and identifying properties like install path & version in each case), and user and system (if applicable) deps.edn files. 2. Hash of all non-whitespace non-comment content from project deps.edn, and all transitive deps.edns reachable via :local/root. 3. Aliases in use, depending on operation.

cfleming22:09:33

In the case of the execution classpath, I’ll also add in details from the execution, e.g. main namespace, env vars etc, basically all the info from the run configuration.

cfleming22:09:42

Is there anything else that might affect that I’ve forgotten?

seancorfield22:09:59

What about the user-level deps.edn which may include aliases/extra-deps/override-deps?

seancorfield22:09:33

At World Singles Networks, we use CLJ_CONFIG to set the "user-level" to be our repo-wide deps.edn and then each subproject has a deps.edn file. Those two combined then form the set of deps and aliases etc for each given subproject. We use the repo-wide ("user-level") deps.edn file to "pin" versions by having a :defaults alias with all our :override-deps in.