diff options
author | Arun Isaac | 2024-09-11 15:38:35 +0100 |
---|---|---|
committer | Arun Isaac | 2024-09-11 15:38:35 +0100 |
commit | 9b1049ed9f7af205c6e59d7f58b12dc04fd7d3fb (patch) | |
tree | a94fff77e2b830bb77704922024796174077f845 | |
parent | 7157119dc5e1a63a49d94684d1185bd35d79e87a (diff) | |
download | ravanan-9b1049ed9f7af205c6e59d7f58b12dc04fd7d3fb.tar.gz ravanan-9b1049ed9f7af205c6e59d7f58b12dc04fd7d3fb.tar.lz ravanan-9b1049ed9f7af205c6e59d7f58b12dc04fd7d3fb.zip |
ui: Move warning and error reporting functions to separate module.
* ravanan/command-line-tool.scm: Import (ravanan ui).
(warning, error): Move to (ravanan ui).
* ravanan/ui.scm: New file.
-rw-r--r-- | ravanan/command-line-tool.scm | 9 | ||||
-rw-r--r-- | ravanan/ui.scm | 29 |
2 files changed, 30 insertions, 8 deletions
diff --git a/ravanan/command-line-tool.scm b/ravanan/command-line-tool.scm index 9f77f2a..fcea77b 100644 --- a/ravanan/command-line-tool.scm +++ b/ravanan/command-line-tool.scm @@ -56,6 +56,7 @@ #:use-module (ravanan work command-line-tool) #:use-module (ravanan work types) #:use-module (ravanan work utils) + #:use-module (ravanan ui) #:export (run-command-line-tool command-line-tool-scheduler check-requirements @@ -90,14 +91,6 @@ (define %job-poll-interval 5) -(define (warning fmt . args) - (apply format (current-error-port) fmt args) - (newline)) - -(define (error fmt . args) - (apply warning fmt args) - (exit #f)) - (define-immutable-record-type <scheduler-proc> (scheduler-proc name cwl scatter scatter-method) scheduler-proc? diff --git a/ravanan/ui.scm b/ravanan/ui.scm new file mode 100644 index 0000000..955134b --- /dev/null +++ b/ravanan/ui.scm @@ -0,0 +1,29 @@ +;;; ravanan --- High-reproducibility CWL runner powered by Guix +;;; Copyright © 2024 Arun Isaac <arunisaac@systemreboot.net> +;;; +;;; This file is part of ravanan. +;;; +;;; ravanan is free software: you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation, either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; ravanan is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with ravanan. If not, see <https://www.gnu.org/licenses/>. + +(define-module (ravanan ui) + #:export (warning + error)) + +(define (warning fmt . args) + (apply format (current-error-port) fmt args) + (newline)) + +(define (error fmt . args) + (apply warning fmt args) + (exit #f)) |