From ed55cc032aacb46d82b2983818a1712a5e732e44 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 18 Dec 2025 13:20:30 +0000 Subject: workflow: Filter out step inputs that have no source. These may be optional inputs. --- ravanan/workflow.scm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ravanan/workflow.scm b/ravanan/workflow.scm index 2fd00d6..0451f68 100644 --- a/ravanan/workflow.scm +++ b/ravanan/workflow.scm @@ -279,11 +279,16 @@ command-line-tool)}." #()) (or (assoc-ref cwl "hints") #())) - (vector-map->list (lambda (input) - (let ((input-id (assoc-ref input "id"))) - (cons input-id - (json-ref step "in" input-id)))) - (assoc-ref run "inputs")) + (vector-filter-map->list (lambda (input) + (let ((input-id (assoc-ref* input "id"))) + (match (assoc input-id + (assoc-ref* step "in")) + ((_ . source) + (cons input-id source)) + ;; Optional inputs may be + ;; missing a source; drop them. + (#f #f)))) + (assoc-ref* run "inputs")) ;; Inputs that either have a default or accept null values are ;; optional. (vector-filter-map->list (lambda (input) -- cgit 1.4.1