joaotavora / sly

Sylvester the Cat's Common Lisp IDE
1.27k stars 145 forks source link

SBCL HEAD breaks Sly #388

Closed mfiano closed 3 years ago

mfiano commented 3 years ago

Sly does not work with recent SBCL commits. I'm sorry I can't give anymore information, as the SBCL author is being intentionally vague.

I can show you the last bit of the inferior lisp messages:

; processing (DEFIMPLEMENTATION PROFILE-REPORT ...)
; processing (DEFIMPLEMENTATION PROFILE-RESET ...)
; processing (DEFIMPLEMENTATION PROFILED-FUNCTIONS ...)
; processing (DEFIMPLEMENTATION PROFILE-PACKAGE ...)
; processing (DEFMETHOD EMACS-INSPECT ...)
; processing (DEFMETHOD EMACS-INSPECT ...); 
; caught ERROR:
;   READ error during COMPILE-FILE:
;   
;     Symbol "%CODE-ENTRY-POINTS" not found in the SB-KERNEL package.
;   
;       Line: 1606, Column: 48, File-Position: 64699
;   
;       Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/mfiano/.emacs.d/.local/straight/repos/sly/slynk/backend/sbcl.lisp" {10114EC2C3}>

; compilation aborted after 0:00:00.283

debugger invoked on a UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread
#<THREAD "main thread" RUNNING {101A930823}>:
  COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "slynk" "backend" "sbcl">

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

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY                        ] Retry
                                     compiling #<CL-SOURCE-FILE "slynk" "backend" "sbcl">.
  1: [ACCEPT                       ] Continue, treating
                                     compiling #<CL-SOURCE-FILE "slynk" "backend" "sbcl">
                                     as having been successful.
  2:                                 Retry ASDF operation.
  3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  4:                                 Retry ASDF operation.
  5:                                 Retry ASDF operation after resetting the
                                     configuration.
  6: [ABORT                        ] Exit debugger, returning to top level.

