dexador
dexador copied to clipboard
errors when *print-case* is :downcase
I didn't like lisp shouting at me all the time so I set in my .sbclrc (setf *print-case* :downcase)
.
This causes a problem with dexador when it does: (intern (format nil "~A-~A" :http-request name))
in src/error.lisp
, then I can handle the condition with dexador.error::|http-request-not-found|
but not with dex:http-request-not-found
.
I think I read in common lisp recipes and otherwhere that the user should be able to configure print-case, so maybe dexador shouldn't depend on this being the default and upcase the string from format before interning?
I'm also pretty new at lisp though, if users aren't supposed to change print-case like I did then let me know and we just close issue.
Wrapping call to format
into with-standard-io-syntax
should fix the issue. Additionally, there is an utility in alexandria (which already is a dependency) that does exactly that - format-symbol
, which would be used here like this:
;; destination T means that the symbol is interned in the current package
(format-symbol t "~A-~A" :http-request name)
since alexandria is already a dependency I made a PR using format-symbol
https://github.com/fukamachi/dexador/pull/165