cbaggers / varjo

Lisp to GLSL Language Translator
BSD 2-Clause "Simplified" License
223 stars 23 forks source link

compile fails when *print-case* is :downcase #125

Open metayan opened 7 years ago

metayan commented 7 years ago

Happens both with CCL and SBCL. The latter complains in this way:

; compiling file "/lisp/varjo/src/vari.glsl/functions.lisp":
; compiling (in-package :vari.glsl)
; compiling (v-def-glsl-template-fun break ...)
; compiling (v-def-glsl-template-fun continue ...)
; compiling (v-def-glsl-template-fun identity ...)
; compiling (v-def-glsl-template-fun int ...)
debugger invoked on a UNBOUND-SLOT in thread
#<THREAD "main thread" RUNNING {1001B88083}>:
  The slot VARJO.INTERNALS::TYPE-SPEC is unbound in the object
Error during printing.
The slot VARJO.INTERNALS::TYPE-SPEC is unbound in an instance of
VARJO-CONDITIONS:UNKNOWN-TYPE-SPEC.

Took quite a while to find... ;) (And thanks for a great system.)

cbaggers commented 7 years ago

Wow! yeah I didnt even remember that was an option :p Where do you set *print-case*? What do you do to trigger this? (it looks like (ql:quickload :varjo)

Thanks for reporting this

cbaggers commented 7 years ago

wow ok doing the following gives me pages and pages of errors

metayan commented 7 years ago

Originally I encountered it with (ql:quickload :cepl), but the above result is with (ql:quickload :varjo :verbose t) to get some more info.

For me, it only stops at the error mentioned. And only varjo compains about the :downcase - no other package (well, so far...).

I don't recall now what triggered it suddenly, because it has been working before - even with the :downcase, which I have had set in .sbclrc for ages.

Sometimes I run SBCL directly from the command line (with sbcl-readline) to start up the cepl:repl and connect to it from emacs and slime afterwards, because of the OSX thread issues not being completely clear yet, so that's how I noticed the error. The rest of the time I use portacle. I tried now to set the :downcase in portacle as well, and same error. Also with SBCL 1.4.1.130-ad48ecb5e.

BTW, what do you mean by "pages and pages of errors". For me the compilation stops at the first error.

metayan commented 7 years ago

Also tried

sbcl --no-sysinit --no-userinit --eval "(setf *print-case* :downcase)" \
 --load ~/quicklisp/setup.lisp --eval '(ql:quickload :varjo)'

(after clearing ~/.cache/common-lisp/sbcl-1.4.1-macosx-x64/ of course.) and got the same error. (Just to make sure nothing in my .sbclrc is interfering.)

cbaggers commented 7 years ago

Thanks, sounds like we are hitting the same issues (roughly). I'll hopefully have a fix this week

cbaggers commented 7 years ago

Notes to self: So the problems begin here:

(defun p-symb (package &rest args)
  (values (intern (format nil "~{~a~}" args) package)))

with *print-case* set to :lower this makes a different symbol. from (expand-keyword-type-spec-shorthand :void) we get vari.types::|v-void| rather than vari.types::v-void. We need a to find all the places in our projects we do stuff like this and change it to map over args and call symbol-name on all the symbols before feeding them to format