pub fn delete_artifacts(index: &IndexFile, history: &HistoryFile) -> Vec<String>Expand description
Deletes a removed workspace’s artifacts, returning the ones that would not go, each with the reason.
A free function rather than a method so the caller can pull the artifacts
out with AppSettings::workspace_artifacts, release the settings lock,
and delete outside it: system::remove_file waits out a handle another
process holds, and parking every settings reader for that wait is what the
“filesystem work before the lock” rule exists to avoid.
Best-effort by design. Whoever calls this has already decided the workspace
is going, so a stuck file is a leftover to report rather than a reason to
fail — and it is returned, because tracing::warn! in a CLI with no
subscriber attached goes nowhere.