From 8755db4a960a7a78ed1af3635b7c63cdefa957a5 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Mon, 28 May 2018 14:55:59 -0700 Subject: [PATCH] devops: Capitalize error messages; end them with a colon or period. --- src/devops/devops.scm | 56 +++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/devops/devops.scm b/src/devops/devops.scm index 7b36ec3cc..d36aa7ecf 100644 --- a/src/devops/devops.scm +++ b/src/devops/devops.scm @@ -218,7 +218,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (burst-string (match-extract match 'version) #\space #t)) (if (eof-object? line) - (error "could not find core version") + (error "Could not find core version.") (loop))))))))) (define (make-news-pattern fullname) @@ -353,9 +353,9 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. line)))) (if match (->version (match-extract match 'version)) - (error "no plugin version:" (plugin-name plugin)))) + (error "No plugin version:" (plugin-name plugin)))) (if (eof-object? line) - (error "no AC_INIT:" (plugin-name plugin)) + (error "No AC_INIT:" (plugin-name plugin)) (loop)))))))) (define (plugin-changes plugin) @@ -400,7 +400,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (release-core version changes dirt snap?) (if (and (null? changes) (not snap?)) - (error "no unreleased commits")) + (error "No unreleased commits.")) (let* ((project (project-name)) (vers (version-string version)) (pkgvers (string project"-"vers)) @@ -438,7 +438,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (release-plugin plugin version changes dirt snap?) (if (and (null? changes) (not snap?)) - (error "no unreleased commits")) + (error "No unreleased commits.")) (let* ((vers (version-string version)) (pkg (plugin-package plugin)) (pkgvers (string pkg"-"vers)) @@ -491,7 +491,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (found) (release-core version changes dirt #t))) (else - (error "version has not incremented:" version))))) + (error "Version has not incremented:" version))))) (define (snapshot-plugin plugin dirt) (let* ((changes (or (plugin-changes plugin) '())) @@ -515,7 +515,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (found) (release-plugin plugin version changes dirt #t))) (else - (error "version has not incremented:" version))))) + (error "Version has not incremented:" version))))) ;;;; Build @@ -524,7 +524,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (let ((srcs (available-sources "devops")) (hosts (hosts))) (if (null? hosts) - (error "no build hosts defined") + (error "No build hosts defined.") (if (default-object? hostname) (for-each (lambda (host) (write-host-status host srcs)) hosts) @@ -559,7 +559,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (lambda (i/o) (let ((reply (read-reply '(quote ready) i/o))) (if (not (eq? reply 'ready)) - (error "not ready:" reply))) + (error "Build host not ready:" reply))) (let ((reply (read-reply `(let ((dirname ,(host-directory host))) (if (and (file-exists? dirname) (file-directory? dirname)) @@ -569,15 +569,15 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (cond ((eq? reply 'yes) unspecific) ((eq? reply 'no) - (error "no build directory:" (host-directory host))) - (else (error "unexpected reply:" reply)))) + (error "No build directory:" (host-directory host))) + (else (error "Unexpected reply:" reply)))) (let ((files (read-reply `(directory-file-names ,(host-directory host) #f) i/o)) (proj (project-name)) (sarch (host-scheme-architecture host)) (darch (host-debian-architecture host))) (if (not (list-of-type? files string?)) - (error "unexpected filename list:" files)) + (error "Unexpected filename list:" files)) (write-lock-report host i/o files) (for-each (lambda (src) @@ -653,7 +653,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (let ((sys (system-library-pathname "devops/build.scm" #f))) (if (file-exists? sys) sys - (error "could not find build script"))))) + (error "Could not find build script."))))) i/o) (verify-host-architecture host i/o) @@ -672,7 +672,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (flush-output-port i/o) (let ((reply (read-reply '(quote ok) i/o))) (if (not (eq? reply 'ok)) - (error "not OK"))) + (error "Build host not OK."))) (close-input-port i/o) (close-output-port i/o)) @@ -681,15 +681,15 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (begin (let ((darch (read-reply '(read-debian-architecture) i/o))) (if (not (string? darch)) - (error "no Debian architecture")) + (error "No Debian architecture.")) (if (not (string=? darch (host-debian-architecture host))) - (error "wrong Debian architecture"))) + (error "Wrong Debian architecture."))) (let ((str (read-reply '(if (ubuntu?) "yes" "no") i/o))) (if (not (string? str)) - (error "no Ubuntu-ness")) + (error "No Ubuntu-ness.")) (let ((ubu? (string=? "yes" str))) (if (not (eq? ubu? (host-ubuntu? host))) - (error "wrong Ubuntu-ness"))))))) + (error "Wrong Ubuntu-ness."))))))) (define (call-with-host-i/o host receiver) (call-with-current-continuation @@ -749,7 +749,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (devops:make target) (if (not (member target '("native" "svm" "C" "C-old" "C2native" "C2svm"))) - (error "unknown build target:" target)) + (error "Unknown build target:" target)) (load-make-config) (%exit (call-with-current-continuation ;throw here to unwind all @@ -772,7 +772,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (devops:make* target) (let* ((prefix (or (get-environment-variable "PWD") - (error "PWD not set"))) + (error "PWD not set."))) (host-exe (or (get-environment-variable "MIT_SCHEME_EXE") "mit-scheme")) (target-exe 'unset)) @@ -783,7 +783,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (lndir "../doc") (make-install-doc prefix) (for-each lndir '("../src" "../tests"))) - (error "not a git working directory:" + (error "Not a git working directory:" (working-directory-pathname)))) ;;(set-environment-variable! "LD_LIBRARY_PATH" "/usr/local/lib") @@ -864,7 +864,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (map (lambda (plugin) (make-install-plugin plugin prefix)) plugin-list)))))) (if (not (zero? plugin-errors)) - (error "plugins failed to build:" plugin-errors))))) + (error "Plugins failed to build:" plugin-errors))))) (define (load-make-config) (cond ((file-exists? "devops-config.scm") @@ -877,7 +877,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (begin (load file '(devops)) #t)))) (else - (error "no devops test configuration found")))) + (error "No devops test configuration found.")))) (define make-config "") (define (make-configuration . args) @@ -942,7 +942,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (make-install-plugin* plugin prefix) (let ((dir (plugin-directory plugin))) (if (not (file-directory? dir)) - (error "plugin directory not found:" dir)) + (error "Plugin directory not found:" dir)) (log "# "dir":\n") (if (not (file-exists? (string dir"/configure"))) (trun "cd "dir"/; ./autogen.sh")) @@ -1018,7 +1018,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (let ((n (string name))) (or (find (lambda (p) (string=? n (plugin-name p))) plugin-list) - (error "no such plugin:" name)))) + (error "No such plugin:" name)))) (define-record-type (make-plugin name directory) @@ -1072,7 +1072,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. ((string=? "i386" arch) "i386") ((string=? "svm1-32" arch) #f) ((string=? "svm1-64" arch) #f) - (else (error "unknown host architecture:" arch))))) + (else (error "Unknown host architecture:" arch))))) (define (host-ubuntu-codename host) (ubuntu-os-codename (host-os host))) @@ -1176,10 +1176,10 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (find-git-root) (let ((pwd (drop-slash (or (get-environment-variable "PWD") - (error "PWD not set"))))) + (error "PWD not set."))))) (let loop ((parent (drop-slash (dirname pwd)))) (if (string-null? parent) - (error "no git root found:" pwd) + (error "No git root found:" pwd) (if (file-directory? (string parent"/.git")) parent (loop (drop-slash (dirname pwd)))))))) -- 2.25.1