fukamachi / lack

Lack, the core of Clack
MIT License
156 stars 33 forks source link

lack.test:request broken when using latest quri #68

Closed masatoi closed 1 year ago

masatoi commented 1 year ago

Hi.

I called the following expression and got an error.

(LACK.TEST:REQUEST "/ping" :METHOD :GET)

The function (COMMON-LISP:SETF QURI.URI:URI-SCHEME) is undefined.
   [Condition of type UNDEFINED-FUNCTION]

Restarts:
 0: [CONTINUE] Retry calling (SETF QURI.URI:URI-SCHEME).
 1: [USE-VALUE] Call specified function.
 2: [RETURN-VALUE] Return specified values.
 3: [RETURN-NOTHING] Return zero values.
 4: [RETRY] Retry SLIME interactive evaluation request.
 5: [*ABORT] Return to SLIME's top level.
 --more--

Backtrace:
  0: ("undefined function" "http" #<QURI.URI:URI //localhost:80/ping>)
  1: (LACK.TEST:REQUEST "/ping" :METHOD :GET :HEADERS (("content-type" . "application/json")) :CONTENT "[]")
  2: ((LAMBDA ()))
  3: (SB-INT:SIMPLE-EVAL-IN-LEXENV (TESTING-API (:GET "/ping") (RESPONSE) (OK (SUCCESSP RESPONSE)) (OK (ALIST-MATCH # #))) #<NULL-LEXENV>)
  4: (EVAL (TESTING-API (:GET "/ping") (RESPONSE) (OK (SUCCESSP RESPONSE)) (OK (ALIST-MATCH # #))))

It seems that the latest quri now forbids setf to uri-schema. https://github.com/fukamachi/quri/commit/efa3a23cc3fb4c871342e2ae094efeb78770da43