This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-14
Channels
- # adventofcode (62)
- # beginners (78)
- # boot (26)
- # boot-dev (9)
- # cider (73)
- # cljs-dev (33)
- # cljsrn (36)
- # clojure (159)
- # clojure-android (1)
- # clojure-austin (1)
- # clojure-greece (79)
- # clojure-italy (10)
- # clojure-nl (3)
- # clojure-russia (11)
- # clojure-spec (33)
- # clojure-uk (26)
- # clojurescript (107)
- # core-async (22)
- # core-logic (12)
- # cursive (16)
- # datomic (13)
- # devcards (5)
- # duct (36)
- # emacs (4)
- # figwheel (3)
- # fulcro (107)
- # graphql (171)
- # hoplon (27)
- # instaparse (24)
- # jobs-discuss (34)
- # juxt (3)
- # lein-figwheel (1)
- # leiningen (8)
- # lumo (11)
- # off-topic (9)
- # onyx (79)
- # parinfer (1)
- # pedestal (75)
- # re-frame (27)
- # rum (1)
- # shadow-cljs (11)
- # spacemacs (20)
- # specter (17)
- # unrepl (96)
now that .clojure
is a thing I think it’s time we started caching compiled namespaces and analysis from JARs there
In other words, I think today, cached analysis files that came from JARs are given the JAR timestamp. (Fuzzy memory.)
You should pay attention to the logic in the clojure script to find the cache dir
It is not always under .clojure
And .clojure is not even the config dir necessarily
If somehow all of the information on this line
// Compiled by ClojureScript 1.9.968 {:static-fns true}
were used when forming the path (more than just compiler-version
), then the cache would be useable across different projects that have different build-affecting options.Also consider that jar contents may change while the name stays the same, so probably we should SHA the entire jarfile?
@martinklepsch most JARs have the version name no?
-SNAPSHOT but also just people re-installing a jar of a dependency they manage
@mfikes that’s a good point - instead of compiler version we could just SHA that line?
@alexmiller ah, we could also just use ~/.cljs
or something in /tmp/ — gets wiped on restart but who restarts their computers anyways ¯\(ツ)/¯
this sounds very exciting though! 🙂
This seems like it would solve the problems that would arise if you attempted to include AOT artifacts in JARs themselves (mismatch with the compiler the end-user is using), while having effectively the same benefit.
will probably work a bit on this tomorrow - I think this is going to be a simple change but impactful
fwiw, on linux, the canonical directory for caching per-user is recommended as "$XDG_CACHE_HOME" with "~/.cache" as fallback.
Agree with the above pretty please let's keep the conventions going 😉
This also opens up the question about how to include analysis cache from dependencies (I know it is a separate concern, just wanted to throw it there because it's already come up in the lumo
world)
@richiardiandrea we would write those to the same place we write the compiled JS