Skip to main content

Module dependency

Module dependency 

Source
Expand description

External files a lowering read, with the fingerprint each had at the time, so a cached LowerResult can be checked against the filesystem before it is reused (issue #125).

Structs§

ExternalDependency
One external file a lowering depended on: an #image / #figure raster or a #bibliography source.
ExternalInputs 🔒
Resource access for a directive, using the enclosing lowering’s snapshot.
FileIdentity
The device and inode numbers and the status-change time of a file on Unix. Unlike the modification time, none of these can be set from userspace, so a rewrite that restores the old mtime still moves one of them. Every field is None on platforms that do not expose them.
FileSystemReader
Default resource reader, restricted to regular files.
Fingerprint
What a regular file looked like when it was read: its stat fields, the moment that stat was taken, and a fingerprint_bytes hash of its contents.
ResourceData
Bytes returned by a ResourceReader.
ResourceSnapshot
Captured external inputs belonging to one lowering result.

Enums§

ResourceFingerprint
A resource content hash, optionally accompanied by filesystem freshness metadata.

Constants§

DOMAIN_TAG 🔒
RACY_WINDOW
A modification time this close to the moment the fingerprint was taken is not trusted by ExternalDependency::is_current: a second write inside the same filesystem timestamp tick would leave stat unchanged. Two seconds covers FAT’s timestamp resolution.

Traits§

ResourceReader
Supplies image and bibliography bytes at already-resolved source paths.

Functions§

fingerprint_bytes
Fingerprint raw file bytes for dependency comparison.
fingerprint_file
The Fingerprint of the regular file at path, or None when there is no readable regular file there. Directories, devices, and pipes are never opened.
read_fingerprinted 🔒
Read the regular file at path and fingerprint it in one pass. The stat is taken before the read, so a write that lands between the two shows up as a changed stat on the next ExternalDependency::is_current and forces a hash comparison.
regular_file_metadata 🔒