Package variance warning on SBCL
Gábor Melis
mega at retes.hu
Wed Jun 14 16:12:10 UTC 2023
This fixed the most glaring issue on SBCL, but annoyingly it still
prints a lot of redefinition warnings, and on AllegroCL loading the
swank asdf system under Slime ends up in the debugger:
No methods applicable for generic function
#<STANDARD-GENERIC-FUNCTION SWANK/BACKEND:MESSAGE> with args
(#<SWANK/BACKEND:COMPILER-CONDITION @ #x20ec692a>) of classes
(SWANK/BACKEND:COMPILER-CONDITION)
[Condition of type PROGRAM-ERROR]
Restarts:
0: [CONTINUE] Try calling it again
1: [RETRY] retry the load of
/home/melisgl/.cache/common-lisp/acl-10.1-linux-x86/home/melisgl/src/slime/swank/backend.fasl
2: [SKIP] skip loading
/home/melisgl/.cache/common-lisp/acl-10.1-linux-x86/home/melisgl/src/slime/swank/backend.fasl
3: [TRY-RECOMPILING] Recompile backend and try loading it again
4: [RETRY] Retry loading FASL for #<CL-SOURCE-FILE "swank" "backend"
"backend">.
5: [ACCEPT] Continue, treating loading FASL for #<CL-SOURCE-FILE
"swank" "backend" "backend"> as having been successful.
--more--
Backtrace:
0: (CERROR "Try calling it again" PROGRAM-ERROR :FORMAT-CONTROL "No
methods applicable for generic function ~s with args ~s of classes ~s"
:FORMAT-ARGUMENTS ...)
1: ((METHOD NO-APPLICABLE-METHOD (T)) #<STANDARD-GENERIC-FUNCTION
SWANK/BACKEND:MESSAGE> #<SWANK/BACKEND:COMPILER-CONDITION @
#x20ec692a>)
2: ((FLET #:ENSURE-GENERIC-FUNCTION-USING-CLASS--NULL
EXCL::INITIAL-CHEAP-SELECT-FUNCTION) #<STANDARD-GENERIC-FUNCTION
SWANK/BACKEND:MESSAGE> #<SWANK/BACKEND:COMPILER-CONDITION @
#x20ec692a>)
3: (SWANK::MAKE-COMPILER-NOTE #<SWANK/BACKEND:COMPILER-CONDITION @
#x20d809a2>)
4: ((:INTERNAL SWANK::COLLECT-NOTES 0)
#<SWANK/BACKEND:COMPILER-CONDITION @ #x20d809a2>)
5: (SIGNAL SWANK/BACKEND:COMPILER-CONDITION :ORIGINAL-CONDITION
#<SIMPLE-WARNING @ #x20d80c8a> :SEVERITY :WARNING ...)
6: (SWANK/ALLEGRO::SIGNAL-COMPILER-CONDITION :ORIGINAL-CONDITION
#<SIMPLE-WARNING @ #x20f46cc2> :SEVERITY :WARNING :MESSAGE ...)
7: (SWANK/ALLEGRO::HANDLE-COMPILER-WARNING #<SIMPLE-WARNING @ #x20f46cc2>)
8: (SIGNAL #<SIMPLE-WARNING @ #x20f46cc2>)
9: (WARN "~\n~S, ~S was defined in ~A and is now being defined in
~A" (METHOD SWANK/BACKEND:ORIGINAL-CONDITION
(SWANK/BACKEND:COMPILER-CONDITION)) :OPERATOR ..)
10: ((METHOD SHARED-INITIALIZE :AFTER (EXCL::STD-CLASS T))
#<STANDARD-CLASS SWANK/BACKEND:COMPILER-CONDITION> NIL
:DIRECT-SUPERCLASSES (#<STANDARD-CLASS CONDITION>) :DIRECT-SLOTS ...)
11: ((:INTERNAL (:EFFECTIVE-METHOD 2 T NIL NIL NIL) 0)
#<STANDARD-CLASS SWANK/BACKEND:COMPILER-CONDITION> NIL :DIRECT-SLOTS
..)
12: ((METHOD REINITIALIZE-INSTANCE (STANDARD-OBJECT))
#<STANDARD-CLASS SWANK/BACKEND:COMPILER-CONDITION> :DIRECT-SLOTS ..)
13: ((:INTERNAL (:EFFECTIVE-METHOD 1 T NIL NIL NIL) 0)
#<STANDARD-CLASS SWANK/BACKEND:COMPILER-CONDITION> :DIRECT-SLOTS ..)
14: ((METHOD ACLMOP:ENSURE-CLASS-USING-CLASS (EXCL::CLOS-CLASS T))
#<STANDARD-CLASS SWANK/BACKEND:COMPILER-CONDITION>
SWANK/BACKEND:COMPILER-CONDITION :DIRECT-SUPERCLASSES (CONDITION)
:DIRECT-SLOTS ...)
15: (ACLMOP:ENSURE-CLASS SWANK/BACKEND:COMPILER-CONDITION)
16: ((:TOP-LEVEL-FORM "/home/melisgl/src/slime/swank/backend.lisp" 20716))
17: (LOAD #P"/home/melisgl/.cache/common-lisp/acl-10.1-linux-x86/home/melisgl/src/slime/swank/backend.fasl")
18: ((:INTERNAL UIOP/LISP-BUILD:LOAD* 0))
19: (UIOP/UTILITY:CALL-WITH-MUFFLED-CONDITIONS #<Closure (:INTERNAL
UIOP/LISP-BUILD:LOAD* 0) @ #x20d40dd2> ("Overwriting already existing
readtable ~S." #(#:FINALIZERS-OFF-WARNING :ASDF-FINALIZERS)))
20: (UIOP/LISP-BUILD:CALL-WITH-MUFFLED-LOADER-CONDITIONS #<Closure
(:INTERNAL UIOP/LISP-BUILD:LOAD* 0) @ #x20d40dd2>)
21: (UIOP/LISP-BUILD:LOAD*
#P"/home/melisgl/.cache/common-lisp/acl-10.1-linux-x86/home/melisgl/src/slime/swank/backend.fasl")
22: (ASDF/LISP-ACTION:PERFORM-LISP-LOAD-FASL
#<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "swank"
"backend" "backend">)
23: ((METHOD ASDF/ACTION:PERFORM (ASDF/LISP-ACTION:LOAD-OP
ASDF/LISP-ACTION:CL-SOURCE-FILE)) #<ASDF/LISP-ACTION:LOAD-OP >
#<ASDF/LISP-ACTION:CL-SOURCE-FILE "swank" "backend" "backend">)
24: ((:INTERNAL (:EFFECTIVE-METHOD 2 NIL NIL NIL NIL) 0)
#<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "swank"
"backend" "backend">)
25: ((METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS (T T))
#<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "swank"
"backend" "backend">)
26: ((METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS
(ASDF/LISP-ACTION:LOAD-OP ASDF/LISP-ACTION:CL-SOURCE-FILE))
#<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "swank"
"backend" "backend">)
27: ((METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T))
#<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "swank"
"backend" "backend">)
28: ((:INTERNAL (:EFFECTIVE-METHOD 2 NIL NIL T T) 0)
#<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "swank"
"backend" "backend">)
On Tue, 13 Jun 2023 at 14:27, Gábor Melis <mega at retes.hu> wrote:
>
> Hello
>
> I made a merge request (https://github.com/slime/slime/pull/776) after
> commit dd179f4a changed the behaviour of loading the swank asdf system
> when swank has been loaded by swank-loader already. With dd179f4a,
> loading the asdf system proceeds and produces lots of redefinition
> warnings and also package variance warnings on SBCL. The latter made
> asdf:load-system fail when run under Slime.
>
> I believe this fix is necessary to compile stuff that depends on swank
> via ASDF. Please consider merging it.
>
> Cheers,
> Gábor
More information about the slime-devel
mailing list