Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command dist add does not work if gh-dist system is not installed beforehand #586

Open
svetlyak40wt opened this issue May 11, 2024 · 2 comments

Comments

@svetlyak40wt
Copy link
Contributor

Environment

I'm using Roswell from release branch.

$ uname -a
Linux test-qlot 5.15.0-105-generic #115-Ubuntu SMP Mon Apr 15 09:52:04 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

$ ros --version    # if roswell runs successfully
roswell 22.12.14.113(eae6e5c)

$ ros config
setup.time=3923293827
sbcl-bin.version=2.4.3
default.lisp=sbcl-bin

We may assign explanatory tags to bad questions instead of replying to it.
See this famous text on how to ask good questions http://catb.org/~esr/faqs/smart-questions.html

How to reproduce the issue

ros dist add http://dist.ultralisp.org/

Expected behavior

Ultralisp distribution is installed and available

Actual result

Unhandled ASDF/FIND-COMPONENT:MISSING-COMPONENT in thread #<SB-THREAD:THREAD tid=4117 "main thread" RUNNING
                                                             {1001F50003}>:
  Component "gh-dist" not found

Backtrace for: #<SB-THREAD:THREAD tid=4117 "main thread" RUNNING {1001F50003}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK Component "gh-dist" not found #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK SB-EXT:*INVOKE-DEBUGGER-HOOK* Component "gh-dist" not found)
2: (INVOKE-DEBUGGER Component "gh-dist" not found)
3: (ERROR ASDF/FIND-COMPONENT:MISSING-COMPONENT :REQUIRES "gh-dist")
4: ((LAMBDA NIL :IN ASDF/SYSTEM:FIND-SYSTEM))
5: (ASDF/SESSION:CONSULT-ASDF-CACHE (ASDF/SYSTEM:FIND-SYSTEM "gh-dist") #<FUNCTION (LAMBDA NIL :IN ASDF/SYSTEM:FIND-SYSTEM) {100291097B}>)
6: (ASDF/SESSION:CALL-WITH-ASDF-SESSION #<FUNCTION (LAMBDA NIL :IN ASDF/SYSTEM:FIND-SYSTEM) {100291097B}> :OVERRIDE NIL :KEY (ASDF/SYSTEM:FIND-SYSTEM "gh-dist") :OVERRIDE-CACHE NIL :OVERRIDE-FORCING NIL)
7: (ROSWELL.DIST.ADD::ADD "add" "http://dist.ultralisp.org/")
8: (MAIN "add" "http://dist.ultralisp.org/")
9: (SB-INT:SIMPLE-EVAL-IN-LEXENV (APPLY (QUOTE MAIN) ROSWELL:*ARGV*) #<NULL-LEXENV>)
10: (SB-INT:SIMPLE-EVAL-IN-LEXENV (ROSWELL:QUIT (APPLY (QUOTE MAIN) ROSWELL:*ARGV*)) #<NULL-LEXENV>)
11: (SB-EXT:EVAL-TLF (ROSWELL:QUIT (APPLY (QUOTE MAIN) ROSWELL:*ARGV*)) NIL NIL)
12: ((LABELS SB-FASL::EVAL-FORM :IN SB-INT:LOAD-AS-SOURCE) (ROSWELL:QUIT (APPLY (QUOTE MAIN) ROSWELL:*ARGV*)) NIL)
13: (SB-INT:LOAD-AS-SOURCE #<CONCATENATED-STREAM :STREAMS NIL {10001ECDD3}> :VERBOSE NIL :PRINT NIL :CONTEXT "loading")
14: ((LABELS SB-FASL::LOAD-STREAM-1 :IN LOAD) #<CONCATENATED-STREAM :STREAMS NIL {10001ECDD3}> NIL)
15: (SB-FASL::CALL-WITH-LOAD-BINDINGS #<FUNCTION (LABELS SB-FASL::LOAD-STREAM-1 :IN LOAD) {7F7E40D475CB}> #<CONCATENATED-STREAM :STREAMS NIL {10001ECDD3}> NIL #<CONCATENATED-STREAM :STREAMS NIL {10001ECDD3}>)
16: (LOAD #<CONCATENATED-STREAM :STREAMS NIL {10001ECDD3}> :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT)
17: ((FLET ROSWELL::BODY :IN ROSWELL:SCRIPT) #<SB-SYS:FD-STREAM for "file /usr/local/etc/roswell/dist.ros" {10001EBAC3}>)
18: (ROSWELL:SCRIPT "/usr/local/etc/roswell/dist.ros" "add" "http://dist.ultralisp.org/")
19: (ROSWELL:RUN ((:EVAL "(ros:quicklisp)") (:SCRIPT "/usr/local/etc/roswell/dist.ros" "add" "http://dist.ultralisp.org/") (:QUIT NIL)))
20: (SB-INT:SIMPLE-EVAL-IN-LEXENV (ROSWELL:RUN (QUOTE ((:EVAL "(ros:quicklisp)") (:SCRIPT "/usr/local/etc/roswell/dist.ros" "add" "http://dist.ultralisp.org/") (:QUIT NIL)))) #<NULL-LEXENV>)
21: (EVAL (ROSWELL:RUN (QUOTE ((:EVAL "(ros:quicklisp)") (:SCRIPT "/usr/local/etc/roswell/dist.ros" "add" "http://dist.ultralisp.org/") (:QUIT NIL)))))
22: (SB-IMPL::PROCESS-EVAL/LOAD-OPTIONS ((:EVAL . "(progn #-ros.init(cl:load \"/usr/local/etc/roswell/init.lisp\"))") (:EVAL . "(ros:run '((:eval\"(ros:quicklisp)\")(:script \"/usr/local/etc/roswell/dist.ros\"\"add\"\"http://dist.ultralisp.org/\")(:quit ())))")))
23: (SB-IMPL::TOPLEVEL-INIT)
24: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
25: ((FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP))
26: (SB-IMPL::%START-LISP)

If I install gh-dist like this:

ros install roswell/gh-dist

then I've expected error will go away, but I still get the same error on dist add.

However gh-dist asdf system can be found when running lisp via ros run:

$ ros run --eval '(format t "~A~%" (asdf:find-system "gh-dist"))' --quit
WARNING: System definition file #P"/home/art/.roswell/local-projects/roswell/gh-dist/gh-dist.asd" contains definition for system "ql-dist". Please only define "gh-dist" and secondary systems with a name starting with "gh-dist/" (e.g. "gh-dist/test") in that file.
#<PACKAGE-INFERRED-SYSTEM "gh-dist">

Seems there are two problems:

  1. gh-pages should be installed before the Roswell core image compilation.
  2. (asdf:registered-system "gh-dist") or (asdf:find-system "gh-dist" nil)should be used instead of(asdf:find-system "gh-dist")` to return NIL instead of error if "gh-dist" is absent.
@snmsts
Copy link
Member

snmsts commented May 14, 2024

ros delete env roswell is a command to intentionally delete core for this kind of situation.
so

ros install roswell/gh-dist
ros delete env roswell
ros dist add http://dist.ultralisp.org/

work for me.

@svetlyak40wt
Copy link
Contributor Author

Even if it works for you, the command should not require gh-dist to be installed. Otherwise why does it check if gh-dist is installed and chooses another branch if it is not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants