From 91a52ca755f64c8336c1ba2753e0be978dd4f9b0 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 22 Apr 2025 22:04:20 +0100 Subject: work/command-line-tool: Comment on trusting the checksum. * ravanan/work/command-line-tool.scm (canonicalize-file-value): Comment on trusting the checksum. --- ravanan/work/command-line-tool.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ravanan/work/command-line-tool.scm b/ravanan/work/command-line-tool.scm index 198addd..853b4fb 100644 --- a/ravanan/work/command-line-tool.scm +++ b/ravanan/work/command-line-tool.scm @@ -234,6 +234,11 @@ actually paths." ("nameroot" . ,(file-name-stem path)) ("nameext" . ,(file-name-extension path)) ("size" . ,(stat:size (stat path))) + ;; Compute the checksum, but only if it is not provided. + ;; If it is provided, trust that it is correct. This + ;; avoids costly (think hashing terabytes of data) hash + ;; computations causing a long delay before the workflow + ;; actually starts running. ("checksum" . ,(or (assoc-ref value "checksum") (checksum path)))) (cons "secondaryFiles" -- cgit v1.2.3