Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
asdf
asdf
Commits
c3cb58db
Commit
c3cb58db
authored
Mar 29, 2013
by
Francois-Rene Rideau
Browse files
2.32.35: also catch non-system-system definitions. Add test cases.
parent
c19a17d8
Changes
8
Show whitespace changes
Inline
Side-by-side
asdf.asd
View file @
c3cb58db
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
:licence
"MIT"
:licence
"MIT"
:description
"Another System Definition Facility"
:description
"Another System Definition Facility"
:long-description
"ASDF builds Common Lisp software organized into defined systems."
:long-description
"ASDF builds Common Lisp software organized into defined systems."
:version
"2.32.3
4
"
;; to be automatically updated by make bump-version
:version
"2.32.3
5
"
;; to be automatically updated by make bump-version
:depends-on
()
:depends-on
()
#+
asdf3
:encoding
#+
asdf3
:utf-8
#+
asdf3
:encoding
#+
asdf3
:utf-8
;; For most purposes, asdf itself specially counts as a builtin system.
;; For most purposes, asdf itself specially counts as a builtin system.
...
...
defsystem.lisp
View file @
c3cb58db
...
@@ -11,7 +11,8 @@
...
@@ -11,7 +11,8 @@
#:defsystem
#:register-system-definition
#:defsystem
#:register-system-definition
#:class-for-type
#:*default-component-class*
#:class-for-type
#:*default-component-class*
#:determine-system-directory
#:parse-component-form
#:determine-system-directory
#:parse-component-form
#:duplicate-names
#:non-toplevel-system
#:sysdef-error-component
#:check-component-input
))
#:duplicate-names
#:non-toplevel-system
#:non-system-system
#:sysdef-error-component
#:check-component-input
))
(
in-package
:asdf/defsystem
)
(
in-package
:asdf/defsystem
)
;;; Pathname
;;; Pathname
...
@@ -71,6 +72,13 @@
...
@@ -71,6 +72,13 @@
(
format
s
(
compatfmt
"~@<Error while defining system: multiple components are given same name ~S~@:>"
)
(
format
s
(
compatfmt
"~@<Error while defining system: multiple components are given same name ~S~@:>"
)
(
duplicate-names-name
c
)))))
(
duplicate-names-name
c
)))))
(
define-condition
non-system-system
(
system-definition-error
)
((
name
:initarg
:name
:reader
non-system-system-name
)
(
class-name
:initarg
:class-name
:reader
non-system-system-class-name
))
(
:report
(
lambda
(
c
s
)
(
format
s
(
compatfmt
"~@<Error while defining system ~S: class ~S isn't a subclass of ~S~@:>"
)
(
non-system-system-name
c
)
(
non-system-system-class-name
c
)
'system
))))
(
define-condition
non-toplevel-system
(
system-definition-error
)
(
define-condition
non-toplevel-system
(
system-definition-error
)
((
parent
:initarg
:parent
:reader
non-toplevel-system-parent
)
((
parent
:initarg
:parent
:reader
non-toplevel-system-parent
)
(
name
:initarg
:name
:reader
non-toplevel-system-name
))
(
name
:initarg
:name
:reader
non-toplevel-system-name
))
...
@@ -222,6 +230,8 @@
...
@@ -222,6 +230,8 @@
;; We change-class AFTER we loaded the defsystem-depends-on
;; We change-class AFTER we loaded the defsystem-depends-on
;; since the class might be defined as part of those.
;; since the class might be defined as part of those.
(
let
((
class
(
class-for-type
nil
class
)))
(
let
((
class
(
class-for-type
nil
class
)))
(
unless
(
subtypep
class
'system
)
(
error
'non-system-system
:name
name
:class-name
(
class-name
class
)))
(
unless
(
eq
(
type-of
system
)
class
)
(
unless
(
eq
(
type-of
system
)
class
)
(
change-class
system
class
)))
(
change-class
system
class
)))
(
parse-component-form
(
parse-component-form
...
...
doc/asdf.texinfo
View file @
c3cb58db
...
@@ -993,7 +993,7 @@ component-list := ( @var{component-def}* )
...
@@ -993,7 +993,7 @@ component-list := ( @var{component-def}* )
component-def := ( component-type simple-component-name @var
{
option
}
* )
component-def := ( component-type simple-component-name @var
{
option
}
* )
component-type :=
:system |
:module | :file | :static-file | other-component-type
component-type := :module | :file | :static-file | other-component-type
other-component-type := symbol-by-name (@pxref
{
The defsystem grammar,,Component types
}
)
other-component-type := symbol-by-name (@pxref
{
The defsystem grammar,,Component types
}
)
...
@@ -1035,10 +1035,15 @@ the current package. So a component type @code{my-component-type}, in
...
@@ -1035,10 +1035,15 @@ the current package. So a component type @code{my-component-type}, in
the current package @code
{
my-system-asd
}
can be specified as
the current package @code
{
my-system-asd
}
can be specified as
@code
{
:my-component-type
}
, or @code
{
my-component-type
}
.
@code
{
:my-component-type
}
, or @code
{
my-component-type
}
.
@code
{
system
}
and its subclasses are @emph
{
not
}
allowed as component types for such children components.
@subsection System class names
@subsection System class names
A system class name will be looked up in the same way as a Component
A system class name will be looked up
type (see above). Typically, one will not need to specify a system
in the same way as a Component type (see above),
except that only @code
{
system
}
and its subclasses are allowed.
Typically, one will not need to specify a system
class name, unless using a non-standard system class defined in some
class name, unless using a non-standard system class defined in some
ASDF extension, typically loaded through @code
{
DEFSYSTEM-DEPENDS-ON
}
,
ASDF extension, typically loaded through @code
{
DEFSYSTEM-DEPENDS-ON
}
,
see below. For such class names in the ASDF package, we recommend that
see below. For such class names in the ASDF package, we recommend that
...
...
header.lisp
View file @
c3cb58db
;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
;;; This is ASDF 2.32.3
4
: Another System Definition Facility.
;;; This is ASDF 2.32.3
5
: Another System Definition Facility.
;;;
;;;
;;; Feedback, bug reports, and patches are all welcome:
;;; Feedback, bug reports, and patches are all welcome:
;;; please mail to <asdf-devel@common-lisp.net>.
;;; please mail to <asdf-devel@common-lisp.net>.
...
...
interface.lisp
View file @
c3cb58db
...
@@ -116,7 +116,7 @@
...
@@ -116,7 +116,7 @@
#:missing-dependency
#:missing-dependency
#:missing-dependency-of-version
#:missing-dependency-of-version
#:circular-dependency
; errors
#:circular-dependency
; errors
#:duplicate-names
#:non-toplevel-system
#:duplicate-names
#:non-toplevel-system
#:non-system-system
#:try-recompiling
#:try-recompiling
#:retry
#:retry
...
...
test/test-defsystem-errors.script
0 → 100644
View file @
c3cb58db
;;; -*- Lisp -*-
(defun defsystem-error-handler (form &optional (error 'error))
(handler-case (eval form)
(error () t)
(:no-error (&rest values)
(declare (ignore values))
(error "Expected an error out of ~S" form))))
(defmacro defsystem-error ((&optional (error 'error)) &rest r)
`(defsystem-error-handler '(def-test-system ,@r) ',error))
(defsystem-error (non-system-system)
:foo :class :cl-source-file)
(defsystem-error (non-toplevel-system)
:foo :components ((:system :bar)))
upgrade.lisp
View file @
c3cb58db
...
@@ -52,7 +52,7 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO
...
@@ -52,7 +52,7 @@ You can compare this string with e.g.: (ASDF:VERSION-SATISFIES (ASDF:ASDF-VERSIO
;; "3.4.5.67" would be a development version in the official upstream of 3.4.5.
;; "3.4.5.67" would be a development version in the official upstream of 3.4.5.
;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5
;; "3.4.5.0.8" would be your eighth local modification of official release 3.4.5
;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67
;; "3.4.5.67.8" would be your eighth local modification of development version 3.4.5.67
(
asdf-version
"2.32.3
4
"
)
(
asdf-version
"2.32.3
5
"
)
(
existing-version
(
asdf-version
)))
(
existing-version
(
asdf-version
)))
(
setf
*asdf-version*
asdf-version
)
(
setf
*asdf-version*
asdf-version
)
(
when
(
and
existing-version
(
not
(
equal
asdf-version
existing-version
)))
(
when
(
and
existing-version
(
not
(
equal
asdf-version
existing-version
)))
...
...
version.lisp-expr
View file @
c3cb58db
"2.32.3
4
"
"2.32.3
5
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment