libera/commonlisp - IRC Chatlog
Search
16:07:35
beach
I have two ASDF systems in two different files. The two share a significant number of component files. So I was thinking of a read-time form like #.*COMPONENTS* in the :components part of each system definition. But this idea requires a different file to be read first, so that in this different file, I can set the value of *COMPONENTS*.
16:07:36
beach
The problem with this idea is of course that nothing happens until the ASDF system definition file is read, so nothing can happen before that. So I guess I need ideas for a different solution to this problem. Any ideas? The solution might be simple. I just don't see it.
16:08:39
beach
I suppose I could try to use REINITIALIZE-INSTANCE on my system definitions once the variable has been set.
16:11:41
beach
I can't split out a common parent system, because, although there are many components in common, an essential component differs between the two, and must be compiled and loaded before the others.
16:13:52
beach
Actually, let me explain it more precisely. The main difference between the two systems is that each one starts with a different file "packages-a" and "packages-b", and the list of common components must follow the "packages-x" file.
16:18:12
beach
If so, I could define a separate system for each of the "packages-x" files, and one common parent system for the common files. Then the two final systems would have two dependencies, with the packages system first.
16:20:34
beach
As in (defsystem packages-a :components ((:file "packages-a"))) in one file (defsystem packages-b :components ((:file "packages-b"))) in another file, (defsystem common :components (<lots>)), and finally (defsystem final-a :depends-on (packages-a common)) and (defsystem final-b :depends-on (packages-b common))
16:32:10
_death
maintaining two lists instead of one to avoid such complexity doesn't sound too bad to me
16:36:52
beach
I often find that although ASDF is defined to be very flexible, there are simple (and I presume fairly common) things like this that cannot be expressed easily. At least not with my knowledge of ASDF.
16:36:53
_death
it may also be possible to have the two systems defined in a single file (and a symlink?)
16:40:53
_death
others may know better solutions.. I try to keep my asdf-related use to the basics, and so don't delve much into it
18:28:39
pjb
beach: basically: #.(with-open-file (in (merge-pathnames "common.sexp" *load-truename*)) (read in))
19:40:32
pjb
The alternative is to use #+/#- to select packages-a or package-b in the common system.
1:10:43
doulos05
Question about using the ENVY package from the REPL (It's a Caveman question, if that helps).
1:11:28
doulos05
Envy determines which config to load based on an environmental variable. How do I set one of those for my REPL instance?
1:13:24
doulos05
Ah, perfect. I knew it couldn't be that hard. But this is the ur-bug for an issue I've been tracking for 4 days now and my brain was out of juice.