Expand description
Typed patch / override model.
A patch replaces a registry-resolved package candidate with a local source for the duration of one Cabin invocation. The patch is local development policy — it is never serialized into published package metadata, never affects the resolver for downstream consumers, and never triggers network access.
Public syntax lives in two places:
- the workspace-root
cabin.toml’s[patch]table (root/workspace policy); - any
.cabin/config.toml’s[patch]table (user / workspace / package / explicit policy from the config layer).
Both forms produce the same typed model. The orchestration
layer in cabin merges the two and the workspace loader
stitches the patched packages into the package graph.
Structs§
- Declared
Patch - One patch entry as declared in a single source file. Carries
the relative
sourcevalue plus the absolute path of the file that declared it so the orchestration layer can resolve any relative paths against the right base directory. - Patch
Manifest Settings - Workspace-root manifest’s
[patch]declarations. Member manifests cannot declare patches — the workspace loader rejects them — so reading off the root is sufficient.
Enums§
- Patch
Provenance - Provenance label for a patch entry. Mirrors the precedence
ladder Cabin walks for patch resolution and is surfaced
verbatim in
cabin metadataso users can audit which file supplied each active patch. - Patch
Source - What a patch redirects the patched package to. Each variant
pairs the
PatchSourceKindwith its concrete data. - Patch
Source Kind - Kind of source a patch points at. Today only local paths are supported. The enum is closed: adding new source kinds is a deliberate change that requires matching parser, validator, and resolver work.
- Patch
Validation Error - Errors produced while validating patch declarations. Wording is intentionally stable so integration tests can match substrings.