[Ecls-list] Problem loading swank

Pierre THIERRY nowhere.man at levallois.eu.org
Tue Feb 13 17:53:41 UTC 2007


After successfully compiling ECL on Hurd, and building a Debian package
for it, I'm now trying to test it.

I had problems loading swank. I hit three problems so far:

- asdf-loading it got me the error that it didn't find the
  HOST-ENT-ADDRESSES in SB-BSD-SOCKETS package
- asdf-loading it after REQUIRing 'SOCKETS got me the error that
  *IHS-TOP* couldn't be imported from SWANK-BACKEND because such a
  symbol was already present

So I tried loading it manually to see where the problem is, and in fact
I got another problem. All goes well until I load the final file,
swank.lisp, and I get the following error:

;;; Loading "/usr/share/common-lisp/source/slime/swank.lisp"
Iteration in LOOP follows body code.
Current LOOP context: FOR EL = (AREF VECTOR IDX) DO.
Broken at LOAD.

Which should be at line 3472 in the file, in function
fuzzy-completion-set. I'm no ECL expert, as I'm using SBCL in everyday
work, could you help debug that problem?


The code is the following (if you don't have swank source at hand):

(defun fuzzy-completion-set (string default-package-name &key limit time-limit-in-msec)
  "Prepares list of completion obajects, sorted by SCORE, of fuzzy
completions of STRING in DEFAULT-PACKAGE-NAME.  If LIMIT is set,
only the top LIMIT results will be returned."
  (declare (type (or null (integer 0 #.(1- most-positive-fixnum))) limit time-limit-in-msec))
  (multiple-value-bind (name package-name package internal-p)
      (parse-completion-arguments string default-package-name)
    (flet ((convert (vector &optional converter)
             (when vector
               (loop for idx :upfrom 0
                     while (< idx (length vector))
                     for el = (aref vector idx)
                     do (setf (aref vector idx) (convert-fuzzy-completion-result
                                                 el converter internal-p package-name))))))
      (let* ((symbols (and package
                           (fuzzy-find-matching-symbols name
                                                        package
                                                        (and (not internal-p)
                                                             package-name)
                                                        :time-limit-in-msec time-limit-in-msec
                                                        :return-converted-p nil)))
             (packs (and (not package-name)
                         (fuzzy-find-matching-packages name)))
             (results))
        (convert symbols (completion-output-symbol-converter string))
        (convert packs)
        (setf results (sort (concatenate 'vector symbols packs) #'> :key #'second))
        (when (and limit
                   (> limit 0)
                   (< limit (length results)))
          (if (array-has-fill-pointer-p results)
              (setf (fill-pointer results) limit)
              (setf results (make-array limit :displaced-to results))))
        results))))


Obviously, that code works great on other systems, because I used ECL in
SLIME several times already.

Curiously,
Pierre
-- 
nowhere.man at levallois.eu.org
OpenPGP 0xD9D50D8A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20070213/5c8c5ba8/attachment.sig>


More information about the ecl-devel mailing list