Page 1 of 1

Question about library dependencies

Posted: Thu May 08, 2014 1:38 pm
by joeish80829
In my library I have 2 .asd files,the main .asd file and another .asd file that has 1 module with 2 files that depend on the 20 or so files in my main .asd file. I have the smaller.asd file because it has functions that are garbage collected that have the same name as non GC functions in my main .asd file and are callable in the main .asd file with a prefix..(gc:). But now the main .asd file has to depend on the smaller .asd file and the 50 or so functions(with the same name)in it...how do I go about setting this up. do I just duplicate all the functions housed in my smaller .asd file, and add a % to the start of their name and add that file to my main .asd file (which would work) or is there another better way to acomplish this.

Re: Question about library dependencies

Posted: Fri May 09, 2014 11:22 am
by pjstirling
ASDF systems are for compiling and loading self-contained code modules. There is no sanity in having two libraries that depend on each other, either they should be one library, or they should be instead three (or more), with the shared functionality factored out.

Re: Question about library dependencies

Posted: Sat May 10, 2014 8:10 am
by joeish80829
Can you help me figure out how to define my library, I have 1 .asd file now with all my main code and another asd file(gc.asd) that depends on it's 20 or so files completly except it has 1 lisp file with all the garbage collected versions of the functions that would need garbage collecting in the main.asd and a package.lisp file exporting those gc functions so they can be called by a prefix "gc:" . The gc: is used so I can call function "test" from my main library and use manual MM or with-macros to manage memory, or I can call "gc::test" and the function will be automatically memory managed. The thing is, in my main .asd file is a file with a function that needs 2 functions from the gc.asd file to use in an &optional param list , because it would be faster. I expect more like that too. Can you help me figure out how to now depend on the gc.asd file in my main .asd file.