Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asdf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hugo Ishimaru
asdf
Commits
dc430eeb
Commit
dc430eeb
authored
Jul 30, 2013
by
Robert P. Goldman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for launchpad ticket 1206173, with test case.
parent
8dac885c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
19 deletions
+40
-19
component.lisp
component.lisp
+23
-2
defsystem.lisp
defsystem.lisp
+1
-7
find-system.lisp
find-system.lisp
+1
-10
test/duplicate-components-test.script
test/duplicate-components-test.script
+11
-0
test/duplicate-components.asd
test/duplicate-components.asd
+4
-0
No files found.
component.lisp
View file @
dc430eeb
...
...
@@ -2,7 +2,7 @@
;;;; Components
(
asdf/package:define-package
:asdf/component
(
:recycle
:asdf/component
:asdf
)
(
:recycle
:asdf/component
:asdf
/defsystem
:asdf
:asdf/find-system
)
(
:use
:asdf/common-lisp
:asdf/driver
:asdf/upgrade
)
(
:export
#:component
#:component-find-path
...
...
@@ -28,6 +28,10 @@
#:module-components
;; backward-compatibility. DO NOT USE.
#:sub-components
;; conditions
#:system-definition-error
;; top level, moved here because this is the earliest place for it.
#:duplicate-names
;; Internals we'd like to share with the ASDF package, especially for upgrade purposes
#:name
#:version
#:description
#:long-description
#:author
#:maintainer
#:licence
#:components-by-name
#:components
...
...
@@ -61,7 +65,24 @@ another pathname in a degenerate way."))
;; Backward compatible way of computing the FILE-TYPE of a component.
;; TODO: find users, have them stop using that, remove it for ASDF4.
(
defgeneric
(
source-file-type
)
(
component
system
)))
(
defgeneric
(
source-file-type
)
(
component
system
))
(
define-condition
system-definition-error
(
error
)
()
;; [this use of :report should be redundant, but unfortunately it's not.
;; cmucl's lisp::output-instance prefers the kernel:slot-class-print-function
;; over print-object; this is always conditions::%print-condition for
;; condition objects, which in turn does inheritance of :report options at
;; run-time. fortunately, inheritance means we only need this kludge here in
;; order to fix all conditions that build on it. -- rgr, 28-Jul-02.]
#+
cmu
(
:report
print-object
))
(
define-condition
duplicate-names
(
system-definition-error
)
((
name
:initarg
:name
:reader
duplicate-names-name
))
(
:report
(
lambda
(
c
s
)
(
format
s
(
compatfmt
"~@<Error while defining system: multiple components are given same name ~S~@:>"
)
(
duplicate-names-name
c
))))))
(
when-upgrading
(
:when
(
find-class
'component
nil
))
(
defmethod
reinitialize-instance
:after
((
c
component
)
&rest
initargs
&key
)
...
...
defsystem.lisp
View file @
dc430eeb
...
...
@@ -11,7 +11,7 @@
#:defsystem
#:register-system-definition
#:class-for-type
#:*default-component-class*
#:determine-system-directory
#:parse-component-form
#:
duplicate-names
#:
non-toplevel-system
#:non-system-system
#:non-toplevel-system
#:non-system-system
#:sysdef-error-component
#:check-component-input
))
(
in-package
:asdf/defsystem
)
...
...
@@ -66,12 +66,6 @@
;;; Check inputs
(
with-upgradability
()
(
define-condition
duplicate-names
(
system-definition-error
)
((
name
:initarg
:name
:reader
duplicate-names-name
))
(
:report
(
lambda
(
c
s
)
(
format
s
(
compatfmt
"~@<Error while defining system: multiple components are given same name ~S~@:>"
)
(
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
))
...
...
find-system.lisp
View file @
dc430eeb
...
...
@@ -10,7 +10,7 @@
#:coerce-name
#:primary-system-name
#:coerce-filename
#:find-system
#:locate-system
#:load-asd
#:with-system-definitions
#:system-registered-p
#:register-system
#:registered-systems
#:clear-system
#:map-systems
#:
system-definition-error
#:
missing-component
#:missing-requires
#:missing-parent
#:missing-component
#:missing-requires
#:missing-parent
#:formatted-system-definition-error
#:format-control
#:format-arguments
#:sysdef-error
#:load-system-definition-error
#:error-name
#:error-pathname
#:error-condition
#:*system-definition-search-functions*
#:search-for-system-definition
...
...
@@ -26,15 +26,6 @@
(
with-upgradability
()
(
declaim
(
ftype
(
function
(
&optional
t
)
t
)
initialize-source-registry
))
; forward reference
(
define-condition
system-definition-error
(
error
)
()
;; [this use of :report should be redundant, but unfortunately it's not.
;; cmucl's lisp::output-instance prefers the kernel:slot-class-print-function
;; over print-object; this is always conditions::%print-condition for
;; condition objects, which in turn does inheritance of :report options at
;; run-time. fortunately, inheritance means we only need this kludge here in
;; order to fix all conditions that build on it. -- rgr, 28-Jul-02.]
#+
cmu
(
:report
print-object
))
(
define-condition
missing-component
(
system-definition-error
)
((
requires
:initform
"(unnamed)"
:reader
missing-requires
:initarg
:requires
)
(
parent
:initform
nil
:reader
missing-parent
:initarg
:parent
)))
...
...
test/duplicate-components-test.script
0 → 100644
View file @
dc430eeb
;;; -*- Lisp -*-
(handler-case (asdf:find-system "duplicate-components")
(asdf:duplicate-names (x) (declare (ignore x)) t)
(asdf:load-system-definition-error (x)
(if (and (asdf/find-system::error-condition x)
(typep (asdf/find-system::error-condition x) 'asdf:duplicate-names))
t
(error "LOAD-SYSTEM-DEFINITION-ERROR not as expected (no contained DUPLICATE-NAMES error).")))
(:no-error (x)
(error "FIND-SYSTEM of duplicate-components returned ~S instead of raising DUPLICATE-NAMES error." x)))
test/duplicate-components.asd
0 → 100644
View file @
dc430eeb
(
defsystem
duplicate-components
:components
((
:file
"foo"
)
(
:file
"foo"
)))
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