hh-web
hh-web copied to clipboard
README quickstart fails on second step.
I was attempting to follow the quickstart described by the README in hh-web, using quicklisp and sbcl 1.2.13. I loaded hh-web, and created a project skeleton calling the form
(hh-web:make-skeleton :for :acme :in #P "~/SourceCode/lisp/webapps/acme/")
The path given is recursively searched for asdf systems by configuration in ~/.config/common-lisp/source-registry.conf.d/source.conf which contains:
(:tree "/home/fade/SourceCode/lisp/").
Okay, so hh-web is quickloaded correctly, and the make-skeleton form returns without condition. starting another sbcl in a fresh terminal, even after purging fasls compiling :acme results in the following backtrace:
Could not find tag library UI-THEME
.
[Condition of type HH-WEB::TAG-LIBRARY-NOT-FOUND-ERROR]
Restarts:
0: [TRY-RECOMPILING] Recompile templates and try loading it again
1: [RETRY] Retry loading FASL for #<CL-SOURCE-FILE "acme" "templates">.
2: [ACCEPT] Continue, treating loading FASL for #<CL-SOURCE-FILE "acme" "templates"> as having been successful.
3: [RETRY] Retry ASDF operation.
4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
5: [ABORT] Give up on "acme"
--more--
Backtrace:
0: (HH-WEB::IMPORT-TAG-LIBRARY :UI-THEME)
Locals:
SB-DEBUG::ARG-0 = :UI-THEME
1: (+TAG-LIBRARY :UI-THEME)
Locals:
SB-DEBUG::ARG-0 = :UI-THEME
2: (SB-INT:SIMPLE-EVAL-IN-LEXENV (+TAG-LIBRARY :UI-THEME) #<NULL-LEXENV>)
Locals:
SB-DEBUG::ARG-0 = (+TAG-LIBRARY :UI-THEME)
SB-DEBUG::ARG-1 = #<NULL-LEXENV>
3: (EVAL (+TAG-LIBRARY :UI-THEME))
Locals:
SB-DEBUG::ARG-0 = (+TAG-LIBRARY :UI-THEME)
4: ((:METHOD HH-WEB::READ-TAG-LIBRARY (STREAM)) #<SB-SYS:FD-STREAM for "file /home/fade/SourceCode/lisp/hh-web/taglibraries/doc.lisp" {101A81A0D3}>) [fast-method]
Locals:
SB-DEBUG::ARG-2 = #<SB-SYS:FD-STREAM for "file /home/fade/SourceCode/lisp/hh-web/taglibraries/doc.lisp" {101A81A0D3}>
5: ((:METHOD HH-WEB::LOAD-TAG-LIBRARY-FROM-PROVIDER (T HH-WEB::FOLDER-TAG-LIBRARY-PROVIDER)) :DOC #<HH-WEB::FOLDER-TAG-LIBRARY-PROVIDER {100FE6E353}>) [fast-method]
Locals:
SB-DEBUG::ARG-2 = :DOC
SB-DEBUG::ARG-3 = #<HH-WEB::FOLDER-TAG-LIBRARY-PROVIDER {100FE6E353}>
6: ((:METHOD HH-WEB::LOAD-TAG-LIBRARY (T)) :DOC (#<HH-WEB::FOLDER-TAG-LIBRARY-PROVIDER {100FE6E353}>)) [fast-method]
Locals:
*TAG-LIBRARY-PROVIDER-REGISTRY* = (#<HH-WEB::FOLDER-TAG-LIBRARY-PROVIDER {100FE6E353}>)
HH-WEB::LIBRARY-NAME = :DOC
7: ((:METHOD HH-WEB::LOAD-TAG-LIBRARY (T)) :DOC (#<HH-WEB::FOLDER-TAG-LIBRARY-PROVIDER {100FE6DD03}> #<HH-WEB::FOLDER-TAG-LIBRARY-PROVIDER {100FE6E353}>)) [fast-method]
Locals:
*TAG-LIBRARY-PROVIDER-REGISTRY* = (#<HH-WEB::FOLDER-TAG-LIBRARY-PROVIDER {100FE6DD03}> #<HH-WEB::FOLDER-TAG-LIBRARY-PROVIDER {100FE6E353}>)
HH-WEB::LIBRARY-NAME = :DOC
8: (HH-WEB::IMPORT-TAG-LIBRARY :DOC)
Locals:
SB-DEBUG::ARG-0 = :DOC
9: (+TAG-LIBRARY :DOC)
Locals:
SB-DEBUG::ARG-0 = :DOC
10: (SB-INT:SIMPLE-EVAL-IN-LEXENV (+TAG-LIBRARY :DOC) #<NULL-LEXENV>)
Locals:
SB-DEBUG::ARG-0 = (+TAG-LIBRARY :DOC)
SB-DEBUG::ARG-1 = #<NULL-LEXENV>
11: (EVAL (+TAG-LIBRARY :DOC))
Locals:
SB-DEBUG::ARG-0 = (+TAG-LIBRARY :DOC)
12: (HH-WEB::PROCESS-DIRECTIVE (+TAG-LIBRARY :DOC))
Locals:
SB-DEBUG::ARG-0 = (+TAG-LIBRARY :DOC)
13: ((:METHOD HH-WEB::READ-TEMPLATE-DEFINITION (STREAM PACKAGE LIST LIST)) #<SB-SYS:FD-STREAM for "file /home/fade/SourceCode/lisp/acme/templates/docs.lisp" {101A8113D3}> #<PACKAGE "G939"> (PACKAGE) NIL) ..
14: ((:METHOD HH-WEB::LOAD-TEMPLATE-FROM-PROVIDER (TEMPLATE T HH-WEB::ASDF-SYSTEM-PROVIDER)) #<TEMPLATE {101A80D1B3}> "docs.lisp" #<HH-WEB::ASDF-SYSTEM-PROVIDER {100FE6D233}>) [fast-method]
15: (HH-WEB::LOAD-TEMPLATE-DEFINITION #<TEMPLATE {101A80D1B3}> "docs.lisp" #<HH-WEB::TEMPLATE-PROVIDER-REGISTRY {100FE6D393}>)
16: (HH-WEB::LOAD-TEMPLATE-DEFINITION #<TEMPLATE {101A80D1B3}> "docs.lisp") [optional]
[...snip...]
I have tried this with both a checkout of the github master branch, as well as hh-web from quicklisp with the same result, which indicates to me that I'm dealing with possible PEBCAK, but I'd greatly appreciate any insight you could give.
Dang. I've updated my SBCL to 1.2.14 on Yosemite, but I am unable to reproduce. :(
My config has this in ~/.config/common-lisp/source-registry.conf.d/lisp.conf
:
(:tree (:home "lisp"))
All that's happening here is we're trying to find a tag-library, and we just search for 'taglibraries' folders inside the main directory of specific packages.
Here's something you can try, if you have a REPL handy:
(ql:quickload :acme)
(hh-web::folder-of (elt acme::*package-tag-library-provider-registry* 0))
You should see a path like this #P"/Users/phil/lisp/acme/taglibraries/"
that shows one of the locations where we're searching for tag libraries.
The way this works is hh-web creates a dynamic variable in your package (e.g., :acme) to contain the list of tag library providers. There is one provider for each package that has been registered as a provider, IIRC this comes from the create-web-server
call in the generated server.lisp
file. You probably have 2 providers, so you can try inspecting each element in that registry variable.
My suspicion is there is something about your environment that is interfering with hh-web's use of ASDF to find the directory where packages are installed, so that it can locate a "taglibraries" directory inside one of your packages (e.g., inside of :acme).
Thanks for trying hh-web! Sorry your experience wasn't positive, but happy to help when I can.