diff --git a/grovel.lisp b/grovel.lisp index 799dc9e98377d712a27728bc286e1e73b803dbf8..6dca515e261a313f249a3fc71c9020b42a89a205 100644 --- a/grovel.lisp +++ b/grovel.lisp @@ -668,23 +668,26 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Constituent Support ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defmacro with-constituent-groveling (&body body) - `(let (;; Set up tables for tracking variables and constants. - (*suspected-variables* (make-hashset :test 'eql)) - (*suspected-constants* (make-hashset :test 'eql)) - ;; Initialize an fresh constituent environment. - (*constituent-table* (make-hash-table :test #'equal)) - (*current-constituent* (make-instance 'top-constituent)) - ;; Set up machinery for checking internal symbols. - (*previous-package* *package*) - (*previously-interned-symbols* - (let ((hashset (make-hashset :test 'eql))) - (do-symbols (sym *package*) - (hashset-add sym hashset)) - hashset)) - (*check-internal-symbols-p* t) - ;; Indicate that we are groveling. - (*features* (adjoin :groveling *features*))) - ,@body)) + `(call-with-constituent-groveling (lambda () ,@body))) + +(defun call-with-constituent-groveling (thunk) + (let (;; Set up tables for tracking variables and constants. + (*suspected-variables* (make-hashset :test 'eql)) + (*suspected-constants* (make-hashset :test 'eql)) + ;; Initialize an fresh constituent environment. + (*constituent-table* (make-hash-table :test #'equal)) + (*current-constituent* (make-instance 'top-constituent)) + ;; Set up machinery for checking internal symbols. + (*previous-package* *package*) + (*previously-interned-symbols* + (let ((hashset (make-hashset :test 'eql))) + (do-symbols (sym *package*) + (hashset-add sym hashset)) + hashset)) + (*check-internal-symbols-p* t) + ;; Indicate that we are groveling. + (*features* (adjoin :groveling *features*))) + (funcall thunk))) (defmacro operating-on-asdf-component-constituent ((component) &body body) "Used internally; not exported." diff --git a/package.lisp b/package.lisp index 2048454bd7f89d7304a0f5c05b7c99b9d59a0362..e0f936e4e5a7aa0d5aad2d5417f9668a17089e05 100644 --- a/package.lisp +++ b/package.lisp @@ -3,7 +3,7 @@ (cl:in-package :asdf) (defpackage #:asdf-dependency-grovel - (:use #:cl) + (:use #:cl #:asdf) (:export #:reload #:component-file #:dependency-op @@ -31,14 +31,14 @@ (in-package #:asdf-dependency-grovel) -(defparameter *asdf-dependency-grovel-version* "1.101") -(defparameter *asdf-version-required-by-adg* "1.702") +(defparameter *asdf-dependency-grovel-version* "1.102") +(defparameter *asdf-version-required-by-adg* "2.000") #-asdf2 (error "ASDF-DEPENDENCY-GROVEL requires ASDF2.") #+asdf2 (unless (asdf:version-satisfies (asdf:asdf-version) *asdf-version-required-by-adg*) - (error "POIU ~A requires ASDF ~A or later." + (error "ASDF-DEPENDENCY-GROVEL ~A requires ASDF ~A or later." *asdf-dependency-grovel-version* *asdf-version-required-by-adg*))