From: francis.leboutt

Subject: Re: acl5/linux and defsystem strange behavior

Date: 1998-11-17 5:03

At 16/11/98 20:23 +0300, Alexander Vorobiev wrote:
> >Hello! > >Recently I tried to utilize defsystem facility in acl5. I want to use >"Long form module-specifications" to make some dependencies between >several systems, but it did not work for me. For example > >USER(1): (defsystem :sysa () > (:module filea1 "filea1") > ("filea2" (:uses-definitions-from filea1))) >:SYSA >USER(2): (show-system :sysa) >; System: "SYSA" >; default package: #<The COMMON-LISP-USER package> >; default pathname: #p"./" >; default module class: DEFSYSTEM:LISP-MODULE >; the system contains the following modules: >; Module: FILEA1 >; source file: "filea1" >; Module: "filea2" >; source file: "filea2" >; Dependencies: >; before LOAD dependencies: >; LOAD FILEA1 >; before COMPILE dependencies: >; LOAD FILEA1 > >everything seems ok... > >USER(3): (defsystem :sysb () > (:module sysa-module :sysa) > ("fileb1" (:uses-definitions-from sysa-module))) >:SYSB >USER(4): (show-system :sysb) >; System: "SYSB" >; default package: #<The COMMON-LISP-USER package> >; default pathname: #p"./" >; default module class: DEFSYSTEM:LISP-MODULE >; the system contains the following modules: >Error: Can't find a system named: NIL > [condition type: SIMPLE-ERROR] > >let us investigate... > >USER(6): (ds:list-all-systems) >(#<DEFSYSTEM:DEFAULT-SYSTEM "SYSB" @ #x204dc982> > #<DEFSYSTEM:DEFAULT-SYSTEM "SYSA" @ #x204d8aba>) >USER(7): (ds:modules (car *)) >(SYSA-MODULE #<DEFSYSTEM:LISP-MODULE "fileb1" @ #x204dcf2a>) > >This is strange, isn't it? CAR of the list above should be some >module-group object, not just symbol sysa-module. Let us take system >object, corresponding to :sysa and give it to defsystem instead of >just :sysa > >USER(19): (defun system-by-name (name) > (find name (ds:list-all-systems) :key #'ds:system-name)) >SYSTEM-BY-NAME >USER(20): (defsystem :sysb () > (:module sysa-module (system-by-name :sysa)) > ("fileb1" (:uses-definitions-from sysa-module))) >:SYSB >USER(21): (show-system :sysb) >; System: "SYSB" >; default package: #<The COMMON-LISP-USER package> >; default pathname: #p"./" >; default module class: DEFSYSTEM:LISP-MODULE >; the system contains the following modules: >; Module-group: SYSA-MODULE >; default module class: DEFSYSTEM:LISP-MODULE >; the module-group contains the following modules: >; System: "SYSA" >Error: Can't find a system named: NIL > [condition type: SIMPLE-ERROR] > >let us check: > >USER(23): (ds:modules (car (ds:list-all-systems))) >(#<DEFSYSTEM:DEFAULT-MODULE-GROUP SYSA-MODULE @ #x204fa002> > #<DEFSYSTEM:LISP-MODULE "fileb1" @ #x204dcf2a>) > >The situation improved! Now we have appropriate sysa-module module >group instead of just symbol sysa-module. But we still have that error >about "system named: NIL". Well, actually I corrected this error >also. The question I have is did I do something wrong? Or is it a >known bug? >
It seems to be a bug (not known probably). BTW using a short form is working: (defsystem sysa () (:module filea1 "filea1") ("filea2" (:uses-definitions-from filea1))) (defsystem sysb () (:definitions :sysa "fileb1")) (show-system 'sysb) System: "SYSB" ; default package: #<The COMMON-LISP-USER package> ; default pathname: #p".\\" ; default module class: defsys:lisp-module ; the system contains the following modules: ; Module-group: "<unnamed>" ; default module class: defsys:lisp-module ; the module-group contains the following modules: ; System: "SYSA" ; Module: "fileb1" ; source file: "fileb1" ; Dependencies: ; before compile dependencies: ; load #<defsys:default-system "SYSA" @ #x21d87ec2> ; before load dependencies: ; load #<defsys:default-system "SYSA" @ #x21d87ec2> Francis -- Francis Leboutte IH_B Parc Scientifique du Sart-Tilman Avenue Pré-Aily 1 , 4031 Angleur , Belgium t: +32-(0)4-3678.914 F: +32-(0)4-3678.300 <inthan.be at francis.leboutte> <acm.org at leboutte> http://users.skynet.be/algo