Output more info instead SB-PCL::NO-APPLICABLE-METHOD-ERROR when using custom quickdist source with wrong name
When you are using a distribution name different from the name in it's metadata, qlot returned this error:
Unhandled SB-PCL::NO-APPLICABLE-METHOD-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
{10004F84C3}>:
There is no applicable method for the generic function
#<STANDARD-GENERIC-FUNCTION QL-DIST:BASE-DIRECTORY (3)>
when called with arguments
(NIL).
See also:
The ANSI Standard, Section 7.6.6
Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10004F84C3}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<SB-PCL::NO-APPLICABLE-METHOD-ERROR {1004D471A3}> #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK SB-EXT:*INVOKE-DEBUGGER-HOOK* #<SB-PCL::NO-APPLICABLE-METHOD-ERROR {1004D471A3}>)
2: (INVOKE-DEBUGGER #<SB-PCL::NO-APPLICABLE-METHOD-ERROR {1004D471A3}>)
3: (ERROR SB-PCL::NO-APPLICABLE-METHOD-ERROR :GENERIC-FUNCTION #<STANDARD-GENERIC-FUNCTION QL-DIST:BASE-DIRECTORY (3)> :ARGS (NIL))
4: ((:METHOD NO-APPLICABLE-METHOD (T)) #<STANDARD-GENERIC-FUNCTION QL-DIST:BASE-DIRECTORY (3)> NIL) [fast-method]
5: (SB-PCL::CALL-NO-APPLICABLE-METHOD #<STANDARD-GENERIC-FUNCTION QL-DIST:BASE-DIRECTORY (3)> (NIL))
6: ((:METHOD QL-DIST:RELATIVE-TO (T T)) NIL "preference.txt") [fast-method]
7: ((:METHOD (SETF QL-DIST:PREFERENCE) (T T)) 3796788222 NIL) [fast-method]
8: (QLOT/INSTALL::APPLY-QLFILE-TO-QLHOME #P"/Users/art/projects/lisp/foo/qlfile" #P"/Users/art/projects/lisp/foo/.qlot/" :IGNORE-LOCK NIL :PROJECTS NIL)
9: (QLOT/INSTALL:INSTALL-QLFILE #P"/Users/art/projects/lisp/foo/qlfile" :QUICKLISP-HOME NIL :INSTALL-DEPS NIL)
10: (MAIN "install" "--no-deps")
To reproduce this issue, you might create a qlfile with this content:
dist borodust http://bodge.borodust.org/dist/org.borodust.bodge.txt
This fix makes error more explicit:
Unable to find dist with name "borodust". You should use one of these names in the qlfile: ("quicklisp" "org.borodust.bodge")
@fukamachi please, review this pull request.
Thank you.
This is caused by https://github.com/fukamachi/qlot/issues/107
@egao1980 I don't think so. The issue this pull tries to make more obvious, is different.
The underlying issue is that (dist ...) is doing (string-downcase ...) for dist name and (find-dist ...) isn't doing that. But error reporting is definitely an issue
Well, I need to fix the conflict now. To make it work.
Fixed conflicts.
@fukamachi please, review this pull.
BTW, why do we need to specify the dist name et all?
It can be extracted from the dist's metadata.
It would be much simple to write qlfilie like:
dist http://dist.ultralisp.org/
dist http://dist.ultralisp.org/svetlyak40wt/my-forks.txt
instead of:
dist ultralisp http://dist.ultralisp.org/
dist svetlyak40wt/my-forks http://dist.ultralisp.org/svetlyak40wt/my-forks.txt
because in the latter case you can make a mistake in the name and will get an error this pull tries to fix to.
Sorry for the delay. #192 will make the dist name optional as you proposed.
Great! Thank you!