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.
(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.
(normalize-jar! path)Rewrite the jar at path in place: entries sorted by name, every entry
stamped zip-epoch, 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 `zip-epoch`, 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
zip-epoch.
Write `name->bytes` to `path`, in name order, every entry stamped `zip-epoch`.
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 |