Initialize the ASDF source registry with all projects in ~/dev/lisp/, excluding specific project directories (asdf/ and old/).
- In the source registry, :EXCLUDE overrides any previous exclusion. Really not the right name for what it does. Also see :ALSO-EXCLUDE.
- :EXCLUDE and :ALSO-EXCLUDE take "EXCLUSION-PATTERNS". Which are not patterns. They must be directory names, or they will never ever match anything.
- Due to how it's implemented, if you ignore "foo", you will ignore all "foo" subdirectories in any directory previous added. Just give me path globs!
- Finally, :EXCLUDE and :ALSO-EXCLUDE do not seem to do anything, COMPUTE-SOURCE-REGISTRY is always called with the default exclusion list even though PROCESS-SOURCE-REGISTRY processed the :EXCLUDE form.
source: https://gist.github.com/galdor/059db07a20748f3b86247387d2dcf8eb && https://framapiaf.org/@[email protected]/112542427965071262
(let* ((initialize-source-registry
(intern "INITIALIZE-SOURCE-REGISTRY" (find-package "ASDF")))
(project-root-directory
(merge-pathnames #p"dev/lisp/" (user-homedir-pathname)))
(blacklisted-directories
(mapcar (lambda (subpath)
(merge-pathnames subpath project-root-directory))
'(#p"asdf/"
#p"old/")))
(project-directories
(delete-if (lambda (path)
(member path blacklisted-directories :test #'equal))
(directory (make-pathname :defaults project-root-directory
:type :wild :name :wild)))))
(asdf:clear-source-registry)
(funcall initialize-source-registry
`(:source-registry
:ignore-inherited-configuration
,@(mapcar (lambda (path)
`(:tree ,path))
project-directories))))
Initialize the ASDF source registry with all projects in ~/dev/lisp/, excluding specific project directories (asdf/ and old/).
source: https://gist.github.com/galdor/059db07a20748f3b86247387d2dcf8eb && https://framapiaf.org/@[email protected]/112542427965071262