qlot icon indicating copy to clipboard operation
qlot copied to clipboard

Output more info instead SB-PCL::NO-APPLICABLE-METHOD-ERROR when using custom quickdist source with wrong name

Open svetlyak40wt opened this issue 6 years ago • 7 comments

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")

svetlyak40wt avatar Apr 25 '20 12:04 svetlyak40wt

@fukamachi please, review this pull request.

Thank you.

svetlyak40wt avatar May 24 '20 07:05 svetlyak40wt

This is caused by https://github.com/fukamachi/qlot/issues/107

egao1980 avatar Jun 22 '20 10:06 egao1980

@egao1980 I don't think so. The issue this pull tries to make more obvious, is different.

svetlyak40wt avatar Jun 22 '20 10:06 svetlyak40wt

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

egao1980 avatar Jun 22 '20 10:06 egao1980

Well, I need to fix the conflict now. To make it work.

svetlyak40wt avatar Jun 22 '20 10:06 svetlyak40wt

Fixed conflicts.

svetlyak40wt avatar Jun 22 '20 10:06 svetlyak40wt

@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.

svetlyak40wt avatar Jan 15 '21 18:01 svetlyak40wt

Sorry for the delay. #192 will make the dist name optional as you proposed.

fukamachi avatar Nov 22 '23 13:11 fukamachi

Great! Thank you!

svetlyak40wt avatar Nov 22 '23 15:11 svetlyak40wt