lisp-tips / lisp-tips

Common Lisp tips. Share !
116 stars 2 forks source link

Find out where ASDF searches for the system #27

Open svetlyak40wt opened 4 years ago

svetlyak40wt commented 4 years ago

If you having trouble because ASDF loads system from a wrong place, use this code:

(loop for searcher in asdf::*system-definition-search-functions*
      for found = (funcall searcher "qlot")
      do (format t "~2&~A:~A:~%  ~A~%"
                 (package-name (symbol-package searcher))
                 searcher
                 found))

It will output results like that:

ROSWELL.UTIL:ROSWELL-INSTALLABLE-SEARCHER:
  NIL

ASDF/PACKAGE-INFERRED-SYSTEM:SYSDEF-PACKAGE-INFERRED-SYSTEM-SEARCH:
  NIL

ASDF/SYSTEM-REGISTRY:SYSDEF-CENTRAL-REGISTRY-SEARCH:
  NIL

ASDF/SYSTEM-REGISTRY:SYSDEF-SOURCE-REGISTRY-SEARCH:
  NIL

QUICKLISP-CLIENT:LOCAL-PROJECTS-SEARCHER:
  NIL

QL-DIST:SYSTEM-DEFINITION-SEARCHER:
  /root/.roswell/lisp/quicklisp/dists/quicklisp/software/qlot-20190710-git/qlot.asd

ROSWELL.UTIL:LOCAL-PROJECTS-SEARCHER:
  /root/.roswell/local-projects/40ants/qlot/qlot.asd

Here we can see that I'm having the trouble because QL-DIST:SYSTEM-DEFINITION-SEARCHER was able to find qlot.asd before the ROSWELL.UTIL:LOCAL-PROJECTS-SEARCHER and ASDF uses the first result.