Skip to content

Instantly share code, notes, and snippets.

@y2q-actionman
Last active April 8, 2021 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save y2q-actionman/8fe77e7b6b4f38ccfaac9cb02342dd1d to your computer and use it in GitHub Desktop.
Save y2q-actionman/8fe77e7b6b4f38ccfaac9cb02342dd1d to your computer and use it in GitHub Desktop.
Logical Pathname Translations の実験
(setf (logical-pathname-translations "asdf-cache")
`(("**;*.*.*"
,(merge-pathnames
(make-pathname :directory '(:relative :wild-inferiors))
asdf:*user-cache*))))
; => (("**;*.*.*" #P"/Users/yokota/.cache/common-lisp/acl-10.1s-macosx-x64/**/"))
(translate-logical-pathname "asdf-cache:bar;baz;mum.quux")
; => #P"/Users/yokota/.cache/common-lisp/acl-10.1s-macosx-x64/bar/baz/mum.quux"
;; ASDF のソースレジストリも translations に入れられたらと思ったが、asdf registory は複数指定可なので難しい
;; ASDF configuration を読み解いて translation のリストに展開して setf する感じが必要か。
;;
;; logical-pathname-translations の to-wildcard の方、関数にならないのかな・・
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment