CLISP issues

0 views
Skip to first unread message

Tobias Rautenkranz

unread,
Jun 8, 2009, 4:18:22 PM6/8/09
to mudb...@googlegroups.com
Hi Sean

* Using a module with no source-files breaks on CLISP in
#'dependencies-out-of-date-p since #'last-compile-time returns NIL, but it
should be a number (it's used as argument to #'>).

CLISP:
[1]> (loop for i in nil maximize i)
NIL

"If the maximize or minimize clause is never executed, the accumulated value
is unspecified."
/usr/share/doc/hyperspec/Body/06_ac.htm

Thus #'last-compile-time should be changed to some like this:

(defgeneric last-compile-time (component)
(:method ((system module))
(let ((all-files (all-files system :type 'source-file)))
(if all-files
(loop :for file :in all-files
:maximize (last-compile-time file))
0)))
(:method ((component component))
(safe-write-date component))

Using 0 as default value like #'save-write-date.
This is also the behaviour of SBCL:
(loop for i in nil maximize i)
0

* Somewhere between 2.44.1 and 2.47 #'ext:run-shell-command of CLISP has been
changed to return NIL on success instead of 0. #'mb.sysdef:run-shell-command
should handle this.

* The fasl files for the .mbd files are not stored in a unique directory based
on their version; thus when running two CLISP versions I have to remove them
before I can use the other.


Regards,
Tobias

signature.asc

Sean Ross

unread,
Jun 8, 2009, 5:41:42 PM6/8/09
to mudb...@googlegroups.com


Thanks, I've used your new definition of last-compile-time and put in
some code to handle this case.
I've uploaded a new version


> * The fasl files for the .mbd files are not stored in a unique
> directory based
> on their version; thus when running two CLISP versions I have to
> remove them
> before I can use the other.

Thanks, I'll ensure that a bug is raised to deal with this.

- sean

Tobias Rautenkranz

unread,
Jun 11, 2009, 3:28:29 PM6/11/09
to mudb...@googlegroups.com
Hi Sean

> > * The fasl files for the .mbd files are not stored in a unique
> > directory based
> > on their version; thus when running two CLISP versions I have to
> > remove them
> > before I can use the other.
>
> Thanks, I'll ensure that a bug is raised to deal with this.

For CLISP adding a invalid FASL recompilation helps; analog to the
HANDLER-CASE, except #'load with :obsolete-action is used

(defmethod execute ((component lisp-source-file) (action load-action))
(flet ((do-load ()
(cond ((not (component-output-exists-p component))
(error 'fasl-does-not-exist :file (output-file component)))
((> (input-write-date component) (output-write-date
component))
(error 'fasl-out-of-date :file (output-file component)))
(t (load (output-file component)
#+clisp :obsolete-action #+clisp :compile)))))
[...]

signature.asc
Reply all
Reply to author
Forward
0 new messages