[elephant-devel] A thorny problem....
Robert L. Read
read at robertlread.net
Fri Feb 17 15:17:06 UTC 2006
I think I've a identified a serious problem relating to the
the dependencies on various modules that I offer up
for you comment.
I major goal of the multiple backend system is to allow
you to not need to install the software related to the system
you don't need. If you want to use BerkeleyDB, you shouldn't have
to install CL-SQL. If you want to use CL-SQL and a relational database,
you can't shouldn't have to install BerkeleyDB (which would subject
you to their license, in any case.)
Unfortunately, the "with-transaction" macro, which exists in
cl-sql, BDB, and also Elephant, must be in place at compilation
time.
I have written this macro to take a key argument, and, based on
the type of the passed-in store-controller, to resolve either to
the CL-SQL with-transaction macro, or the existing with-transaciton
macro for BDB.
I don't know how to write this macro without having CL-SQL macro
loaded (which implies that you have it installed.)
I am therefore in a bind:
I can't right a generic with-transaction macro without loading CL-SQL,
and I can't make you install CL-SQL if you don't want to use it.
The macros cannot be treated as functions, (which could easily remain
undefined if they did not actually need to be executed), since the
"with-transaction" idea cannot possibly be written as a function.
I can think of two solutions:
1) Create two asdf systems: one for with clsql, one without. Then
it would not be possible or necessary to load "elephant" without
choosing a back-end (or a set of back-ends).
2) Alternatively, the loading of the cl-sql module could reload the
files with macro in place. This will technically work, but is hideous
in the sense that performing a
(asdf:operate 'asdf:load-op :ele-clsql)
would perform a reloading or a recompilation of more than half the
project.
Unless someone can provide me some better advice, I'm going to
investigate
#1.
I find all of these dependencies complicated, and macros tend to
exacerbate
the problem. Perhaps there is a much simpler way of dealing with this
that someone can suggest.
I must admit that I don't understand how 0.5.0 works, and why only now
Ian Eslick's code in the head brings this problem to light.
----
Robert L. Read, PhD read &T
robertlread.net
Consider visiting Progressive Engineering:
http://robertlread.net/pe
In Austin: 912-8593 "Think
globally, Act locally." -- RBF
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/elephant-devel/attachments/20060217/56c0c6a0/attachment.html>
More information about the elephant-devel
mailing list