(UIOP/LISP-BUILD:CHECK-LISP-COMPILE-RESULTS NIL T T "~/asdf-action::format-action/" ((#<ASDF/LISP-ACTION:COMPILE-OP > . #<ASDF/LISP-ACTION:CL-SOURCE-FILE "slynk" "backend" "sbcl">)))
   source: (ERROR 'COMPILE-FILE-ERROR :CONTEXT-FORMAT CONTEXT-FORMAT
                  :CONTEXT-ARGUMENTS CONTEXT-ARGUMENTS)

and a log of our discussion on IRC:

mdbergmann commented 3 years ago

I'm tired of code getting broken.

So I'm wondering why this happens. Either Sly/Slime uses some private API or he just changed public API and is wondering why things break

joaotavora commented 3 years ago

Either Sly/Slime uses some private API or he just changed public API and is wondering why things break

@mdbergmann likely one has to cherry-pick some recent SLIME commit into SLY. It's usually very easy. You've done it very recently, you can do it again! :-)

Should be one of: https://github.com/slime/slime/commit/53badd278bf5ac36922d7b417f44e1c21e724547 or maybe https://github.com/slime/slime/commit/96d1b6680cc3006f385db32dd98eb14762f2d879

EDIT: probably both.

If you do it, do it as a separate PR, please. This one has priority over the Clasp other one.

Anyway, if you don't manage, I'll fix it later on. You can also use a bit older SBCL for a while, right?

the SBCL author is being intentionally vague.

Ahhh, right, but but also leave @stassats be, He's bound by the terrible break-apis-but-speak-in-one-liners curse :-). And maybe he didn't break the API himsrelf, or maybe it wasn't an API. :-) Also he has a point in the sense that it would be useful to get more people looking at this nitty-gritty instead of funnelling down to less than a handful people.

mfiano commented 3 years ago

I have a fix. I'll make a PR

joaotavora commented 3 years ago

That's great. Thanks. If the fix is in terms of code copied over from SLIME, better cherry-pick the commits like @mdbergmann recently did for #386 or, alternatively, very clearly mark in the commit message they they are functionally equivalent to some number of SLIME commits.

mfiano commented 3 years ago

Oops too late. Feel free to change the commit message if you decide to merge.

mfiano commented 3 years ago

To be honest, I need SBCL HEAD. Stassats has been fixing showstopper bugs for my current project that I've been reporting. :)

joaotavora commented 3 years ago

Oops too late. Feel free to change the commit message if you decide to merge.

Or you can change the PR :-) so I can just click a big green button. I'm sorry to request this bookkeeping, but it keeps me sane when tracking SLIME's code, which in the end is a win for all, I think.

mfiano commented 3 years ago

Done

mdbergmann commented 3 years ago

Excellent. I had done it. But this is good as well.

joaotavora commented 3 years ago

Sorry, but that's just wrong. Those commits don't even apply to SLY, I'm sorry to have misled you. The commit you need to cherry-pick -x is this, apparently.

commit 840e013d449a9b14e77a659291a44b746a4f1601
Author: Douglas Katzman <dougk@google.com>
Date:   Sat May 30 12:29:11 2020 -0400

    Remove use of compatibility accessors

    Shouldn't have been used since 3 years ago
    (https://sourceforge.net/p/sbcl/sbcl/ci/143bba48aa)
mfiano commented 3 years ago

Oh, stassats said this is a very recent issue. He even mentioned this may be an issue before I actually encountered the crash, since it is only 2 days old. So I don't know what that one is for

mfiano commented 3 years ago

All I can confirm is that the PR fixes it for me and I can continue my work :)

joaotavora commented 3 years ago

I've updated SLY to the relevant commits in SLIME's version 2.26, which should fix this. Again, I can confirm the commit that needed to be cherry-pick is SLIME's 840e013d449a9b14e77a659291a44b746a4f1601, which is now SLY's 1346967.

Please try out the https://github.com/joaotavora/sly/tree/ongoing-slime-catchup branch when you can.

mfiano commented 3 years ago

Sorry, but this does not address the issue with very recent SBCL builds, and is why SLIME needed to be patched recently. The changes in #389 are the ones the SBCL/SLIME maintainer applied which have been verified as working for Sly also. Without this patch, Sly cannot start up and the error message in the inferior-lisp buffer is:

; caught ERROR:
;   READ error during COMPILE-FILE:
;   
;     Symbol "%CODE-ENTRY-POINTS" not found in the SB-KERNEL package.
;   
;       Line: 1606, Column: 48, File-Position: 64699
;   
;       Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/mfiano/.emacs.d/.local/straight/repos/sly/slynk/backend/sbcl.lisp" {1010C9D5E3}>

; compilation aborted after 0:00:00.296

debugger invoked on a UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread
#<THREAD "main thread" RUNNING {1001560103}>:
  COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "slynk" "backend" "sbcl">

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

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY                        ] Retry
                                     compiling #<CL-SOURCE-FILE "slynk" "backend" "sbcl">.
  1: [ACCEPT                       ] Continue, treating
                                     compiling #<CL-SOURCE-FILE "slynk" "backend" "sbcl">
                                     as having been successful.
  2:                                 Retry ASDF operation.
  3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
                                     configuration.
  4:                                 Retry ASDF operation.
  5:                                 Retry ASDF operation after resetting the
                                     configuration.
  6: [ABORT                        ] Exit debugger, returning to top level.

(UIOP/LISP-BUILD:CHECK-LISP-COMPILE-RESULTS NIL T T "~/asdf-action::format-action/" ((#<ASDF/LISP-ACTION:COMPILE-OP > . #<ASDF/LISP-ACTION:CL-SOURCE-FILE "slynk" "backend" "sbcl">)))
   source: (ERROR 'COMPILE-FILE-ERROR :CONTEXT-FORMAT CONTEXT-FORMAT
                  :CONTEXT-ARGUMENTS CONTEXT-ARGUMENTS)
mfiano commented 3 years ago

Ignore the above. This was another pebcak of my own doing and there is no issue anymore. Thanks.