Hello,
I have the following systems definitions (simplified):
(asdf:defsystem sys-2
:version "0.1"
:pathname *default-pathname-defaults*
:depends-on (sys-3 sys-4 mime)
:components ((:file "file1")
(:file "file2")
(:file "file3"))
:serial t)
(asdf:defsystem main-system
:version "0.1"
:depends-on (sys-2 cl-smtp)
:components ((:file "file4")
(:file "file5"))
:serial t)
Where file2.lisp contains a package that uses the mime system.
Is there something wrong with these definitions ?
After some tests I found that the systems in the :depends-on option
are processed in reverse order i.e. first mime then sys4 then sys3
in the :depends-on (sys-3 sys-4 mime) dependency.
This should not be a problem because if I understood correctly the
manual, all dependencies are processed (loaded or compiled and
loaded if necessary) before performing the load/compile operation
on the components file1 file2 and file3.
Unfortunately I may not have understood well how asdf works because
the following two alternative definitions of sys2 do not work.
(asdf:defsystem sys-2
:version "0.1"
:pathname *default-pathname-defaults*
:depends-on (sys-3 mime sys-4)
:components ((:file "file1")
(:file "file2")
(:file "file3"))
:serial t)
(asdf:defsystem sys-2
:version "0.1"
:pathname *default-pathname-defaults*
:depends-on (mime sys-3 sys-4)
:components ((:file "file1")
(:file "file2")
(:file "file3"))
:serial t)
In both cases the mime system is registred but not loaded before file2.
I really would like to understand what is going on ...
Thibault
> In both cases the mime system is registred but not loaded before file2.
>
> I really would like to understand what is going on ...
That's very strange, what version of asdf are you using, ie
*asdf-revision*
sross wrote:
> > In both cases the mime system is registred but not loaded before file2.
> >
> > I really would like to understand what is going on ...
>
> That's very strange, what version of asdf are you using, ie
> *asdf-revision*
Thank you for your answer.
CL-USER> asdf:*asdf-revision*
(1 81)
I finally found my mistake. The problem was that sys4 has file2
among its components and a dependency to the mime system was missing.
---
Now it compiles and load correctly but it seems that asdf does not
remember the file components that are already loaded.
If I have two systems that share the same component:
(asdf:defsystem sys1
:pathname "/home/tl/Projects/sandbox/"
:components ((:file "file1")
(:file "file3")))
(asdf:defsystem sys2
:pathname "/home/tl/Projects/sandbox/"
:depends-on (sys1)
:components ((:file "file3")
(:file "file2")))
The file3 component is loaded twice:
CL-USER> (asdf:oos 'asdf:load-op 'sys2)
; loading system definition from /home/tl/Projects/Systems/sys2.asd
into
; #<The ASDF0 package>
; Loading #P"/home/tl/Projects/sandbox/sys2.asd".
; registering #<SYSTEM SYS2 {58233025}> as SYS2
; loading system definition from /home/tl/Projects/Systems/sys1.asd
into
; #<The ASDF0 package>
; Loading #P"/home/tl/Projects/sandbox/sys1.asd".
; registering #<SYSTEM SYS1 {58251F85}> as SYS1
; Loading #P"/home/tl/Projects/sandbox/file1.x86f".
; Loading #P"/home/tl/Projects/sandbox/file3.x86f".
; Loading #P"/home/tl/Projects/sandbox/file3.x86f".
; Loading #P"/home/tl/Projects/sandbox/file2.x86f".
NIL
Is it the normal behavior or am I doing something wrong ?
Thibault