slburson / fset

FSet, the functional collections library for Common Lisp.
Other
194 stars 17 forks source link

fset not loading on SBCL 2.4.5 with quickload #51

Open peterlopen opened 3 months ago

peterlopen commented 3 months ago

hi,

when I try (ql:quickload "fset"):

COMPILE-FILE-ERROR while
compiling #<CL-SOURCE-FILE "fset" "Code" "port">
   [Condition of type UIOP/LISP-BUILD:COMPILE-FILE-ERROR]

Restarts:
 0: [RETRY] Retry compiling #<CL-SOURCE-FILE "fset" "Code" "port">.
 1: [ACCEPT] Continue, treating compiling #<CL-SOURCE-FILE "fset" "Code" "port"> as having been successful.
 2: [RETRY] Retry ASDF operation.
 3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
 4: [RETRY] Retry ASDF operation.
 5: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
 --more--

Backtrace:
  0: (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 "fset" "Code" "port">)))
  1: ((SB-PCL::EMF ASDF/ACTION:PERFORM) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:COMPILE-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "fset" "Code" "port">)
  2: ((LAMBDA NIL :IN ASDF/ACTION:CALL-WHILE-VISITING-ACTION))
  3: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)) #<ASDF/LISP-ACTION:COMPILE-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "fset" "Code" "port">) [fast-method]
  4: ((:METHOD ASDF/PLAN:PERFORM-PLAN (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {10015C39A3}>) [fast-method]
  5: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
  6: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {10015C39A3}>) [fast-method]
  7: ((:METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)) #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/SYSTEM:SYSTEM "fset"> :PLAN-CLASS NIL :PLAN-OPTIONS NIL) [fast-method]
  8: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/SYSTEM:SYSTEM "fset"> :VERBOSE NIL)
  9: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
 10: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) #<ASDF/LISP-ACTION:LOAD-OP > #<ASDF/SYSTEM:SYSTEM "fset"> :VERBOSE NIL) [fast-method]
 11: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> ASDF/LISP-ACTION:LOAD-OP "fset" :VERBOSE NIL)
 12: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
 13: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/LISP-ACTION:LOAD-OP "fset" :VERBOSE NIL) [fast-method]
 14: (ASDF/SESSION:CALL-WITH-ASDF-SESSION #<FUNCTION (LAMBDA NIL :IN ASDF/OPERATE:OPERATE) {10015BD6AB}> :OVERRIDE T :KEY NIL :OVERRIDE-CACHE T :OVERRIDE-FORCING NIL)
 15: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
 16: (ASDF/SESSION:CALL-WITH-ASDF-SESSION #<FUNCTION (LAMBDA NIL :IN ASDF/OPERATE:OPERATE) {100159FF8B}> :OVERRIDE NIL :KEY NIL :OVERRIDE-CACHE NIL :OVERRIDE-FORCING NIL)
 17: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/LISP-ACTION:LOAD-OP "fset" :VERBOSE NIL) [fast-method]
 18: (ASDF/OPERATE:LOAD-SYSTEM "fset" :VERBOSE NIL)
 19: (QUICKLISP-CLIENT::CALL-WITH-MACROEXPAND-PROGRESS #<FUNCTION (LAMBDA NIL :IN QUICKLISP-CLIENT::APPLY-LOAD-STRATEGY) {100159FE1B}>)
 --more--

looks like cause can be package locks:

; SLIME 2.28
CL-USER> (ql:quickload "fset")
To load "fset":
  Load 1 ASDF system:
    fset
; Loading "fset"
..
; 
; caught ERROR:
;   READ error during COMPILE-FILE:
;   
;     Lock on package SB-EXT violated when interning ONCE-ONLY while in package
;     FSET.
;   See also:
;     The SBCL Manual, Node "Package Locks"
;   
;     (in form starting at line: 364, column: 0, position: 11230)

when I unlock sb-ext, there is another error

any idea how to get fset to load?

thank you.

slburson commented 3 months ago

Already fixed in HEAD, but Quicklisp hasn't been updated yet. (I have informed Zach.)

Your choices are:

peterlopen commented 3 months ago

thank you!

slburson commented 3 months ago

Leaving this open in the hope that others who run into the problem will see it.

kilianmh commented 3 months ago

Alternatively, switching to alexandria:once-only might be useful so that users of older sbcl version can keep using the latest version of fset?

slburson commented 3 months ago

Alternatively, switching to alexandria:once-only might be useful so that users of older sbcl version can keep using the latest version of fset?

@kilianmh The symbol has been sb-int:once-only at least since 1.0.54 (dated 2011) and probably much longer. (I just fired up an old copy of 1.0.54 I have lying around, and checked.)

peterlopen commented 3 months ago

I tried version from github, not sure if I have some incompatible libraries in quicklisp, but now I am getting:

no symbol named "INDEX" in "GMAP"
   [Condition of type SB-KERNEL:SIMPLE-PACKAGE-ERROR]

Restarts:
 0: [CONTINUE] INTERN it.
 1: [RETRY] Retry compiling #<CL-SOURCE-FILE "fset" "Code" "defs">.
 2: [ACCEPT] Continue, treating compiling #<CL-SOURCE-FILE "fset" "Code" "defs"> as having been successful.
 3: [RETRY] Retry ASDF operation.
 4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
 5: [RETRY] Retry ASDF operation.
 --more--

Backtrace:
  0: (SB-IMPL::FIND-OR-MAKE-SYMBOL "INDEX" #<PACKAGE "GMAP">)
  1: (SB-IMPL::IMPORT-LIST-SYMBOLS (("GMAP" "GMAP" "ALIST" "CONSTANT" "INDEX" "INDEX-INC" ...)))
  2: ((FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK :IN SB-IMPL::%DEFPACKAGE))
  3: ((FLET "WITHOUT-INTERRUPTS-BODY-" :IN SB-THREAD::CALL-WITH-RECURSIVE-LOCK))

any idea how to resolve this?

slburson commented 3 months ago

Oh, right, you also need the latest version of Misc-Extensions. Sorry, I should have mentioned this.

peterlopen commented 3 months ago

tried that one:

CL-USER> (ql:where-is-system "misc-extensions")
#P"C:/Users/XXX/quicklisp/local-projects/misc-extensions/"
CL-USER> (ql-dist:all-dists)
(#<QL-DIST:DIST quicklisp 2023-10-21> #<QL-DIST:DIST ultralisp 20240618125502>)
CL-USER> (ql:quickload "misc-extensions")
To load "misc-extensions":
  Load 1 ASDF system:
    misc-extensions
; Loading "misc-extensions"
.

; file: C:/Users/XXX/quicklisp/local-projects/misc-extensions/src/gmap.lisp
; in: DEFINE-CONDITION KEYWORD-NAME-DEPRECATED
;     (FORMAT STREAM
;             #<(SIMPLE-ARRAY CHARACTER
;                (357)) def-gmap-~(~A~)-type ~S: the use of keyword names with gmap:def-gmap-~(~A~)-type~@

;              is deprecated.  Use a name in the package that defines the type you~@

;              wish to iterate over.  For ba... {1002203ABF}>
;             (GMAP::KIND CONDITION) (GMAP::NAME CONDITION) (GMAP::KIND CONDITION)
;             (IF (EQ (GMAP::KIND CONDITION) ':RES)
;                 "result"
;                 "arg"))
; 
; caught ERROR:
;   during macroexpansion of
;   (FORMATTER
;    "def-gmap-~(~A~)-type ~S: the use of keyword names with gmap:def-gmap-~(~A~)-type~@

;              is deprecated.  Use a name in the package that defines the type you~@

;              wish to iterate over.  For backward compatibility, the keyword name~@

;              will also be defined, but references to it are also deprecated; instead,~@

;              use `(:~A <type> ...)'.").
;   Use *BREAK-ON-SIGNALS* to intercept.
;   
;    error in FORMAT: Unknown directive (character: Return)
;     def-gmap-~(~A~)-type ~S: the use of keyword names with gmap:def-gmap-~(~A~)-type~@

;              is deprecated.  Use a name in the package that defines the type you~@

;              wish to iterate over.  For backward compatibility, the keyword name~@

;              will also be defined, but references to it are also deprecated; instead,~@

;              use `(:~A <type> ...)'.
;                                                                                       ^
......

still something wrong there. how to tell quicklisp to use ultralisp dist for systems? thank you

peterlopen commented 3 months ago

I am on windows, if that can matter

peterlopen commented 3 months ago

ok, when I put all that string to one line it got loaded.

but same problem with fset: it looks like this in emacs: image

i will tell git to use unix line endings, maybe that is cause.

peterlopen commented 3 months ago

yes, it were line endings again this time. thanks for help.