joaotavora / sly-stepper

sly-slepper
27 stars 5 forks source link

ABCL support #3

Closed Ambrevar closed 2 years ago

Ambrevar commented 2 years ago

If I include sly-stepper to the sly-contribs, then ABCL fails to start complaining that slynk-gray does not exist.

Indeed, from slynk-loader.lisp:

(defvar *slynk-files*
  `(slynk-backend ,@*sysdep-files* #-armedbear slynk-gray slynk-match slynk-rpc
                  slynk slynk-completion slynk-apropos))

and in slynk.asd:

   #-armedbear
   (:file "slynk-gray")

Maybe sly-stepper should be made a no-op for ABCL? Any other suggestion? @joaotavora

joaotavora commented 2 years ago

Hi Pierre,

No, your suggestion seems reasonable, if indeed gray-streams are unavailable for abcl. Strange, as they've such a common quasi-standard thing.

Ambrevar commented 2 years ago

They are available. However if I comment out the aforementioned snippets to enable them in Slynk, then starting ABCL in SLY yields this condition:

The value #<SLYNK-GRAY::SLY-INPUT-STREAM {1EE92AD}> is not of type STREAM.
   [Condition of type TYPE-ERROR]

Restarts:
 0: [*ABORT] Return to SLY's top level.
 1: [ABORT] Abort thread.

Backtrace:
 0: (INVOKE-DEBUGGER #<TYPE-ERROR {22A54B68}>)
 1: org.armedbear.lisp.Lisp.error(Lisp.java:382)
 2: org.armedbear.lisp.Lisp.type_error(Lisp.java:456)
 3: (MAKE-TWO-WAY-STREAM #<SLYNK-GRAY::SLY-INPUT-STREAM {1EE92AD}> #<SLYNK-GRAY::SLY-OUTPUT-STREAM {764887A3}>)
 4: (#<LOCAL-FUNCTION IN METHOD INITIALIZE-INSTANCE (AFTER) (LISTENER) {710F2C96}> #<SLYNK-MREPL::MREPL mrepl-1-1> :REMOTE-ID 1 :NAME "mrepl-remote-1" :OUT #<SLYNK-GRAY::SLY-OUTPUT-STREAM {764887A3}> :INI..
 5: (APPLY #<LOCAL-FUNCTION IN METHOD INITIALIZE-INSTANCE (AFTER) (LISTENER) {710F2C96}> (#<SLYNK-MREPL::MREPL mrepl-1-1> :REMOTE-ID 1 :NAME "mrepl-remote-1" :OUT ...))
 6: (#<LOCAL-FUNCTION IN STD-COMPUTE-EFFECTIVE-METHOD {3EB0A20E}> (#<SLYNK-MREPL::MREPL mrepl-1-1> :REMOTE-ID 1 :NAME "mrepl-remote-1" :OUT ...))
 7: (#<STANDARD-GENERIC-FUNCTION INITIALIZE-INSTANCE {6836DC5}> #<SLYNK-MREPL::MREPL mrepl-1-1> :REMOTE-ID 1 :NAME "mrepl-remote-1" :OUT #<SLYNK-GRAY::SLY-OUTPUT-STREAM {764887A3}> :INITIAL-ENV ((*PACKAGE..
 8: (APPLY #<STANDARD-GENERIC-FUNCTION INITIALIZE-INSTANCE {6836DC5}> #<SLYNK-MREPL::MREPL mrepl-1-1> (:REMOTE-ID 1 :NAME "mrepl-remote-1" :OUT #<SLYNK-GRAY::SLY-OUTPUT-STREAM {764887A3}> ...))
 9: (#<LOCAL-FUNCTION IN METHOD MAKE-INSTANCE NIL (STANDARD-CLASS) {36D352D2}> #<STANDARD-CLASS SLYNK-MREPL::MREPL {36B8017D}> :REMOTE-ID 1 :NAME "mrepl-remote-1" :OUT #<SLYNK-GRAY::SLY-OUTPUT-STREAM {764..
10: (APPLY #<LOCAL-FUNCTION IN METHOD MAKE-INSTANCE NIL (STANDARD-CLASS) {36D352D2}> (#<STANDARD-CLASS SLYNK-MREPL::MREPL {36B8017D}> :REMOTE-ID 1 :NAME "mrepl-remote-1" :OUT ...))
11: (#<STANDARD-GENERIC-FUNCTION MAKE-INSTANCE {52407430}> #<STANDARD-CLASS SLYNK-MREPL::MREPL {36B8017D}> :REMOTE-ID 1 :NAME "mrepl-remote-1" :OUT #<SLYNK-GRAY::SLY-OUTPUT-STREAM {764887A3}>)
12: (APPLY #<STANDARD-GENERIC-FUNCTION MAKE-INSTANCE {52407430}> #<STANDARD-CLASS SLYNK-MREPL::MREPL {36B8017D}> (:REMOTE-ID 1 :NAME "mrepl-remote-1" :OUT #<SLYNK-GRAY::SLY-OUTPUT-STREAM {764887A3}>))
13: (#<ANONYMOUS-FUNCTION clos_1257 (FROM clos.abcl) {37AF778A}> SLYNK-MREPL::MREPL :REMOTE-ID 1 :NAME "mrepl-remote-1" :OUT #<SLYNK-GRAY::SLY-OUTPUT-STREAM {764887A3}>)
14: (APPLY #<ANONYMOUS-FUNCTION clos_1257 (FROM clos.abcl) {37AF778A}> (SLYNK-MREPL::MREPL :REMOTE-ID 1 :NAME "mrepl-remote-1" :OUT ...))
15: (MAKE-INSTANCE SLYNK-MREPL::MREPL :REMOTE-ID 1 :NAME "mrepl-remote-1" :OUT #<SLYNK-GRAY::SLY-OUTPUT-STREAM {764887A3}>)
16: (SLYNK-MREPL:CREATE-MREPL 1)
17: (SYSTEM::%EVAL (SLYNK-MREPL:CREATE-MREPL 1))
18: (EVAL (SLYNK-MREPL:CREATE-MREPL 1))
19: (#<LOCAL-FUNCTION IN SLY-DB-LOOP {CB413A3}>)
20: (#<LOCAL-FUNCTION IN WRAP-IN-NAMED-READTABLE {205D9525}>)
21: (SLYNK:EVAL-FOR-EMACS (SLYNK-MREPL:CREATE-MREPL 1) NIL 4)
22: (APPLY #<function EVAL-FOR-EMACS {30E6C1}> ((SLYNK-MREPL:CREATE-MREPL 1) NIL 4))
23: (#<LOCAL-FUNCTION IN SPAWN-WORKER-THREAD {3AC1BBB9}>)
24: (SLYNK-BACKEND:CALL-WITH-DEBUGGER-HOOK #<function SLYNK-DEBUGGER-HOOK {68D1A27A}> #<LOCAL-FUNCTION IN SPAWN-WORKER-THREAD {3AC1BBB9}>)
25: (APPLY #<function CALL-WITH-DEBUGGER-HOOK {16CB53E9}> #<function SLYNK-DEBUGGER-HOOK {68D1A27A}> #<LOCAL-FUNCTION IN SPAWN-WORKER-THREAD {3AC1BBB9}> NIL)
26: (SLYNK-BACKEND:CALL-WITH-DEBUGGER-HOOK #<function SLYNK-DEBUGGER-HOOK {68D1A27A}> #<LOCAL-FUNCTION IN SPAWN-WORKER-THREAD {3AC1BBB9}>)
27: (#<LOCAL-FUNCTION IN SPAWN-WORKER-THREAD {761E884C}>)
28: (#<LOCAL-FUNCTION IN SPAWN-WORKER-THREAD {5A9BB427}>)
29: (SLYNK::CALL-WITH-BINDINGS NIL #<LOCAL-FUNCTION IN SPAWN-WORKER-THREAD {5A9BB427}>)
30: (#<LOCAL-FUNCTION IN SPAWN-WORKER-THREAD {21089BE2}>)
31: (#<LOCAL-FUNCTION IN G3960 {23562B67}>)
32: (THREADS::THREAD-FUNCTION-WRAPPER #<LOCAL-FUNCTION IN G3960 {23562B67}>)

Any idea?

joaotavora commented 2 years ago

Any idea?

No, sorry. I don't have ABCL installed.

They are available.

But evidently in non-compliant form. Note that the code that excludes them from Sly was inherited from SLIME, so this is probably a well known old problem.

Ambrevar commented 2 years ago

So back to the original suggestion: Make sly-stepper a no-op for ABCL? (Possibly with a warning.)

joaotavora commented 2 years ago

I suppose so, yes. Make a PR, please and thanks in a advance. It would be nice to investigate the gray-stream/ABCL issue though. lazy googling turns up 15-year old posts about people trying to make it work...

Ambrevar commented 2 years ago

See #4.

joaotavora commented 2 years ago

Closed by fdea8baf77c604571b1b9d9f0a286f3a4e745304

Uthar commented 1 year ago

This is because two way streams are broken on ABCL - true, since a very long time (2010, r12373 in svn)

See bug https://github.com/armedbear/abcl/issues/512