Skip to main content

Module self_depend

Module self_depend 

Source
Expand description

rk self-depend: release-kit as a consumer project’s development dependency, kept fresh.

A consumer obtains rk through whatever tool manager it already runs, and manager owns that axis: the closed list, the detection, and the per-manager pin reader. The flake manager carries two facts: the tag in flake.nix is the version, and the release-kit node in flake.lock is the content. This module owns the offline observation across every manager and the per-checkout state key; pin owns the flake line grammar, fragments the authored texts add serves, leftovers the predecessor catalog clean removes, discover the one network call, txn the fenced two-file transaction, guard the gates around it, venue where a release is published, and matrix which manager and venue pairs render.

Modules§

advice
The texts that guide a pin move.
check
The version check the .envrc line runs on every directory entry.
discover
The one network call the devshell verb makes: which release is the latest.
fragments
The texts rk self-depend add serves: one fragment set per manager and venue pair, the .envrc line, and the seed file for a manager the target has no file for.
guard
The gates around the devshell transaction, so the .envrc line is safe on every directory entry.
leftovers
What a predecessor bump mechanism left in a target.
manager
The manager axis: which tool manager a target obtains rk through.
matrix
The manager × venue matrix for rk itself: which pairs land as a fragment, seeded where the manager file is absent, and which are a hand edit with a named reason.
pin
The pin matcher: the one line in a consumer’s flake.nix that names the release-kit tag.
txn
The fenced two-file transaction behind rk self-depend sync.
venue
The venue axis: where a release of rk itself is published, and the reference form a manager records for each.

Structs§

Observed
Everything the offline pass reads from a target and this host’s state root. It spawns nothing and fetches nothing.

Enums§

Presence
Whether a file exists at its expected path.

Functions§

backup_dir
The directory a transaction backs the two files up into.
check_cache_dir
The directory the version check caches its answers under: <cache root>/self-depend.
has_check_line
Whether an .envrc text carries the check line: a line whose trimmed start is the verb, whatever follows.
has_sync_line
Whether an .envrc text carries the retired sync line: a line whose trimmed start is the verb, whatever flags follow.
lock_path
The single-writer lock for one checkout.
marker_path
The marker an open transaction leaves until it commits or restores.
missing_follows
The follows lines that the release-kit input of a target’s flake lacks, read from its flake.lock as it stands now. A target with no readable lock lacks none.
normalize_tag
Fold the three tag shapes — v0.2.16, 0.2.16, and the release URL — to one tag with exactly one leading v.
observe
Read a target’s pin wiring across every manager, offline.
pinned_version
The rk version the project pins, without a leading v, where exactly one manager names release-kit with one version; None otherwise, including a target that does not read.
state_dir
The directory every devshell state file lives under: <state root>/devshell.
state_key
The per-checkout key every state file is named by: <basename>-<digest16> over the canonical path, so two clones never share a lock, a stamp, or a backup.