View Single Post
  #1 (permalink)  
Old 12-30-2007, 11:08 PM
lisp linux
Guest
 
Posts: n/a
Default clsql hunchentoot problem working together

Hi

I am having trouble figuring out where my problem is.
I have already spent more than a day trying to solve it myself.
(In this post 'server' refers to hunchentoot)

Each of the following cases were put in a lisp file,
loaded using C-c C-k .
Between each test run, I deleted all generated fasl and "*.so" files
and restarted emacs and slime (and hence sbcl).
This is on linux ( FC8 ) sbcl 1.0.10

Please please help either reproducing or solving
--------------------------------------------------------------
;Following works and starts the server
(eval-when (:compile-toplevel :load-toplevel :execute)
;(asdfperate 'asdf:load-op 'clsql)
(asdfperate 'asdf:load-op 'hunchentoot))

(defpackage :clsqlhunch)
(cl:in-package :clsqlhunch)

(cl:defvar *server* (hunchentoot:start-server ort 7777))

----------------------------------------------------
;Following compiles loads and gets to the repl prompt
;but the server does not seem to be up
(eval-when (:compile-toplevel :load-toplevel :execute)
(asdfperate 'asdf:load-op 'clsql)
(asdfperate 'asdf:load-op 'hunchentoot))

(defpackage :clsqlhunch)
(cl:in-package :clsqlhunch)

(cl:defvar *server* (hunchentoot:start-server ort 7777))
----------------------------------------------
;following gives the error
;-- SB-INT:SIMPLE-READER-PACKAGE-ERROR at 179 (line 8, column 45) on #<SB-SYS:FD-STREAM for "file
;/home/antony/temp/problem.lisp" {1005CAD601}>:
; package "HUNCHENTOOT" not found
(asdfperate 'asdf:load-op 'clsql)
(asdfperate 'asdf:load-op 'hunchentoot)

(defpackage :clsqlhunch)
(cl:in-package :clsqlhunch)

(cl:defvar *server* (hunchentoot:start-server ort 7777))
------------------------------------------------
;following gets me to repl prompt

(asdfperate 'asdf:load-op 'clsql)
(asdfperate 'asdf:load-op 'hunchentoot)

(defpackage :clsqlhunch)
(cl:in-package :clsqlhunch)

;(cl:defvar *server* (hunchentoot:start-server ort 7777))

;at the repl typing
(cl:in-package :clsqlhunch)
(cl:defvar *server* (hunchentoot:start-server ort 7777))
;start server ok
---------------------------------------------------------

Basically the problem seems to be -
"I can't figure out what incantation is needed to have the start server code within a lisp file when
both clsql and hunchentoot are 'require'd "

The actual code tries to use asdf, but I'd like understand the basics behind why I *can* start the
http server reliably on repl, but not by loading a lisp file even though it does seem to do that
just fine when clsql is not loaded.

FWIW I am a CL newbee.

-Antony
Reply With Quote