Unexpected error ..

gwbennett gwbennett at sentex.ca
Thu Nov 26 19:18:00 UTC 2020


Good morning from Greg Bennett who is running sbcl 2.0.10 under linux 
mint 19.2 64-bit
and using asdf 3.3.6 with mcclim from mcclim-20201016-git via quicklisp.

I am working on a large project and wish to capture the results of a 
trial compile in a file
so that I can check notes, warnings, errors, etc.. Such a compile 
essentially loops over
a set of asdf load-systems.

Not unnaturally for me, I make mistakes, and sometimes I get blocked by 
an unexpected error
which I believe I have managed to isolate.

I am quite unsure about the locus of the unexpected error .. asdf ? sbcl 
? mcclim ? their interaction ?
so I am starting with asdf-devel.

I am uncertain how much to include by way of source files, so i have 
opted to summarise things here first.

New sbcl 2.0.10 in emacs listener

Load a set-up-file to ensure I am using asdf 3.3.6 [I gather this is 
significant for sbcl]. And some of
my own logging tools. Two files attached.

Load mcclim

Running (in-package :cl-user)

  (a-l "mcclim" "doit" (doit) "Z" :base-name "/home/gwbennett/mcclim-code/")

which has the effect of writing the results to a file, in this case

/home/gwbennett/LOGS/MCCLIM/MCCLIM2020-lsbcl-to-Z-26-NOV-at-14:5:2.lsp"

The process exits with:

; wrote 
/home/gwbennett/.cache/common-lisp/sbcl-2.0.10-linux-x64/home/gwbennett/mcclim-code/check-qmb/one/test-qmb-tmpJU0JWO19.fasl
; compilation finished in 0:00:00.051
; No value

Now suppose I do something which contains an error, such as
CL-USER> (asdf-version)

Since (asdf-version) is not in the cl-user package, this is an error. 
What I get back is a different error message:

#<SB-SYS:FD-STREAM for "file 
/home/gwbennett/LOGS/MCCLIM/MCCLIM2020-lsbcl-to-Z-26-NOV-at-14:5:2.lsp" 
{1008BEC8A3}> is closed
    [Condition of type SB-INT:CLOSED-STREAM-ERROR]

Which is my unexpected error. Sometimes after ABORT (twice), this error 
can block me from defining any new function or loading a new
function .. all I receive is a repeat of this message.

Thank you for your patience
Cheers
Greg Bennett


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20201126/24ae34e3/attachment.htm>
-------------- next part --------------
;;; set-up-for-quail.lsp
(eval-when (:load-toplevel) (require :asdf))
#+:allegro(in-package :cl-user)
#+:sbcl(in-package :cl-user)
(unless (string-equal (asdf:asdf-version) "3.3.4")
 (load #+:sbcl "~/Downloads/asdf.fasl"
 	#+:allegro "~/Downloads/ACL-ASDF/asdf.fasl"))

#+:sbcl(declaim (sb-ext:muffle-conditions cl:warning))
#+:sbcl(declaim (sb-ext:muffle-conditions sb-ext:compiler-note)) ;;sbcl-manual Sect 4.1.1
;; unmuffle re-actvivates the warnings

(defun reset-asdf (&optional load-file)
  (asdf:clear-source-registry)
  (asdf:clear-configuration)
  (if load-file
	(asdf:clear-system load-file)))

(load "~/LISP-UTILITIES/logging-tools.lsp")

#+:allegro(setf (sys:gsgc-switch :gc-old-before-expand) t)
#+:allegro(in-package :cl-user)
-------------- next part --------------
;;; This is logging-tools.lsp
;;; started 13 February 2018
;;; holding some simple things to log parts of building a project
;;;
;;; First create a file name string
;;; this assume asdf is available for
;;; uiop/filesystem:directory-exists-p
(in-package :cl-user)


(defun simple-log (project topic system)
  "Creates a string for a dated pathname to project,topic,system in ~/LOGS"
     (let* ((project-up (string-upcase project))
            (up-system (string-upcase system))
      (target-project-directory-string
       (concatenate 'string "/home/gwbennett/LOGS" "/"  project-up))
      (date-time (multiple-value-list (get-decoded-time)))
     (date-date (fourth date-time))
     (date-month (fifth date-time))
     (date-year (sixth date-time))
     (the-time (format nil  "~a:~a:~a" (third date-time)  (second date-time)  (first date-time)))
     (dates (list "JAN"  "FEB"  "MAR" "APR" "MAY" "JUN"  "JUL" "AUG" "SEP"  "OCT"  "NOV"  "DEC")))
     (when (uiop/filesystem:directory-exists-p target-project-directory-string)
      (return-from simple-log
        (pathname
      (concatenate 'string target-project-directory-string "/" project-up 
          (format nil "~a" date-year) "-" 
          (or #+(and :sbcl :linux)(format nil "lsbcl")
          #+(and :ccl :linux)(format nil "lccl")
          #+(and :allegro :linux)(format nil "lacl")
          #+(and :allegro :mswindows)(format nil "wacl")) "-to-" up-system "-"
          (format nil "~a" date-date) "-" 
          (elt dates (- date-month 1)) "-at-" the-time ".lsp")
      )
      ))
        (format t "~%Sorry! Directory ~a does not exist" target-project-directory-string)
        ))

;;; Then the dribble duplication
(defmacro my-with-dribble (dribble-file &body body)
     `(progn (dribble ,dribble-file );:if-exists :supersede)
        (let ((*error-output* *standard-output*))
           , at body
           (dribble))))

 ;;; Finally the logger
;; with calling sequence (a-l "quail" "quail-make" (quail-make) "window-basics")
(defun a-l (project load-file-string load-file system &key (base-name "/home/gwbennett/RESERVE/lc2-Quail/"))
  (unwind-protect
  (my-with-dribble (simple-log project load-file-string system)
                   load-file
                   ))
  )


More information about the asdf-devel mailing list