From: Slava Akhmechet
Subject: Breaking up ASDF system definition
Date: 
Message-ID: <87ir1vohdb.fsf@gmail.com>
Hello,

My asdf system definitions are getting quite large. I'd like to break
them up: perhaps define some modules separately and then insert
references to them in the main system definition. Is there already a way
to do this declaratively?

-- 
Regards,
Slava Akhmechet.

From: Marco Antoniotti
Subject: Re: Breaking up ASDF system definition
Date: 
Message-ID: <001afa53-aa04-4d8e-8155-568d2f0822e2@e4g2000hsg.googlegroups.com>
On Jan 15, 5:14 am, Slava Akhmechet <·········@gmail.com> wrote:
> Hello,
>
> My asdf system definitions are getting quite large. I'd like to break
> them up: perhaps define some modules separately and then insert
> references to them in the main system definition. Is there already a way
> to do this declaratively?
>
> --
> Regards,
> Slava Akhmechet.

MK:DEFSYSTEM has a facility for that.

You can write

(mk:defsystem "FOO"
   :components ((:system "BAR")))

and if you have a subdirectory BAR with BAR.system in it, it will
DTRT.  YMMV.

Cheers
--
Marco
From: Pascal J. Bourguignon
Subject: Re: Breaking up ASDF system definition
Date: 
Message-ID: <7c3aszflr4.fsf@pbourguignon.anevia.com>
Slava Akhmechet <·········@gmail.com> writes:

> Hello,
>
> My asdf system definitions are getting quite large. I'd like to break
> them up: perhaps define some modules separately and then insert
> references to them in the main system definition. Is there already a way
> to do this declaratively?

Well, I guess you could always split your code in several files, and
define a ... meta asd file to build the asd file.  :-)


Now, serriously, why not split out these modules as independent
systems, each with its own asd file?  

-- 
__Pascal Bourguignon__
From: Slava Akhmechet
Subject: Re: Breaking up ASDF system definition
Date: 
Message-ID: <87k5mastvt.fsf@gmail.com>
···@informatimago.com (Pascal J. Bourguignon) writes:

> Now, serriously, why not split out these modules as independent
> systems, each with its own asd file?  
Ok. I'd prefer not to break up a single system into multiple ones simply
because my defsystem code gets too wide, but the consensus seems to
point in this direction :)

-- 
Regards,
Slava Akhmechet.
From: Pascal Bourguignon
Subject: Re: Breaking up ASDF system definition
Date: 
Message-ID: <87hche6au7.fsf@thalassa.informatimago.com>
Slava Akhmechet <·········@gmail.com> writes:

> ···@informatimago.com (Pascal J. Bourguignon) writes:
>
>> Now, serriously, why not split out these modules as independent
>> systems, each with its own asd file?  
> Ok. I'd prefer not to break up a single system into multiple ones simply
> because my defsystem code gets too wide, but the consensus seems to
> point in this direction :)

However:

(ASDF:DEFSYSTEM :COM.INFORMATIMAGO.COMMON-LISP 
  :DESCRIPTION "This ASDF system gathers all the COM.INFORMATIMAGO.COMMON-LISP packages."
  :VERSION "1.0.197" :AUTHOR "Pascal Bourguignon" :LICENCE "GPL" 
  :DEPENDS-ON  #.(with-open-file (stream "depend.asdm") (read stream))
  :COMPONENTS  #.(with-open-file (stream "compos.asdm") (read stream)))

could work, if asdf doesn't bind *read-eval* to nil.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

THIS IS A 100% MATTER PRODUCT: In the unlikely event that this
merchandise should contact antimatter in any form, a catastrophic
explosion will result.
From: Slava Akhmechet
Subject: Re: Breaking up ASDF system definition
Date: 
Message-ID: <87d4s2siz9.fsf@gmail.com>
Pascal Bourguignon <···@informatimago.com> writes:

> (ASDF:DEFSYSTEM :COM.INFORMATIMAGO.COMMON-LISP 
>   :DESCRIPTION "This ASDF system gathers all the COM.INFORMATIMAGO.COMMON-LISP packages."
>   :VERSION "1.0.197" :AUTHOR "Pascal Bourguignon" :LICENCE "GPL" 
>   :DEPENDS-ON  #.(with-open-file (stream "depend.asdm") (read stream))
>   :COMPONENTS  #.(with-open-file (stream "compos.asdm") (read stream)))
:)

-- 
Regards,
Slava Akhmechet.
From: Andreas Thiele
Subject: Re: Breaking up ASDF system definition
Date: 
Message-ID: <fmi1ki$8i9$00$1@news.t-online.com>
Slava Akhmechet wrote:
> Hello,
> 
> My asdf system definitions are getting quite large. I'd like to break
> them up: perhaps define some modules separately and then insert
> references to them in the main system definition. Is there already a way
> to do this declaratively?

Yes. Just list all your systems in asdf:*central-registry* and use :depends-on
in defsystem.

Example from my sources:

(defsystem :crm
  :name "CRM"
  :author "Andreas Thiele <·······@atp-media.de>"
  :version "1.0"
  :depends-on (:tools :odbc-lw :erd :tapi :rpc)
  :components ((:file "package")
               (:file "login"       :depends-on ("package"))
               (:file "database"    :depends-on ("package")) ...

Andreas