asdf-dependency-grovel tests mostly passing now

Robert Dodier robert.dodier at gmail.com
Tue Dec 20 18:27:37 UTC 2022


I've made still more progress on getting asdf-dependency-grovel
running. At this point most of the unit tests are successful; there
are only a couple of failed tests, both having to do with DEFTYPE.

Here's what I'm getting now. I am working on an ancient Ubuntu (14.04)
system. In the interest of clarity I've suppressed the SBCL banner.

$ sbcl --no-userinit --script tests/run-tests.lisp
This is SBCL 2.1.6, an implementation of ANSI Common Lisp.
[...]
WARNING: :SB-EVAL is no longer present in *FEATURES*
;;; TESTS failed:
;; u-deftype.satisfies should have: ("p-deftype"), has NIL
;; u-deftype.bar should have: ("p-deftype"), has NIL

The warning about :SB-EVAL is coming from loading ASDF.

The failed test cases are, respectively,

(in-package :asdf-dependency-grovel-test)
(deftype uses-satisfies ()
  `(satisfies satisfies-something))

and

(in-package :asdf-dependency-grovel-test)
(deftype uses-bar ()
  `(or (not bar)
       (and bar rational)))

while the corresponding provider is

(in-package :asdf-dependency-grovel-test)

(deftype foo () 'string)
(deftype bar () 'integer)
(defun satisfies-something (#1=#:a)
  (declare (ignore #1#))
  t)

I wonder why the appropriate dependency wasn't detected, but I'm not
too worried about it. ADG is still useful even if it misses these.

Here is the content of tests/run-tests.lisp, which I concocted after
tinkering a bit.

(load "/home/robert/by-others/asdf-3.1.5/build/asdf.lisp")
(push "/home/robert/by-others/asdf-dependency-grovel-master/"
asdf:*central-registry*)
(push "/home/robert/by-others/asdf-dependency-grovel-master/tests/"
asdf:*central-registry*)
(load "tests/grovel-tests.lisp")
(load "handlers/00-standard-handlers.lisp")
(asdf-dependency-grovel-tester:test-result)

There are various questionable aspects of that, which I'll point out,
although they don't really bother me too much -- I'm not responsible
for ADG.

(1) I was able to get ADG working only with this particular
combination of SBCL (2.1.6) and ASDF (3.1.5). There might be other
workable combinations, however, some or all later versions of ASDF
trigger errors in ADG.

(2) Use of ASDF:*CENTRAL-REGISTRY* is terrible. Okay, well, it works.

(3) It appears the handlers file is supposed to be loaded by ASDF,
which, I guess, is supposed to scan the handlers directory, but
something in that process didn't work, so it's loaded by hand.


ADG constructs a new .asd file from the inferred dependencies (and
writes it into the ASDF output cache -- maybe that could be mentioned
in a readme or something) and I present it here as a kind of trophy.

All the best,

Robert Dodier

PS. groveled-components.lisp:

;;; This file contains -*- lisp -*- expressions.
;;; AUTO-GENERATED file from system definition of system
(test-serial-system).  Instead of directly editing this file, please
edit the system definition and re-generate this file.
(
 ("test-serial-system" :components
  (
   (:file "package"
    :encoding :utf-8)
   (:file "p-defmacro"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "p-define-method-combination"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "p-feature"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "p-defvar"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "p-define-setf-expander"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "p-defsetf"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "p-defclass"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "p-defstruct"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "p-defgeneric"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "p-defmethod"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "p-define-condition"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "p-defpackage"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "p-defun"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "p-define-symbol-macro"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "p-defconstant"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "p-deftype"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "u-defmacro"
    :depends-on ("p-defmacro" "package")
    :encoding :utf-8)
   (:file "u-defmacro.indirect"
    :depends-on ("p-defmacro" "package")
    :encoding :utf-8)
   (:file "u-define-method-combination"
    :depends-on ("p-define-method-combination" "package")
    :encoding :utf-8)
   (:file "u-feature"
    :depends-on ("p-feature" "package")
    :encoding :utf-8)
   (:file "u-defvar"
    :depends-on ("p-defvar" "package")
    :encoding :utf-8)
   (:file "u-defvar.vector"
    :depends-on ("p-defvar" "package")
    :encoding :utf-8)
   (:file "u-defvar.setf"
    :depends-on ("p-defvar" "package")
    :encoding :utf-8)
   (:file "u-defvar.push"
    :depends-on ("p-defvar" "package")
    :encoding :utf-8)
   (:file "u-define-setf-expander"
    :depends-on ("p-define-setf-expander" "package")
    :encoding :utf-8)
   (:file "u-defsetf"
    :depends-on ("p-defsetf" "package")
    :encoding :utf-8)
   (:file "u-defclass.defclass"
    :depends-on ("p-defclass" "package")
    :encoding :utf-8)
   (:file "u-defclass.defmethod"
    :depends-on ("p-defclass" "package")
    :encoding :utf-8)
   (:file "u-defgeneric"
    :depends-on ("p-defgeneric" "package")
    :encoding :utf-8)
   (:file "u-defmethod"
    :depends-on ("p-defmethod" "package")
    :encoding :utf-8)
   (:file "u-define-condition"
    :depends-on ("p-define-condition" "package")
    :encoding :utf-8)
   (:file "u-defstruct"
    :depends-on ("p-defstruct" "package")
    :encoding :utf-8)
   (:file "u-defstruct.type"
    :depends-on ("p-defstruct" "package")
    :encoding :utf-8)
   (:file "u-defstruct.defmethod"
    :depends-on ("p-defstruct" "package")
    :encoding :utf-8)
   (:file "u-defstruct.functions"
    :depends-on ("p-defstruct" "package")
    :encoding :utf-8)
   (:file "u-defstruct.functions.sharpquote"
    :depends-on ("p-defstruct" "package")
    :encoding :utf-8)
   (:file "u-defstruct.include"
    :depends-on ("p-defstruct" "package")
    :encoding :utf-8)
   (:file "u-defpackage"
    :depends-on ("p-defpackage")
    :encoding :utf-8)
   (:file "u-defpackage.1"
    :depends-on ("p-defpackage")
    :encoding :utf-8)
   (:file "u-defpackage.2"
    :depends-on ("p-defpackage")
    :encoding :utf-8)
   (:file "u-defpackage.3"
    :depends-on ("p-defpackage")
    :encoding :utf-8)
   (:file "u-defun"
    :depends-on ("p-defun" "package")
    :encoding :utf-8)
   (:file "u-defun.sharpquote"
    :depends-on ("p-defun" "package")
    :encoding :utf-8)
   (:file "u-define-symbol-macro"
    :depends-on ("p-define-symbol-macro" "package")
    :encoding :utf-8)
   (:file "u-defconstant"
    :depends-on ("p-defconstant" "package")
    :encoding :utf-8)
   (:file "u-deftype.foo"
    :depends-on ("p-deftype" "package")
    :encoding :utf-8)
   (:file "u-deftype.bar"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "u-deftype.satisfies"
    :depends-on ("package")
    :encoding :utf-8)
   (:file "u-deftype.etypecase"
    :depends-on ("p-deftype" "package")
    :encoding :utf-8)
   (:file "u-deftype.typecase"
    :depends-on ("p-deftype" "package")
    :encoding :utf-8)))
)



More information about the asdf-devel mailing list