fukamachi / .lem

Lem configuration files
29 stars 9 forks source link

System "lem-vi-sexp" not found #2

Closed altmoket closed 1 year ago

altmoket commented 1 year ago

Hi Eitaro I think that the common-lisp directory needs to be searchable by quicklisp before loading lem-vi-sexp. For example, on my system I get this error when I try to open lem:

System "lem-vi-sexp" not found
Backtrace for: #<SB-THREAD:THREAD "editor" RUNNING {100401DA73}>
0: ((LAMBDA NIL :IN UIOP/IMAGE:PRINT-BACKTRACE))
1: ((FLET "THUNK" :IN UIOP/STREAM:CALL-WITH-SAFE-IO-SYNTAX))
2: (SB-IMPL::%WITH-STANDARD-IO-SYNTAX #<FUNCTION (FLET "THUNK" :IN UIOP/STREAM:CALL-WITH-SAFE-IO-SYNTAX) {9EEE29B}>)
3: (UIOP/STREAM:CALL-WITH-SAFE-IO-SYNTAX #<FUNCTION (LAMBDA NIL :IN UIOP/IMAGE:PRINT-BACKTRACE) {1006541B5B}> :PACKAGE :CL)
4: (LEM-CORE:POP-UP-BACKTRACE #<QUICKLISP-CLIENT:SYSTEM-NOT-FOUND {1006540F73}>)
5: ((LAMBDA (CONDITION) :IN LEM-CORE::TOPLEVEL-COMMAND-LOOP) #<QUICKLISP-CLIENT:SYSTEM-NOT-FOUND {1006540F73}>)
6: (SB-KERNEL::%SIGNAL #<QUICKLISP-CLIENT:SYSTEM-NOT-FOUND {1006540F73}>)
7: (CERROR "Try again" QUICKLISP-CLIENT:SYSTEM-NOT-FOUND :NAME "lem-vi-sexp")
8: ((LABELS QUICKLISP-CLIENT::RECURSE :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) "lem-vi-sexp")
9: (QL-DIST::CALL-WITH-CONSISTENT-DISTS #<FUNCTION (LAMBDA NIL :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) {100653BB5B}>)
10: (QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY "lem-vi-sexp")
11: (QUICKLISP-CLIENT::AUTOLOAD-SYSTEM-AND-DEPENDENCIES "lem-vi-sexp" :PROMPT NIL)
12: (QUICKLISP-CLIENT::AUTOLOAD-SYSTEM-AND-DEPENDENCIES "lem-my-init" :PROMPT NIL)
13: ((:METHOD QL-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION (T T)) #<unused argument> #<FUNCTION (FLET QUICKLISP-CLIENT::QL :IN QUICKLISP-CLIENT:QUICKLOAD) {1004D2651B}>) [fast-method]
14: ((:METHOD QL-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION :AROUND (QL-IMPL:SBCL T)) #<QL-IMPL:SBCL {100172D383}> #<FUNCTION (FLET QUICKLISP-CLIENT::QL :IN QUICKLISP-CLIENT:QUICKLOAD) {1004D2651B}>) [fast-method]
15: ((:METHOD QUICKLISP-CLIENT:QUICKLOAD (T)) :LEM-MY-INIT :PROMPT NIL :SILENT NIL :VERBOSE NIL) [fast-method]
16: (QL-DIST::CALL-WITH-CONSISTENT-DISTS #<FUNCTION (LAMBDA NIL :IN QUICKLISP-CLIENT:QUICKLOAD) {1004D217EB}>)
17: ((LAMBDA NIL :IN "/Users/lnunez/.lem/init.lisp"))
18: (SB-INT:SIMPLE-EVAL-IN-LEXENV (LET ((ASDF/SYSTEM-REGISTRY:*CENTRAL-REGISTRY* (CONS #P"~/.lem/" ASDF/SYSTEM-REGISTRY:*CENTRAL-REGISTRY*))) (QUICKLISP-CLIENT:QUICKLOAD :LEM-MY-INIT)) #<NULL-LEXENV>)
19: (SB-EXT:EVAL-TLF (LET ((ASDF/SYSTEM-REGISTRY:*CENTRAL-REGISTRY* (CONS #P"~/.lem/" ASDF/SYSTEM-REGISTRY:*CENTRAL-REGISTRY*))) (QUICKLISP-CLIENT:QUICKLOAD :LEM-MY-INIT)) 3 NIL)
20: ((LABELS SB-FASL::EVAL-FORM :IN SB-INT:LOAD-AS-SOURCE) (LET ((ASDF/SYSTEM-REGISTRY:*CENTRAL-REGISTRY* (CONS #P"~/.lem/" ASDF/SYSTEM-REGISTRY:*CENTRAL-REGISTRY*))) (QUICKLISP-CLIENT:QUICKLOAD :LEM-MY-INIT)) 3)
21: ((LAMBDA (SB-KERNEL:FORM &KEY :CURRENT-INDEX &ALLOW-OTHER-KEYS) :IN SB-INT:LOAD-AS-SOURCE) (LET ((ASDF/SYSTEM-REGISTRY:*CENTRAL-REGISTRY* (CONS #P"~/.lem/" ASDF/SYSTEM-REGISTRY:*CENTRAL-REGISTRY*))) (QUICKLISP-CLIENT:QUICKLOAD :LEM-MY-INIT)) :CURRENT-INDEX 3)
22: (SB-C::%DO-FORMS-FROM-INFO #<FUNCTION (LAMBDA (SB-KERNEL:FORM &KEY :CURRENT-INDEX &ALLOW-OTHER-KEYS) :IN SB-INT:LOAD-AS-SOURCE) {1004CF3CFB}> #<SB-C::SOURCE-INFO {1004CD5513}> SB-C::INPUT-ERROR-IN-LOAD)
23: (SB-INT:LOAD-AS-SOURCE #<SB-INT:FORM-TRACKING-STREAM for "file /Users/lnunez/.lem/init.lisp" {1004CF2E03}> :VERBOSE NIL :PRINT NIL :CONTEXT "loading")
24: ((LABELS SB-FASL::LOAD-STREAM-1 :IN LOAD) #<SB-INT:FORM-TRACKING-STREAM for "file /Users/lnunez/.lem/init.lisp" {1004CF2E03}> NIL)
25: (SB-FASL::CALL-WITH-LOAD-BINDINGS #<FUNCTION (LABELS SB-FASL::LOAD-STREAM-1 :IN LOAD) {9EEF5FB}> #<SB-INT:FORM-TRACKING-STREAM for "file /Users/lnunez/.lem/init.lisp" {1004CF2E03}> NIL #<SB-INT:FORM-TRACKING-STREAM for "file /Users/lnunez/.lem/init.lisp" {1004CF2E03}>)
26: (LOAD #P"/Users/lnunez/.lem/init.lisp" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT)
27: ((FLET LEM-CORE::MAYBE-LOAD :IN LEM-CORE::LOAD-INIT-FILE) #P"/Users/lnunez/.lem/init.lisp")
28: (LEM-CORE::LOAD-INIT-FILE)
29: (LEM-CORE::INIT #S(LEM-CORE::COMMAND-LINE-ARGUMENTS :ARGS ((UIOP/PACKAGE:SYMBOL-CALL :LEM :FIND-FILE #P"/Users/lnunez/.lem/.")) :DEBUG NIL :LOG-FILENAME NIL :NO-INIT-FILE NIL))
30: (LEM-CORE::TOPLEVEL-COMMAND-LOOP #<FUNCTION (LAMBDA NIL :IN LEM-CORE::RUN-EDITOR-THREAD) {1004B5F1AB}>)
31: ((LAMBDA NIL :IN LEM-CORE::RUN-EDITOR-THREAD))
32: ((LAMBDA NIL :IN LEM-CORE::RUN-EDITOR-THREAD))
33: ((LABELS BORDEAUX-THREADS::%BINDING-DEFAULT-SPECIALS-WRAPPER :IN BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS))
34: ((FLET SB-UNIX::BODY :IN SB-THREAD::RUN))
35: ((FLET "WITHOUT-INTERRUPTS-BODY-173" :IN SB-THREAD::RUN))
36: ((FLET SB-UNIX::BODY :IN SB-THREAD::RUN))
37: ((FLET "WITHOUT-INTERRUPTS-BODY-166" :IN SB-THREAD::RUN))
38: (SB-THREAD::RUN)
39: ("foreign function: call_into_lisp_")
40: ("foreign function: funcall1")

I solve this problem on my machine by adding the following lines to ~/.lem/init.lisp:

(push #P"~/common-lisp/" ql:*local-project-directories*)
(ql:register-local-projects)

I'm happy with the vi mode. Thank you :-)

fukamachi commented 1 year ago

Hmm, that sounds weird to me, because ~/common-lisp is the default load path of ASDF, which resolves where to load libraries.

https://asdf.common-lisp.dev/asdf.html#Configuring-ASDF-to-find-your-systems

altmoket commented 1 year ago

Yes, I see, thanks. Do you know if when roswell is installed, roswell adds the common-lisp directory to the asdf:*central-registry*. I'm on a new machine, I didn't install sbcl, just roswell and right now when I run the next commands:

$ ros run
* asdf:*central-registry*

the output is (#P"/Users/lnunez/.roswell/lisp/quicklisp/quicklisp/")

fukamachi commented 1 year ago

It's not different whether it runs via Roswell or not. asdf:*central-registry* is a variable to add a directory programmatically.

My ASDF configurations are here.

$ ros run
* (asdf/source-registry:default-user-source-registry)
(:SOURCE-REGISTRY (:TREE (:HOME "common-lisp/"))
 (:DIRECTORY (:HOME ".sbcl/systems/"))
 (:DIRECTORY #P"/home/fukamachi/.local/share/common-lisp/systems/")
 (:TREE #P"/home/fukamachi/.local/share/common-lisp/source/")
 :INHERIT-CONFIGURATION)
* (ql:where-is-system :lem-vi-sexp)
#P"/home/fukamachi/common-lisp/lem-vi-sexp/"
fukamachi commented 1 year ago

@altmoket I encountered the same issue, and it found out that Lem's core uses the cached ASDF system registries, which were initialized when the core was created. You can clear it by asdf:clear-source-registry manually, or it will be resolved by creating the new image core by ros update lem.

altmoket commented 1 year ago

It works!!! Thank you. :)