Expand description
Shared kernel for resolving a task’s InputSpec / OutputSpec
patterns against the filesystem.
Two distinct consumers exist:
- Cache-key input resolution resolves each declared
InputSpec, reading the bytes of every match and folding them into the cache-key contents. - The executor’s output-store path resolves each declared
OutputSpecafter a successful run, recording the mode and host path of every match for the cache library to ingest.
Both consumers project workspace-anchored patterns onto the host
filesystem the same way (literal_workspace_segments +
host_path_from_segments for literals, glob_walk_origin + a
recursive walker for globs); the only difference is what each one
does once a regular-file match has been identified. This module
captures the common projection helpers and the recursive walker,
and parameterises the per-match work behind the GlobMatchAction
trait.
Structs§
- Glob
Walk - Per-glob walk state: holds every immutable input the recursion needs, so the recursive methods take only the changing parts.
Traits§
- Glob
Match Action - Per-consumer hooks for
GlobWalk::walk.
Functions§
- glob_
walk_ origin - Compute the glob-walk origin: the host directory at which the walk
starts, the workspace-absolute prefix to prepend to every matched
path (
"/proj_root"forProjectRelative+ProjectRoot::Nested;""otherwise), and the candidate-string prefix that turns walk-relative segments into the spelling globset matches against ("/"forPathAnchor::WorkspaceAbsolute;""forPathAnchor::ProjectRelative, matching each pattern’sDisplayform). - host_
path_ from_ segments - Build a host filesystem path by pushing each workspace-segment’s
string form onto
workspace_root. - literal_
workspace_ segments - Lift a literal
HazPath(under the suppliedProjectRoot) into its workspace-absolute segment view. - workspace_
absolute_ string_ from_ segments - Render a sequence of workspace-segments as a workspace-absolute
path string (
"/seg1/seg2/...").