thephoeron / let-over-lambda

Doug Hoyte's "Production" version of macros from Let Over Lambda, ready for ASDF and Quicklisp.
Other
131 stars 25 forks source link

Compilation failure on ccl #15

Open bhyde opened 9 years ago

bhyde commented 9 years ago

As discussed here i get compilation failures when upon (ql:load "cl-bson), which requires let-over-lambda. The failure occurs here:

(defun pandoriclet-get (letargs)
  `(case sym
     ,@(mapcar #`((,(car a1)) ,(car a1))
               letargs)
     (t (error
          "Unknown pandoric get: ~a"
          sym))))

The #isn't #', and then there are commas are inside of a backquote. Which suggests something failed to setup a reader macro for #.

thephoeron commented 9 years ago

The Hash-Backtick is a reader macro, defined on Line 273 of let-over-lambda.lisp. The named-readtable package is used to define a customized readtable that includes the reader macros. To use the pandoric macros, you do need to use (in-readtable lol:lol-syntax)—but it sounds like you're getting tripped up on (ql:quickload :cl-bson), before you even try to write any code that might include the LOL reader-macro syntax.

Some fact-checking:

You identified the following versions of CCL affected in Gitter:

I cannot reproduce issue with versions of CCL:

The only place CL-BSON uses LOL is in the cl-bson.readtable package, and imports only defmacro!; it does use the LOL syntax readtable, however.

LOL and CL-BSON also both build successfully for CCL v1.10-r16196 (Linux x86-64) on Travis-CI.

Some questions:

bhyde commented 9 years ago

We can ignore cl-bson for now, since I've got the affliction if I ql:quickload let-over-lambda in a virgin ccl.

My .ccl-init is the usual

#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname))))
  (when (probe-file quicklisp-init)
    (load quicklisp-init)))

Here's a transcript of an attempt to reproduce the issue in a very lean context:

bash-3.2$ cd /tmp
bash-3.2$ git clone https://github.com/thephoeron/let-over-lambda.git
Cloning into 'let-over-lambda'...
remote: Counting objects: 283, done.        
remote: Total 283 (delta 0), reused 0 (delta 0), pack-reused 283        
Receiving objects: 100% (283/283), 52.09 KiB | 0 bytes/s, done.
Resolving deltas: 100% (158/158), done.
Checking connectivity... done.
bash-3.2$ cd let-over-lambda
bash-3.2$ ccl --no-init
Welcome to Clozure Common Lisp Version 1.10-dev-r16165-trunk  (DarwinX8664)!

CCL is developed and maintained by Clozure Associates. For more information
about CCL visit http://ccl.clozure.com.  To enquire about Clozure's Common Lisp
consulting services e-mail info@clozure.com or visit http://www.clozure.com.

? (require 'asdf)
(require 'asdf)
ASDF
("uiop" "UIOP" "asdf" "ASDF")
? (asdf:load-system "cl-ppcre")
(asdf:load-system "cl-ppcre")
T
? (asdf:load-system "named-readtables")
(asdf:load-system "named-readtables")
T
? (load (compile-file "package"))
(load (compile-file "package"))
#P"/private/tmp/let-over-lambda/package.dx64fsl"
? (load (compile-file "let-over-lambda"))
(load (compile-file "let-over-lambda"))
;Compiler warnings for "let-over-lambda.lisp" :
;   In NLET-TAIL: Unused lexical variable I
; Compiler warning: Overwriting already existing readtable #<NAMED-READTABLE LOL-SYNTAX #x30200099682D>.
; While executing: EDITOR-HINTS.NAMED-READTABLES::SIMPLE-STYLE-WARN, in process listener(1).
#P"/private/tmp/let-over-lambda/let-over-lambda.dx64fsl"
? 

Which is different :(. But the compiler warning about overwriting the named readtable might be a hint.

The named readtables came out of /Users/bhyde/quicklisp/dists/quicklisp/software/named-readtables-20101006-darcs/named-readtables.asd