I'm tidying up a library of code, Roan (for building things that play with change ringing, you probably don't want to know the details :-), for eventual inclusion in Quicklisp. In thinking about its dependencies I've run into an issue I'm not sure how best to address. I asked Zach Beane for advice, but he, too, isn't sure how best to deal with it, and suggested I consult folks on this list.
My library has dependencies upon several others, all readily available from Quicklisp. One them, though, cl-sqlite (or perhaps it's better referred to as sqlite, it's rather conflicted about what it wants to call itself) in turn has a dependency on a binary library, sqlite3. For example, if the sqlite3 binary library is not install, doing
(ql:quickload :sqlite)
signals an error when it's setting up FFI things.
However Roan's use of SQLite is not essential to Roan's usefulness (well, it's probably not all that useful to most people anyway, only to those interested in change ringing, a small audience). There's really only one, tiny corner of functionality in Roan it supports. While sqlite3 is easily obtained, it would seem polite to allow use of Roan without it, simply disabling the two functions that depend upon it. The "disable if the cl-sqlite stuff is not present" part I can easily do. What's causing me to scratch my head is figuring out how to set things up so Roan will still install whether or not the sqlite3 binary library is present.
Three unattractive possibilities that come to mind are
- Define two different roan ASDF systems: one consisting of most stuff, without the SQLite-dependent bits, and the other the "real" one that loads the first plus cl-sqlite. Then the user picks which one to load based on need.
- Define something to push onto *features* that, if present, comments out in roan.asd the dependency on cl-sqlite, etc. Then the user has to push the appropriate keyword onto *features* before loading roan, if she doesn't have sqlite3.
- I'm guessing I could probably include some code in the roan.asd file that does something or other nasty looking for the binary library, and then adjusts the defsystem appropriately or something (ugh).
None of these is particularly appealing. The first two seem to put too much on the shoulders of the poor luser who just wants to load the darn thing without having to think about lower level stuff, and the last (a) seems to confound too much actually doing complex, kludgy stuff with what should be just declarative, and (b) is something I seriously doubt I'd get right, especially in a portable way.
It seems there has got to be A Better Way. Has anyone dealt with a similar situation? Or, even if not, might you have a good idea?
I suppose an attractive possibility might be to wrap some sort of condition handler around the place inside ASDF that's trying to load the cl-sqlite dependency, but I don't know my way around the ASDF internals enough to have a sense of where that should be done, or if it's even practical. Is there a good place inside of ASDF to do such a thing? It seems fairly modular, so it seems likely. Maybe it's as easy as defining a specialized method of some sort, or an :around method on something or other?
Thanks!
Given the marginal role played by the SQL I would go with the two-asd approach, with the default install using the non-sql version and a bit of documentation on how to build the other for thems that are keen on it.
Or go crazy and hit the ASDF support for how to do it magically (it is designed for smart loading) but then it seems you still need to document for users why they end up without the SQL bit if they do not have the dependencies in place.
hth, kt
-kt
On Wed, Apr 6, 2016 at 7:21 PM, Don Morrison dfm2@cmu.edu wrote:
I'm tidying up a library of code, Roan (for building things that play with change ringing, you probably don't want to know the details :-), for eventual inclusion in Quicklisp. In thinking about its dependencies I've run into an issue I'm not sure how best to address. I asked Zach Beane for advice, but he, too, isn't sure how best to deal with it, and suggested I consult folks on this list.
My library has dependencies upon several others, all readily available from Quicklisp. One them, though, cl-sqlite (or perhaps it's better referred to as sqlite, it's rather conflicted about what it wants to call itself) in turn has a dependency on a binary library, sqlite3. For example, if the sqlite3 binary library is not install, doing
(ql:quickload :sqlite)
signals an error when it's setting up FFI things.
However Roan's use of SQLite is not essential to Roan's usefulness (well, it's probably not all that useful to most people anyway, only to those interested in change ringing, a small audience). There's really only one, tiny corner of functionality in Roan it supports. While sqlite3 is easily obtained, it would seem polite to allow use of Roan without it, simply disabling the two functions that depend upon it. The "disable if the cl-sqlite stuff is not present" part I can easily do. What's causing me to scratch my head is figuring out how to set things up so Roan will still install whether or not the sqlite3 binary library is present.
Three unattractive possibilities that come to mind are
- Define two different roan ASDF systems: one consisting of most stuff,
without the SQLite-dependent bits, and the other the "real" one that loads the first plus cl-sqlite. Then the user picks which one to load based on need.
- Define something to push onto *features* that, if present, comments out
in roan.asd the dependency on cl-sqlite, etc. Then the user has to push the appropriate keyword onto *features* before loading roan, if she doesn't have sqlite3.
- I'm guessing I could probably include some code in the roan.asd file
that does something or other nasty looking for the binary library, and then adjusts the defsystem appropriately or something (ugh).
None of these is particularly appealing. The first two seem to put too much on the shoulders of the poor luser who just wants to load the darn thing without having to think about lower level stuff, and the last (a) seems to confound too much actually doing complex, kludgy stuff with what should be just declarative, and (b) is something I seriously doubt I'd get right, especially in a portable way.
It seems there has got to be A Better Way. Has anyone dealt with a similar situation? Or, even if not, might you have a good idea?
I suppose an attractive possibility might be to wrap some sort of condition handler around the place inside ASDF that's trying to load the cl-sqlite dependency, but I don't know my way around the ASDF internals enough to have a sense of where that should be done, or if it's even practical. Is there a good place inside of ASDF to do such a thing? It seems fairly modular, so it seems likely. Maybe it's as easy as defining a specialized method of some sort, or an :around method on something or other?
Thanks!
-- Don Morrison dfm2@cmu.edu "There were two cultures, as far as he was concerned. One was the real one, the other was occupied by people who liked machinery and ate pizza at unreasonable hours." -- Terry Pratchett, _The Last Hero_
Hi Don,
System configuration, and configuration of dependencies in particular, is in some sense an AI-complete problem. There is no general-purpose solution. Every solution has tradeoffs. At the end of the day, some end user may need to tweak something.
My impression is that that Quicklisp takes the 80% or 90% approach. Quicklisp tries to provide what "the average" user wants. Anyone outside that profile should download and configure packages independently.
From what you describe, sqlite adds minimal functionality to Roan, and
requiring sqlite adds significant risk of a failed Roan install. Thus sqlite should not be required in the Quicklisp distribution of Roan. Power users can read the documentation, download Roan, and do any manual tweaks that are required.
In terms of functionality and soundness of intent, the most advanced configuration tool I know of is GNU Autoconf. It provides a standard approach for running experiments on a system, providing default config selections, and providing user-selectable options. Unfortunately, it targets C/C++ and is written in "portable shell script" that is partially auto-generated by M4 and Perl. In other words, it is fairly hard to grok. Unfortunately, CL has nothing that even comes close in terms of functionality.
I haven't looked recently, but in the past there were a number of ASDF files with reader conditionals (or comments) in order to support some user customization. I believe Fare got many of these cleaned up. You should ask the ASDF list for the current recommended practice.
- Daniel
On Wed, 6 Apr 2016, Don Morrison wrote:
I'm tidying up a library of code, Roan (for building things that play with change ringing, you probably don't want to know the details :-), for eventual inclusion in Quicklisp. In thinking about its dependencies I've run into an issue I'm not sure how best to address. I asked Zach Beane for advice, but he, too, isn't sure how best to deal with it, and suggested I consult folks on this list.
My library has dependencies upon several others, all readily available from Quicklisp. One them, though, cl-sqlite (or perhaps it's better referred to as sqlite, it's rather conflicted about what it wants to call itself) in turn has a dependency on a binary library, sqlite3. For example, if the sqlite3 binary library is not install, doing
(ql:quickload :sqlite)
signals an error when it's setting up FFI things.
However Roan's use of SQLite is not essential to Roan's usefulness (well, it's probably not all that useful to most people anyway, only to those interested in change ringing, a small audience). There's really only one, tiny corner of functionality in Roan it supports. While sqlite3 is easily obtained, it would seem polite to allow use of Roan without it, simply disabling the two functions that depend upon it. The "disable if the cl-sqlite stuff is not present" part I can easily do. What's causing me to scratch my head is figuring out how to set things up so Roan will still install whether or not the sqlite3 binary library is present.
Three unattractive possibilities that come to mind are
Define two different roan ASDF systems: one consisting of most stuff, without the SQLite-dependent bits, and the other the "real" one that loads the first plus cl-sqlite. Then the user picks which one to load based on need.
Define something to push onto *features* that, if present, comments out in roan.asd the dependency on cl-sqlite, etc. Then the user has to push the appropriate keyword onto *features* before loading roan, if she doesn't have
sqlite3.
- I'm guessing I could probably include some code in the roan.asd file that does something or other nasty looking for the binary library, and then adjusts the defsystem appropriately or something (ugh).
None of these is particularly appealing. The first two seem to put too much on the shoulders of the poor luser who just wants to load the darn thing without having to think about lower level stuff, and the last (a) seems to confound too much actually doing complex, kludgy stuff with what should be just declarative, and (b) is something I seriously doubt I'd get right, especially in a portable way.
It seems there has got to be A Better Way. Has anyone dealt with a similar situation? Or, even if not, might you have a good idea?
I suppose an attractive possibility might be to wrap some sort of condition handler around the place inside ASDF that's trying to load the cl-sqlite dependency, but I don't know my way around the ASDF internals enough to have a sense of where that should be done, or if it's even practical. Is there a good place inside of ASDF to do such a thing? It seems fairly modular, so it seems likely. Maybe it's as easy as defining a specialized method of some sort, or an :around method on something or other?
Thanks!
-- Don Morrison dfm2@cmu.edu "There were two cultures, as far as he was concerned. One was the real one, the other was occupied by people who liked machinery and ate pizza at unreasonable hours." -- Terry Pratchett, _The Last Hero_
On Wed, 6 Apr 2016 22:37:09 -0400 (EDT) Daniel Herring dherring@tentpost.com wrote:
In terms of functionality and soundness of intent, the most advanced configuration tool I know of is GNU Autoconf. It provides a standard approach for running experiments on a system, providing default config selections, and providing user-selectable options. Unfortunately, it targets C/C++ and is written in "portable shell script" that is partially auto-generated by M4 and Perl. In other words, it is fairly hard to grok. Unfortunately, CL has nothing that even comes close in terms of functionality.
pkgsrc has a simple system where variables can be set by the binary-package-maintainer, that's higher level than autoconf. I wonder if ASDF or QuickLisp already has something similar, but if not, it could possibly be used as inspiration...
Here are example lines from a pkgsrc mk.conf file:
--- # Global control options [...] MAKE_JOBS=4 USE_SSP=yes X11_TYPE=native #MKDEBUG=yes #MKDEBUGLIB=yes DBG=-g -O2 INSTALL_UNSTRIPPED=yes PKG_RESUME_TRANSFERS=1 PKG_DEVELOPER=yes DISTDIR=/usr/distfiles PKGSRCDIR=/usr/pkgsrc WRKOBJDIR=/usr/pkgsrc-obj #PKGDBDIR=/var/db/pkg BINPKG_SITES=/usr/pkgsrc/packages/All [...]
# Acceptable licenses [...] ACCEPTABLE_LICENSES+=gnu-gpl-v2 [...]
# Default local options # imply -arts for any package with an arts option, # imply +inet6 for any package with an inet6 option, etc PKG_DEFAULT_OPTIONS=-arts -esound -nas -aalib -pulseaudio -gnome -hal -avahi -dbus mmx inet6
# Package-specific options [...] PKG_OPTIONS.irssi+=ssl perl inet6 PKG_OPTIONS.apache+=suexec -apache-mpm-worker PKG_OPTIONS.fluxbox+=xrender imlib2 xft PKG_OPTIONS.xterm+=freetype PKG_OPTIONS.squid+=squid-ipf squid-pf -snmp -squid-pam-helper PKG_OPTIONS.xmess+=sdl PKG_OPTIONS.ffmpeg+=faac opencore-amr PKG_OPTIONS.mutt+=ssl curses PKG_OPTIONS.emacs+=-gtk -x11 -motif -xaw PKG_OPTIONS.xlockmore+=oss PKG_OPTIONS.elinks+=x11 -javascript [...] PKG_OPTIONS.boehm-gc+=threads PKG_OPTIONS.ecl+=threads unicode ffi clx debug [...] ---
Of course, this is also implemented using the shell in this case, but a regexp tree with keywords, or something similar to *FEATURES* might also be an elegant way for users to specify package-specific (and global preferences) options...
Before building a package, the "show options" make-target allows to see available and default options for a package:
--- $ cd /usr/pkgsrc/lang/ecl/ $ make show-options
Any of the following general options may be selected: clx Enable the X11 support library. debug Enable debugging facilities in the package. ffi Enable dffi support. threads Enable threads support. unicode Enable support for Unicode.
These options are enabled by default: clx ffi unicode
These options are currently enabled: clx debug ffi threads unicode
You can select which build options to use by setting PKG_DEFAULT_OPTIONS or PKG_OPTIONS.ecl.
$ ---
Considering that with QL/ASDF the user also builds his Lisp packages, and might need a single location to specify options like accepted dependencies, pkgsrc options seem to answer the same problem.
Hi!
I find the USE flags system that Gentoo uses quite inspiring.
I don't know whether this can sensibly be simulated through *features*. On one hand, you get the conditional compilation for free, on the other, *features* to me seems to be intended to represent features that are present, not those that you'd like to be present.
I guess that a proper implementation of this requires an extension of both ASDF and Quicklisp.
Gruß
Svante
This reply has nothing to do with the question, but you may be interested to learn that there is a useful entry for Change Ringing in the Harvard Dictionary of Music, which ends "Change ringing is still widely practiced in England." I'm paraphrasing from memory 40 years ago, but the 1st edition of the Dictionary (hard to find) added "It is a typical English recreation providing healthful physical exercise coupled with some simple intellectual effort." This last sentence disappeared in the 2nd ed.
Thought you'd want to know all this while pondering ASDF.
On Wed, Apr 6, 2016 at 4:21 PM, Don Morrison dfm2@cmu.edu wrote:
I'm tidying up a library of code, Roan (for building things that play with change ringing, you probably don't want to know the details :-), for eventual inclusion in Quicklisp. In thinking about its dependencies I've run into an issue I'm not sure how best to address. I asked Zach Beane for advice, but he, too, isn't sure how best to deal with it, and suggested I consult folks on this list.
My library has dependencies upon several others, all readily available from Quicklisp. One them, though, cl-sqlite (or perhaps it's better referred to as sqlite, it's rather conflicted about what it wants to call itself) in turn has a dependency on a binary library, sqlite3. For example, if the sqlite3 binary library is not install, doing
(ql:quickload :sqlite)
signals an error when it's setting up FFI things.
However Roan's use of SQLite is not essential to Roan's usefulness (well, it's probably not all that useful to most people anyway, only to those interested in change ringing, a small audience). There's really only one, tiny corner of functionality in Roan it supports. While sqlite3 is easily obtained, it would seem polite to allow use of Roan without it, simply disabling the two functions that depend upon it. The "disable if the cl-sqlite stuff is not present" part I can easily do. What's causing me to scratch my head is figuring out how to set things up so Roan will still install whether or not the sqlite3 binary library is present.
Three unattractive possibilities that come to mind are
- Define two different roan ASDF systems: one consisting of most stuff,
without the SQLite-dependent bits, and the other the "real" one that loads the first plus cl-sqlite. Then the user picks which one to load based on need.
- Define something to push onto *features* that, if present, comments out
in roan.asd the dependency on cl-sqlite, etc. Then the user has to push the appropriate keyword onto *features* before loading roan, if she doesn't have sqlite3.
- I'm guessing I could probably include some code in the roan.asd file
that does something or other nasty looking for the binary library, and then adjusts the defsystem appropriately or something (ugh).
None of these is particularly appealing. The first two seem to put too much on the shoulders of the poor luser who just wants to load the darn thing without having to think about lower level stuff, and the last (a) seems to confound too much actually doing complex, kludgy stuff with what should be just declarative, and (b) is something I seriously doubt I'd get right, especially in a portable way.
It seems there has got to be A Better Way. Has anyone dealt with a similar situation? Or, even if not, might you have a good idea?
I suppose an attractive possibility might be to wrap some sort of condition handler around the place inside ASDF that's trying to load the cl-sqlite dependency, but I don't know my way around the ASDF internals enough to have a sense of where that should be done, or if it's even practical. Is there a good place inside of ASDF to do such a thing? It seems fairly modular, so it seems likely. Maybe it's as easy as defining a specialized method of some sort, or an :around method on something or other?
Thanks!
-- Don Morrison dfm2@cmu.edu "There were two cultures, as far as he was concerned. One was the real one, the other was occupied by people who liked machinery and ate pizza at unreasonable hours." -- Terry Pratchett, _The Last Hero_
On 7 April 2016 at 07:21, Don Morrison dfm2@cmu.edu wrote:
However Roan's use of SQLite is not essential to Roan's usefulness (well, it's probably not all that useful to most people anyway, only to those interested in change ringing, a small audience). There's really only one, tiny corner of functionality in Roan it supports. While sqlite3 is easily obtained, it would seem polite to allow use of Roan without it, simply disabling the two functions that depend upon it. The "disable if the cl-sqlite stuff is not present" part I can easily do. What's causing me to scratch my head is figuring out how to set things up so Roan will still install whether or not the sqlite3 binary library is present.
I had a similar issue when I contributed GSSAPI support to Postmodern. I clearly did not want to have Postmodern depend on cl-gss, which will fail to load if the Kerberos client libraries are not installed on the machine (it will also completely fail on Windows).
The solution I chose was to simply require the user to manually load cl-gss (using QL or whatever mechanism they feel like). When GSSAPI authentication is requested, Postmodern will check if the CL-GSS package is available, and then call the relevant functions through symbols looked up using FIND-SYMBOL.
If the cl-gss system has not been loaded, Postmodern will issue a restartable error requesting the user to to load the system before continuing.
Regards, Elias
On Wed, Apr 6, 2016 at 7:21 PM, Don Morrison dfm2@cmu.edu wrote:
I suppose an attractive possibility might be to wrap some sort of condition handler around the place inside ASDF that's trying to load the cl-sqlite dependency, but I don't know my way around the ASDF internals enough to have a sense of where that should be done, or if it's even practical. Is there a good place inside of ASDF to do such a thing? It seems fairly modular, so it seems likely. Maybe it's as easy as defining a specialized method of some sort, or an :around method on something or other?
Ah, I now see that something like this is unlikely to be practical: am I correct in believing folks are likely to be operating with widely disparate versions of ASDF?
It is beginning to appear that the most practical solution today, or at least the one least likely to cause further problems, is two different systems.
hunchentoot http://weitz.de/hunchentoot/#install uses features:
You can compile Hunchentoot without SSL support - and thus without the need to have CL+SSL - if you add :HUNCHENTOOT-NO-SSL to *FEATURES* http://www.lispworks.com/documentation/HyperSpec/Body/v_featur.htm *before* you compile it.
Clack https://github.com/fukamachi/clack#server which can use five different web-servers will load the appropriate system when you start a web server.
On 7 April 2016 at 07:35, Don Morrison dfm2@cmu.edu wrote:
On Wed, Apr 6, 2016 at 7:21 PM, Don Morrison dfm2@cmu.edu wrote:
I suppose an attractive possibility might be to wrap some sort of condition handler around the place inside ASDF that's trying to load the cl-sqlite dependency, but I don't know my way around the ASDF internals enough to have a sense of where that should be done, or if it's even practical. Is there a good place inside of ASDF to do such a thing? It seems fairly modular, so it seems likely. Maybe it's as easy as defining a specialized method of some sort, or an :around method on something or other?
Ah, I now see that something like this is unlikely to be practical: am I correct in believing folks are likely to be operating with widely disparate versions of ASDF?
It is beginning to appear that the most practical solution today, or at least the one least likely to cause further problems, is two different systems.
-- Don Morrison dfm2@cmu.edu "Swift had read Hobbes, an experience not easily forgotten." -- Will and Ariel Durant, _The Age of Reason Begins_
Dear Don,
sorry for a late reply.
The intended way to use ASDF in your case would be to use two or more systems, that may be defined in the same .asd file (using the / syntax to name a secondary system: roan, roan/core, roan/sqlite, etc.) or separate .asd files (using - or . as a separator).
This way, you can unambigously name what is or isn't loaded in a given system in a way that doesn't depend on configuration.
For a system that goes to lengths at doing the right thing with respect to ASDF yet does some automatic configuration detection, try net.didierverna.clon. It has ...clon.core and ...clon.termio systems, and a special ...clone.setup/termio for autodetection.
I recommend strongly against using user-specified *features* to control what does or doesn't go into a system (as opposed to system-provided or system-deduced features).
Also, regarding people using disparate versions of ASDF: if you can always ship with the latest ASDF version and depend on its features. Also, implementations released in the last two years include ASDF 3.1.2 or later (which unhappily doesn't include clisp).
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org If you think health care is expensive now, wait until you see what it costs when it's free. — P.J. O'Rourke
On Sun, Apr 10, 2016 at 12:32 AM, Faré fahree@gmail.com wrote:
Dear Don,
sorry for a late reply.
The intended way to use ASDF in your case would be to use two or more systems, that may be defined in the same .asd file (using the / syntax to name a secondary system: roan, roan/core, roan/sqlite, etc.) or separate .asd files (using - or . as a separator).
I like this suggestion because it lets the user decide what is to be built.
It won't scale though.
This is an excerpt from the help message of ImageMagick's configure script: --disable-openmp do not use OpenMP --enable-opencl enable OpenCL support --without-threads disable threads support --without-bzlib disable BZLIB support --with-x use the X Window System --without-zlib disable ZLIB support --without-dps disable Display Postscript support --without-fftw disable FFTW support --without-fpx disable FlashPIX support --without-djvu disable DjVu support --without-fontconfig disable fontconfig support --without-freetype disable Freetype support --without-raqm disable Raqm support --with-gslib enable Ghostscript library support --with-gvc enable GVC support --without-jbig disable JBIG support --without-jpeg disable JPEG support --without-lcms disable lcms (v1.1X) support --without-openjp2 disable OpenJP2 support --without-lqr disable Liquid Rescale support --without-lzma disable LZMA support --without-openexr disable OpenEXR support --without-pango disable PANGO support --without-png disable PNG support --with-rsvg enable RSVG support --without-tiff disable TIFF support --without-webp disable WEBP support
Mark
On Mon, Apr 11, 2016 at 7:15 PM, Mark Cox markcox80@gmail.com wrote:
On Sun, Apr 10, 2016 at 12:32 AM, Faré fahree@gmail.com wrote:
The intended way to use ASDF in your case would be to use two or more systems, that may be defined in the same .asd file (using the / syntax to name a secondary system: roan, roan/core, roan/sqlite, etc.) or separate .asd files (using - or . as a separator).
I like this suggestion because it lets the user decide what is to be built.
It won't scale though.
This is an excerpt from the help message of ImageMagick's configure script: --disable-openmp do not use OpenMP --enable-opencl enable OpenCL support --without-threads disable threads support --without-bzlib disable BZLIB support --with-x use the X Window System --without-zlib disable ZLIB support --without-dps disable Display Postscript support --without-fftw disable FFTW support --without-fpx disable FlashPIX support --without-djvu disable DjVu support --without-fontconfig disable fontconfig support --without-freetype disable Freetype support --without-raqm disable Raqm support --with-gslib enable Ghostscript library support --with-gvc enable GVC support --without-jbig disable JBIG support --without-jpeg disable JPEG support --without-lcms disable lcms (v1.1X) support --without-openjp2 disable OpenJP2 support --without-lqr disable Liquid Rescale support --without-lzma disable LZMA support --without-openexr disable OpenEXR support --without-pango disable PANGO support --without-png disable PNG support --with-rsvg enable RSVG support --without-tiff disable TIFF support --without-webp disable WEBP support
Quite on the contrary, it's the C configure and make system that clearly doesn't scale.
If you're writing Lisp code to be used from the Lisp REPL, just define something a system that autoloads functionality on demand.
If you're sadly creating an application, just dump everything — why would you leave anything out? Actually, use a protocol that helps you dump a single multicall binary for all the applications of your user.
And if you're building a small image for an embedded target, well, then have you build script include exactly the systems you want.
In any case, this kind of "configuration" can and should be part of your "application build script", that calls ASDF, but that ASDF doesn't have to care about.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Apparently a government can prevent itself and its successors indefinite from doing bad things, just by writing a note to itself that says "don't do bad things." — Mencius Moldbug on constitutions
On Tue, Apr 12, 2016 at 9:26 AM, Faré fahree@gmail.com wrote:
On Mon, Apr 11, 2016 at 7:15 PM, Mark Cox markcox80@gmail.com wrote:
On Sun, Apr 10, 2016 at 12:32 AM, Faré fahree@gmail.com wrote:
The intended way to use ASDF in your case would be to use two or more systems, that may be defined in the same .asd file (using the / syntax to name a secondary system: roan, roan/core, roan/sqlite, etc.) or separate .asd files (using - or . as a separator).
I like this suggestion because it lets the user decide what is to be
built.
It won't scale though.
This is an excerpt from the help message of ImageMagick's configure
script:
--disable-openmp do not use OpenMP --enable-opencl enable OpenCL support --without-threads disable threads support --without-bzlib disable BZLIB support --with-x use the X Window System --without-zlib disable ZLIB support --without-dps disable Display Postscript support --without-fftw disable FFTW support --without-fpx disable FlashPIX support --without-djvu disable DjVu support --without-fontconfig disable fontconfig support --without-freetype disable Freetype support --without-raqm disable Raqm support --with-gslib enable Ghostscript library support --with-gvc enable GVC support --without-jbig disable JBIG support --without-jpeg disable JPEG support --without-lcms disable lcms (v1.1X) support --without-openjp2 disable OpenJP2 support --without-lqr disable Liquid Rescale support --without-lzma disable LZMA support --without-openexr disable OpenEXR support --without-pango disable PANGO support --without-png disable PNG support --with-rsvg enable RSVG support --without-tiff disable TIFF support --without-webp disable WEBP support
Quite on the contrary, it's the C configure and make system that clearly doesn't scale.
If you're writing Lisp code to be used from the Lisp REPL, just define something a system that autoloads functionality on demand.
If you're sadly creating an application, just dump everything — why would you leave anything out? Actually, use a protocol that helps you dump a single multicall binary for all the applications of your user.
And if you're building a small image for an embedded target, well, then have you build script include exactly the systems you want.
In any case, this kind of "configuration" can and should be part of your "application build script", that calls ASDF, but that ASDF doesn't have to care about.
Right. I see the flaw in my argument. Decisions are being made at the wrong time.
My example actually highlights your point.
Thanks for taking the time to correct me.
Mark