Commit 6f9f128d authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

1.104: add support for :around-compile

parent f8d720b1
......@@ -26,10 +26,23 @@
(: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?"
((or symbol cons)
(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)))))
,@(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))))
......@@ -2,7 +2,7 @@
(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."))
......@@ -10,18 +10,18 @@
((%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))
:key #'namestring)))
(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))
:key #'namestring)))
(defmethod module-components ((c grovel-handlers))
(if (slot-boundp c '%components)
......@@ -30,7 +30,15 @@
(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"))
......@@ -12,7 +12,6 @@ to the base of the system."
(pathname-directory system-base-dir)
:test #'equal)
(length (pathname-directory output-file))))))
(if (or *current-constituent*
(and (boundp '*old-macroexpand-hook*) *old-macroexpand-hook*))
......@@ -31,8 +31,8 @@
(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")
(error "ASDF-DEPENDENCY-GROVEL requires ASDF2.")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment