You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Christophe Grand edited this page Jul 31, 2017
·
1 revision
Currently gensyms have been tried to isolate namespaces, here is another proposal: hash-munging.
As usual sort deps in dep-order. The roots have no deps other than core clojure namespaces, compute a hash of the source and append that hash to the namespace name.
For their dependents, first replace occurrences of the original namespaces by their hash-munged ones, then compute their own hashes like in step 1.
repeat until no more namespaces left.
This has the advantage of being a deterministic process. It means that if unrelated extensions have the exact same dep it will be loaded only once because the hash would be equal.
Also since the hashing of a namespace captures the hashes of its deps (step 2 being performed prior to hashing) it makes a hash to reflect not only a version of a namespace but the whole configuration of deps.