pub fn declare(dir: &Path, declaration: &Declaration) -> Result<()>Expand description
Declares an artifact of the attempt in dir, the attempt directory a
worker’s prepare receives as base. Declare it in solve, before the
first write, so agents can read it while the job runs; never in prepare,
which also runs for validation. Repeating an identical declaration is a
no-op; another declaration of the same name or file is an error. Safe to
call from concurrent tasks.