fons / cl-mongo

lisp interface to mongo db
fons.github.com/cl-mongo
MIT License
143 stars 31 forks source link

Missing symbol exports #11

Closed mck- closed 12 years ago

mck- commented 12 years ago

There are some symbols not being exported, despite the fact that they are in packages.lisp

Most notably get-keys. The API doc counts 93 symbols vs 96 in packages.lisp .. I'm suspecting there might be 2 other symbols having an issue as well?

CL-USER> (ql:quickload 'cl-mongo)
To load "cl-mongo":
  Load 1 ASDF system:
    cl-mongo
; Loading "cl-mongo"
........
(CL-MONGO)
CL-USER> 
CL-MONGO> 
CL-MONGO> (get-keys "test")

; in: GET-KEYS "test"
;     (CL-MONGO::GET-KEYS "test")
; 
; caught STYLE-WARNING:
;   undefined function: GET-KEYS

Not sure what the cause is, I can't figure out the mystery.

fons commented 12 years ago

not sure what we're talking about here.. I did a quick grep on the source code and I didn't see get-keys ; I did see get-element though. Is it possible that you're looking at an older version of the code ?

mck- commented 12 years ago

It's on line 61 in document.lisp

fons commented 12 years ago

ok, I was not using the latest version of cl-mongo. However after synching I loaded cl-mongo. I did not use quicklisp (but I don't expect that should make a difference). Below is the transcript. I did notice that you're calling get-keys on a string. get-keys takes a document as input so that might be why the function call is marked as undefined....

(require :cl-mongo) WARNING: Invalid version "09-03-2011" for component "uuid" ("lisp-unit" "SB-ROTATE-BYTE" "IRONCLAD") CL-USER> (use-package :cl-mongo) T CL-USER> (defvar P (make-document )) P CL-USER> (add-element "key" "value" P)

: { elements : 1} CL-USER> (get-keys _P_) ("key") CL-USER>
mck- commented 12 years ago

thx for looking into this. I used a string as a placeholder, but the thing was that SLIME didn't find it either.

I tried it again on a different machine, and it works perfectly.. something must've gone wrong on my main machine, but yeah, the problem is on my side.. thanks!