fredokun / cl-jupyter

An enhanced interactive Shell for Common Lisp (based on the Jupyter protocol)
BSD 2-Clause "Simplified" License
199 stars 29 forks source link

A few examples are failing #18

Closed peey closed 8 years ago

peey commented 8 years ago

For instance, this is one (and the only one from messages.lisp) error message:

While evaluating the form starting at line 5, column 0
  of #P"C:/Users/Peeyush/git-clones/cl-jupyter/./cl-jupyter.lisp":

debugger invoked on a SIMPLE-ERROR in thread
#<THREAD "main thread" RUNNING {23FF2421}>:
  Failed example:
  Expression: "(ENCODE-JSON-TO-STRING *HEADER1* INDENT 0)"
  ==> expected: {
  "msg_id": "XXX-YYY-ZZZ-TTT",
  "username": "fredokun",
  "session": "AAA-BBB-CCC-DDD",
  "msg_type": "execute_request",
  "version": "5.0"
}
  ==> evaluated: {
  "msg_id": "XXX-YYY-ZZZ-TTT",
  "username": "fredokun",
  "session": "AAA-BBB-CCC-DDD",
  "msg_type": "execute_request",
  "version": "5.0"
}

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [TRY-RECOMPILING              ] Recompile message and try loading it again
  1: [RETRY                        ] Retry
                                     loading FASL for #<CL-SOURCE-FILE "cl-jupyt
er" "message">.
  2: [ACCEPT                       ] Continue, treating
                                     loading FASL for #<CL-SOURCE-FILE "cl-jupyt
er" "message">
                                     as having been successful.
  3:                                 Retry ASDF operation.
  4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  5: [ABORT                        ] Give up on "cl-jupyter"
  6: [RETRY                        ] Retry EVAL of current toplevel form.
  7: [CONTINUE                     ] Ignore error and continue loading file "C:\
\Users\\Peeyush\\git-clones\\cl-jupyter\\.\\cl-jupyter.lisp".
  8:                                 Abort loading file "C:\\Users\\Peeyush\\git
-clones\\cl-jupyter\\.\\cl-jupyter.lisp".
  9:                                 Ignore runtime option --load "./cl-jupyter.
lisp".
 10:                                 Skip rest of --eval and --load options.
 11:                                 Skip to toplevel READ/EVAL/PRINT loop.
 12: [EXIT                         ] Exit SBCL (calling #'EXIT, killing the proc
ess).

(SB-FASL::LOAD-FASL-GROUP #S(SB-FASL::FASL-INPUT :STREAM #<SB-SYS:FD-STREAM for
"file C:\\Users\\Peeyush\\AppData\\Local\\common-lisp\\sbcl-1.2.16-win-x86\\C\\U
sers\\Peeyush\\git-clones\\cl-jupyter\\.\\src\\message.fasl" {25880A69}> :TABLE
#(385 SET *PACKAGE* "CL-JUPYTER" #<PACKAGE "CL-JUPYTER"> +KERNEL-PROTOCOL-VERSIO
N+ :STANDARD #<PACKAGE "SB-C"> SB-C::DELETED #(SB-C::DELETED) #(1 7 38 0 0 1 2 6
2 0 0) #() ...) :STACK #(0 FUNCALL #<FUNCTION ERROR> "Failed example:~%  Express
ion: ~S~%  ==> expected: ~A~%  ==> evaluated: ~A~%" "(ENCODE-JSON-TO-STRING *HEA
DER1* INDENT 0)" "{
  \"msg_id\": \"XXX-YYY-ZZZ-TTT\",
  \"username\": \"fredokun\",
  \"session\": \"AAA-BBB-CCC-DDD\",
  \"msg_type\": \"execute_request\",
  \"version\": \"5.0\"
}" "{
  \"msg_id\": \"XXX-YYY-ZZZ-TTT\",
  \"username\": \"fredokun\",
  \"session\": \"AAA-BBB-CCC-DDD\",
  \"msg_type\": \"execute_request\",
  \"version\": \"5.0\"
}" #(#S(SB-C::COMPILED-DEBUG-FUN :NAME (SB-C::TOP-LEVEL-FORM #) :KIND :TOPLEVEL
:VARS NIL :BLOCKS NIL :TLF-NUMBER 3 :FORM-NUMBER 1 :ARGUMENTS NIL :RETURNS :STAN
DARD :NFP NIL :START-PC 47 :ELSEWHERE-PC 132 :CLOSURE-SAVE NIL ...)) NIL "top le
vel form" #<SB-KERNEL:LAYOUT for SB-C::COMPILED-DEBUG-INFO {22345681}> 47 ...) :
DEPRECATED-STUFF NIL :SKIP-UNTIL NIL) NIL)

Similar to this, I've had to comment out quite a lot of examples from "myjson.lisp" file in order to get the "initialization done" message.

I'm using Windows 7/64bit if that might matter.

I'm including the list of examples that I commented out from "myjson.lisp" for the precompilation to run without errors:

; (example (with-input-from-string (s "this is a \\\"string\" and the rest")
;       (parse-json-string s))
;     => "this is a \"string")

; (example (with-input-from-string (s "this is a \\\"string with a \\n newline\" and the rest")
;           (parse-json-string s))
;          => "this is a \"string with a 
;  newline")

; (example (with-output-to-string (stream)
;      (let ((toto '(me toto)))
;        (json-write stream 2 t (format nil "blabla ~A" toto))))
;      => "    blabla (ME TOTO)
; ")

; (example 
;  (encode-json-to-string "help me \"man\"
; yeah !")
;  => "\"help me \\\"man\\\"\\nyeah !\"")

;(example
; (encode-json-to-string '(("name" . "frederic")
;             ("age" . 41)
;             ("geek" . :true)
;             ("socks" . :null)))
; => "{\"name\": \"frederic\",\"age\": 41,\"geek\": true,\"socks\": null}")

;(example
; (encode-json-to-string '(("name" . "frederic")
;             ("age" . 41)
;             ("geek" . :true)
;             ("socks" . :null)) :indent 0)
; => "{
;  \"name\": \"frederic\",
;  \"age\": 41,
;  \"geek\": true,
;  \"socks\": null
;}")
fredokun commented 8 years ago

Hi,

cl-jupyter is developed on a linux box, and occasionally I also try to run it on OSX (with ccl). Thus, I cannot really help for windows-specific problems. It's ok to comment out the examples (I use them as a form of auto-testing), but the fact that they fail should be seen as a deeper problem.

I would recommend trying out cl-jupyter inside a VM, at least for now.

peey commented 8 years ago

Closing since it's not an issue, it's an unsupported platform