diff options
author | Arun Isaac | 2024-10-07 15:51:48 +0100 |
---|---|---|
committer | Arun Isaac | 2024-10-07 16:02:35 +0100 |
commit | 394dca860e767df69562f3e5afa3ec3c588afbaa (patch) | |
tree | 5aac56fd24bd528232e273395d5bccba44c2ed39 /bin | |
parent | 454a0ff7744963433c03ab813cf9309be5c6b0a9 (diff) | |
download | ravanan-394dca860e767df69562f3e5afa3ec3c588afbaa.tar.gz ravanan-394dca860e767df69562f3e5afa3ec3c588afbaa.tar.lz ravanan-394dca860e767df69562f3e5afa3ec3c588afbaa.zip |
bin: Pass manifest file paths, not manifests to other functions.
* bin/ravanan: Move to (ravanan command-line-tool). Add comment about
declarative modules.
(main): Pass manifest file path to run-workflow.
* ravanan/command-line-tool.scm (run-command-line-tool,
build-command-line-tool-script): Accept manifest file path instead of
manifest.
* ravanan/workflow.scm (workflow-scheduler, run-workflow): Accept
manifest file path instead of manifest.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ravanan | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/bin/ravanan b/bin/ravanan index 19bb8b5..cc9005d 100755 --- a/bin/ravanan +++ b/bin/ravanan @@ -97,27 +97,6 @@ files that have the token in the @verbatim{SLURM_JWT=token} format." string-trim-both get-string-all))) -(define (load-manifest manifest-file) - "Load manifest from @var{manifest-file} and return it." - ;; We load the manifest file into a dummy module of its own so that any - ;; definitions from there don't leak out. We also ensure that this dummy - ;; module is different for different manifest files so that definitions from - ;; one manifest file don't leak into other manifest files. - (let ((manifest-file-path (canonicalize-file-name manifest-file)) - (manifest-module (resolve-module (match (file-name-split manifest-file-path) - (("" parts ...) - (map string->symbol parts)))))) - ;; Import modules required for loading manifests. - (for-each (lambda (module-name) - (module-use! manifest-module (resolve-interface module-name))) - '((guile) - (gnu packages) - (guix profiles))) - (save-module-excursion - (lambda () - (set-current-module manifest-module) - (load manifest-file-path))))) - (define main (match-lambda ((program args ...) @@ -151,9 +130,8 @@ files that have the token in the @verbatim{SLURM_JWT=token} format." ;; We must not try to compile guix manifest files. (set! %load-should-auto-compile #f) (scm->json (run-workflow (file-name-stem workflow-file) - (load-manifest - (canonicalize-path - (assq-ref args 'guix-manifest-file))) + (canonicalize-path + (assq-ref args 'guix-manifest-file)) (read-workflow workflow-file) (read-inputs inputs-file) (case (assq-ref args 'batch-system) |