ruricolist / serapeum

Utilities beyond Alexandria
MIT License
420 stars 41 forks source link

FYI: Package issue I ran into when loading into ABCL #101

Closed alanruttenberg closed 2 years ago

alanruttenberg commented 2 years ago

Reported here: https://github.com/armedbear/abcl/issues/425 Packages will be the death of us. Here's a minor rewrite of define-simple-exporter that doesn't trigger the bug. I moved the interning of the symbol into the expansion.

  (with-unique-names (whole)
    (let ((name-sym (first lambda-list)))
      `(progn
         (export-always (list (intern ,(string macro-name)
                      (find-package :serapeum.exporting)))
             (find-package :serapeum.exporting))
         (defmacro ,exporter-name (&whole ,whole ,@lambda-list)
           ,(fmt "Like `~(~a~)', with implicit export of ~:@(~a~)."
                macro-name name-sym)
           (declare (ignore ,@(set-difference (flatten (rest lambda-list))
                                              lambda-list-keywords)))
           (list 'progn
                 (list 'export-always (list 'quote ,name-sym))
                 (cons ',macro-name (rest ,whole))))))))

FWIW I also noted another problem loading with ABCL which I didn't track down. It's mentioned at the bottom of the cited issue.

ruricolist commented 2 years ago

I've addressed this and the other problem and am able to load Serapeum on ABCL 1.8.0.

alanruttenberg commented 2 years ago

Verified. Thanks!