Suggestions welcome.
This is bug (?) of ECL:
(find-package :||)
In function ROW-MAJOR-AREF, the value of index is 0 which is not of expected type (INTEGER 0 0) Broken at EVAL.Available restarts: 1. (USE-VALUE) Supply a new value of type (INTEGER 0 0). Broken at FIND-PACKAGE.
Fast solution:
--- swank.lisp Wed Sep 19 14:12:08 2007 +++ swank.lisp Sat Oct 20 11:19:52 2007 @@ -1606,16 +1606,17 @@ (defun parse-package (string) "Find the package named STRING. Return the package or nil." - (multiple-value-bind (name pos) - (if (zerop (length string)) - (values :|| 0) - (let ((*package* *swank-io-package*)) - (ignore-errors (read-from-string string)))) - (and name - (or (symbolp name) - (stringp name)) - (= (length string) pos) - (find-package name)))) + (when string + (multiple-value-bind (name pos) + (if (zerop (length string)) + (values :|| 0) + (let ((*package* *swank-io-package*)) + (ignore-errors (read-from-string string)))) + (and name + (or (symbolp name) + (stringp name)) + (= (length string) pos) + (find-package name)))))
(defun unparse-name (string) "Print the name STRING according to the current printer settings."
"Yaroslav Kavenchuk" kavenchuk@gmail.com writes:
Suggestions welcome.
This is bug (?) of ECL:
(find-package :||)
In function ROW-MAJOR-AREF, the value of index is 0 which is not of expected type (INTEGER 0 0) Broken at EVAL.Available restarts:
- (USE-VALUE) Supply a new value of type (INTEGER 0 0).
Broken at FIND-PACKAGE.
Yes, this seems like a bug in ECL. If you have the chance, please fix it there.
Fast solution:
--- swank.lisp Wed Sep 19 14:12:08 2007 +++ swank.lisp Sat Oct 20 11:19:52 2007 @@ -1606,16 +1606,17 @@ (defun parse-package (string) "Find the package named STRING. Return the package or nil." ...
- (when string
- (multiple-value-bind (name pos)
(if (zerop (length string))
(values :|| 0)
(let ((*package* *swank-io-package*))
(ignore-errors (read-from-string string))))
(and name ...
(find-package name)))))
I don't see how this fixes the problem. If you pass "", the `(when string' will still evaluate its body, so :|| will still be passed down to FIND-PACKAGE, won't it?
-T.
2007/10/22, Tobias C. Rittweiler tcr@freebits.de:
I don't see how this fixes the problem. If you pass "", the `(when string' will still evaluate its body, so :|| will still be passed down to FIND-PACKAGE, won't it?
You are right: this patch do not fix ECL bug, but enable start-up slime with ECL.