Commit cce6e8ae authored by Robert P. Goldman's avatar Robert P. Goldman

Check for use of obsolete "FEATURE" syntax in dependencies.

The dependency parser (used to put dependencies in canonical form), now
raises an error if obsolete FEATURE syntax is used. This should direct
programmers to an easy fix.

A test is also added.
parent 692fce8b
......@@ -141,6 +141,8 @@
(sysdef-error "Ill-formed feature dependency: ~s" dd))
(let ((embedded (parse-dependency-def (third dd))))
`(:feature ,(second dd) ,embedded)))
(sysdef-error "`feature' has been removed from the dependency spec language of ASDF. Use :feature instead in ~s." dd))
(unless (= (length dd) 2)
(sysdef-error "Ill-formed require dependency: ~s" dd))
......@@ -38,6 +38,9 @@
(:file "file4" :if-feature (:not :common-lisp))))))
(DBG "The weakly-depends-on information is properly cached")
(assert (equal '("file3-only") (system-weakly-depends-on (find-system "test-weakly-depends-on"))))
(assert (null (system-weakly-depends-on (find-system "test-no-weakly-depends-on"))))
......@@ -55,3 +58,18 @@
(assert (equalp
'((:version "test-asdf/2" "2.1") "file3-only" (:feature :foo (:require "blort")))
(system-depends-on (find-system :test-structured-depends))))
(DBG "Test removal of non-orthogonal feature syntax.")
(assert (typep
(catch 'error
(handler-bind ((system-definition-error
#'(lambda (e)
(throw 'error e))))
(def-test-system :test-structured-depends-with-obsolete-feature-syntax
:depends-on ((:version test-asdf/2 "2.1") :file3-only (feature :foo (:require "blort")))
((:file "file2" :depends-on ("foo"))
(:module "foo" :pathname ""
:components ((:file "file1")
(:file "file4" :if-feature (:not :common-lisp))))))))
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