Fork me on GitHub

Interesting — I’d been meaning to look at what would be involved in doing something like this with some of our integrant systems which are essentially dynamically composed from configurations that are loaded through ig/load-namespaces. I’ll need to read this thoroughly to see if I can finally cobble something together. This is like we used to compile clojure code in the good old days! 😁


I think you can do a simple algorithm like: 1. ig/load-namespaces 2. analyze deps.edn for paths that are pulled in by the current project 3. collect all ns’s loaded from those path’s sources 4. (apply compile (set/difference (all-ns) *1))


Please do not have conversations in the #announcements channel.

👍 1

Or stick to a single thread under the original announcement.


Oops sorry sean — I thought this was a different channel!

👍 1

@U08E8UGF7: That seems a lot more fiddly than what I was thinking. Won’t it be awkward to know what paths/aliases your repl was running with? I was thinking you’d just implement compile-namespaces… probably something like:

(defn compile-namespaces [config keys]
  (doall (->> (ig/dependent-keys config keys)
              (mapcat #(conj (ancestors %) %))
              (mapcat ig/key->namespaces)


The whole point is to not compile the namespaces that you are working in on in the current project, since those will change frequently. You can’t determine where those integrant ns’es are coming from just from the config


anyway, let’s move this to #integrant

👍 1