()
(:default-initargs :default-component-class 'instrumented-cl-source-file))
+(defun escaped-around-compile-hook (component)
+ (let ((around-compile (asdf::around-compile-hook component)))
+ (etypecase around-compile
+ ((or null string) around-compile)
+ (function (error "Can't convert around-compile hook ~S because it's a function object.~%Maybe you should use a lambda-expression instead?"
+ around-compile))
+ ((or symbol cons)
+ (with-standard-io-syntax
+ (let ((*package* (find-package :cl)))
+ (write-to-string around-compile :readably t)))))))
+
(defmethod additional-initargs :around ((comp instrumented-component))
(flet ((slot-when-bound (slot-name initarg)
(when (slot-boundp comp slot-name)
`(,initarg ,(slot-value comp slot-name)))))
`(,@(call-next-method)
+ ,@(when (asdf::around-compile-hook comp)
+ `(:around-compile (escaped-around-compile comp)))
,@(slot-when-bound 'translated-name :translated-name)
,@(slot-when-bound 'translated-pathname :translated-pathname-form))))
(cl:in-package :asdf)
-(unless (or #+asdf2 (asdf:version-satisfies (asdf:asdf-version) "2.014.8"))
+(unless (or #+asdf2 (version-satisfies (asdf-version) "2.014.8"))
(error "Not only is your ASDF version is too old for ASDF-DEPENDENCY-GROVEL,
you must upgrade it *before* you try to load any system."))
((%components :accessor %handler-components)))
(defun handler-input-file-list (pathname parent)
- (map 'list
- (lambda (f)
- (make-instance 'cl-source-file
- :name (pathname-name f)
- :parent parent
- :pathname f))
- (sort (directory (make-pathname :defaults pathname
- :name :wild
- :type "lisp"
- :version :newest))
- #'string<
- :key #'namestring)))
+ (mapcar
+ (lambda (f)
+ (make-instance 'cl-source-file
+ :name (pathname-name f)
+ :parent parent
+ :pathname f))
+ (sort (directory (make-pathname :defaults pathname
+ :name :wild
+ :type "lisp"
+ :version :newest))
+ #'string<
+ :key #'namestring)))
(defmethod module-components ((c grovel-handlers))
(if (slot-boundp c '%components)
(handler-input-file-list (component-pathname c) c))))
(defsystem :asdf-dependency-grovel
- :depends-on ((:version :asdf "2.017"))
+ :description "Analyse the dependencies in an ASDF system"
+ :long-description "ASDF-DEPENDENCY-GROVEL will analyse the actual dependencies in an ASDF system.
+Based on an analysis with file granularity ,
+it can output an optimized system definition,
+based on which compilation can be parallelized.
+Based on an analysis with form granularity,
+it can output a summary from which you can untangle
+the circularities in your build."
+ :depends-on ((:version :asdf "2.018.12")) ;; for full :around-compile support
:components ((:file "package")
(:file "variables" :depends-on ("package"))
(:file "classes" :depends-on ("package" "variables"))
(in-package #:asdf-dependency-grovel)
-(defparameter *asdf-dependency-grovel-version* "1.103")
-(defparameter *asdf-version-required-by-adg* "2.008")
+(defparameter *asdf-dependency-grovel-version* "1.104")
+(defparameter *asdf-version-required-by-adg* "2.018.12")
#-asdf2
(error "ASDF-DEPENDENCY-GROVEL requires ASDF2.")