Liking cljdoc? Tell your friends :D

ADR 12: Generated artifacts are content-addressed

Date: 2026-06-16

Context

Recompiling a defnz produces a new shared library, and the JVM does not unload native libraries cleanly.

Decision

Hash the normalized spec, source, options, target, and Zig version into the artifact path.

Consequences

Fresh artifact names make redefinition reliable and cacheable: an unchanged form reuses its cached library, a changed form gets a new one, and stale libraries are never reloaded.

Alternatives

Reusing a fixed library name and reloading it was considered; it runs into the JVM's awkward native-unloading semantics.

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close