Jar file effects: deterministic rewriting, and selective class extraction.
The decisions these functions act on live in hive-build.promote.naming; what is here is only the IO.
Jar file effects: deterministic rewriting, and selective class extraction. The decisions these functions act on live in hive-build.promote.naming; what is here is only the IO.
Two seconds after zip-epoch, one ZIP time tick. Clojure loads a .class only
when it is strictly newer than a .clj/.cljc beside it.
Two seconds after `zip-epoch`, one ZIP time tick. Clojure loads a .class only when it is strictly newer than a .clj/.cljc beside it.
(copy-own-classes! from to prefixes)(copy-own-classes! from to prefixes files)Copy every class under from that naming/own-class? accepts for
prefixes, plus exact files, into to, preserving relative paths.
Exact files are the explicit escape hatch for generated protocol interfaces;
no other foreign class may enter the jar. Returns the paths copied.
Copy every class under `from` that `naming/own-class?` accepts for `prefixes`, plus exact `files`, into `to`, preserving relative paths. Exact files are the explicit escape hatch for generated protocol interfaces; no other foreign class may enter the jar. Returns the paths copied.
(entries path){entry-name -> bytes} for every entry of the zip at path, in name order.
{entry-name -> bytes} for every entry of the zip at `path`, in name order.
(entry-names path)The entry names of the zip at path, in name order. Reads no content.
The entry names of the zip at `path`, in name order. Reads no content.
(entry-time entry-name)The stamp of entry-name: class-epoch for a class file, else zip-epoch.
The stamp of `entry-name`: `class-epoch` for a class file, else `zip-epoch`.
(normalize-jar! path)Rewrite the jar at path in place: entries sorted by name, every entry
stamped by entry-time, and every entry a reproducibility rule claims
rewritten.
Contract: two builds of identical inputs produce byte-identical jars, so any difference between two copies of an artifact is content.
Rewrite the jar at `path` in place: entries sorted by name, every entry stamped by `entry-time`, and every entry a reproducibility rule claims rewritten. Contract: two builds of identical inputs produce byte-identical jars, so any difference between two copies of an artifact is content.
(normalized-entries name->bytes)name->bytes with every entry a reproducibility rule claims rewritten.
Entries no rule claims are passed through byte for byte, never decoded.
`name->bytes` with every entry a reproducibility rule claims rewritten. Entries no rule claims are passed through byte for byte, never decoded.
(write-zip! path name->bytes)Write name->bytes to path, in name order, every entry stamped
entry-time.
Write `name->bytes` to `path`, in name order, every entry stamped `entry-time`.
1980-01-01T00:00:00Z — the earliest instant the ZIP format can represent.
1980-01-01T00:00:00Z — the earliest instant the ZIP format can represent.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |