How to tell asdf to use the directory of the .asd file as root directory of project

StackOverflow https://stackoverflow.com/questions/11014292

  •  14-06-2021
  •  | 
  •  

문제

I am trying to load my project using a self-made .asd file, but somehow asdf does not recognize that the .asd file should also be the root-directory of the project and therefore resuling in an error like failed to find the TRUENAME of /home/$USER/rel-path-to-file where rel-path-to-file is the path to the corresponding file, relative to the loaded .asd file.

This is what I did:

(push "path-to-project-directory-of-asd-file" asdf:*central-registry*)

then

(asdf:load-system 'project-name)

It DOES find my .asd file but somehow not the .lisp files it shall load.

The asdf has been configured and installed by quicklisp. Therefore I also "installed" the project into quicklisp using a symlink, this worked as well. It DOES find the .asd file using ql:quickload :name but still doesn't use the directory containing the .asd file as the project-root.

How can I fix this?

도움이 되었습니까?

해결책

Lisp pathnames are historically such that they require you to add a slash after directory name (I was told this is so due to the operating systems which were created before I was even born), so in order to tell Lisp that you target a directory you must end the name with the slash.

다른 팁

See asdf:system-relative-pathname.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top