From 4507044300366c91e965cca905a9abc1a63ef0e5 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 18 Oct 2021 00:19:12 +0530 Subject: ccwl: Separate ccwl key from CWL input/output id. * ccwl/ccwl.scm (): Add cwl-id field. (key): Initialize cwl-id field. (key->output): Match the cwl-id of keys to the id of outputs, instead of matching the name of keys to the id of outputs. (cwl-key-address): Use the cwl-id of keys when outputting to CWL. --- ccwl/ccwl.scm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ccwl/ccwl.scm b/ccwl/ccwl.scm index 4c15d98..fa79827 100644 --- a/ccwl/ccwl.scm +++ b/ccwl/ccwl.scm @@ -222,23 +222,24 @@ RUN-ARGS. If such an input is not present in RUN-ARGS, return #f." (map input-id (command-inputs command))) (define-immutable-record-type - (make-key name step) + (make-key name cwl-id step) key? (name key-name) + (cwl-id key-cwl-id) (step key-step)) -(define* (key name #:optional step) +(define* (key name #:optional step (cwl-id name)) "Build and return a object." - (make-key name step)) + (make-key name cwl-id step)) ;; TODO: Add docstring. (define (cwl-key-address key) (if (key-step key) ;; Input/output of particular step (string-append (symbol->string (key-step key)) - "/" (symbol->string (key-name key))) + "/" (symbol->string (key-cwl-id key))) ;; Global input/output - (symbol->string (key-name key)))) + (symbol->string (key-cwl-id key)))) (define (command-object command-syntax) "Return the command object described by COMMAND-SYNTAX. If such a @@ -357,7 +358,7 @@ return #f." steps)) (output (find (lambda (output) (eq? (output-id output) - (key-name key))) + (key-cwl-id key))) (step-out step-with-output)))) (set-output-source output (cwl-key-address key)))) -- cgit v1.2.3