Thom Goodsell | 8 Dec 2008 17:13
Picon
Gravatar

How do I replace my broken ':perform' forms?

Sorry if this has been covered, or if it's just really obvious, but I  
couldn't find anything helpful in the archives.

I recently (i.e., about 15 minutes ago) got a new version of asdf.lisp  
when I updated my copy of ccl, and it broke a behavior I've been  
using. I *believe* that I was using the behavior incorrectly, and that  
the change was a bugfix, though I could be misunderstanding the svn  
logs.

In my defsystem, I have the following bit of code:

   :perform (load-op :before (op c)
		    ;; the before method runs after dependencies are loaded,
		    ;; but before the components are loaded, so clsql-mysql is  
available
		    (pushnew #p"/usr/local/mysql/lib/"      ; local development
			     (symbol-value (find-symbol "*FOREIGN-LIBRARY-SEARCH-PATHS*"
							:clsql-sys)))
		    (asdf:oos 'asdf:load-op 'clsql-mysql))

It appears, now, that my comment is not correct. The idea is that I  
want to load all the systems from :depends-on, which includes clsql.  
Then I want to set up clsql-sys:*foreign-library-search-paths* to  
include the correct version of the MySQL libraries. Finally, I want to  
load the mysql components of clsql.

Does anyone have advice on the Right Way (or even just a good way) to  
do this?

Thanks,
(Continue reading)

Nikodemus Siivola | 8 Dec 2008 19:23
Gravatar

Re: How do I replace my broken ':perform' forms?

On Mon, Dec 8, 2008 at 6:13 PM, Thom Goodsell <thom.goodsell <at> mac.com> wrote:

>   :perform (load-op :before (op c)
>                    ;; the before method runs after dependencies are loaded,
>                    ;; but before the components are loaded, so clsql-mysql is
> available
>                    (pushnew #p"/usr/local/mysql/lib/"      ; local development
>                             (symbol-value (find-symbol "*FOREIGN-LIBRARY-SEARCH-PATHS*"
>                                                        :clsql-sys)))
>                    (asdf:oos 'asdf:load-op 'clsql-mysql))

I would probably just use

  (defsystem ...
    :depends-on (:clsql-mysql)
    ...)

and leave search path configuration outside the system definition
file. (It's not going to be portable between different installations
anyways.)

Just document the fact that mysql libraries need to be set up right
(in LD_LIBRARY_PATH), or by user requiring :clsql-sys and pushing the
path onto *F-L-S-P* prior to trying to use your system.

(How do CLSQL users generally configure it? Is there maybe a
.clsql.lisp you can stick in $HOME, or something like that?)

Cheers,

(Continue reading)

Robert Goldman | 8 Dec 2008 17:47

Re: How do I replace my broken ':perform' forms?

Thom Goodsell wrote:
> Sorry if this has been covered, or if it's just really obvious, but I  
> couldn't find anything helpful in the archives.
> 
> I recently (i.e., about 15 minutes ago) got a new version of asdf.lisp  
> when I updated my copy of ccl, and it broke a behavior I've been  
> using. I *believe* that I was using the behavior incorrectly, and that  
> the change was a bugfix, though I could be misunderstanding the svn  
> logs.
> 
> In my defsystem, I have the following bit of code:
> 
>    :perform (load-op :before (op c)
> 		    ;; the before method runs after dependencies are loaded,
> 		    ;; but before the components are loaded, so clsql-mysql is  
> available
> 		    (pushnew #p"/usr/local/mysql/lib/"      ; local development
> 			     (symbol-value (find-symbol "*FOREIGN-LIBRARY-SEARCH-PATHS*"
> 							:clsql-sys)))
> 		    (asdf:oos 'asdf:load-op 'clsql-mysql))
> 
> It appears, now, that my comment is not correct. The idea is that I  
> want to load all the systems from :depends-on, which includes clsql.  
> Then I want to set up clsql-sys:*foreign-library-search-paths* to  
> include the correct version of the MySQL libraries. Finally, I want to  
> load the mysql components of clsql.
> 
> Does anyone have advice on the Right Way (or even just a good way) to  
> do this?
> 
(Continue reading)

Thom Goodsell | 10 Dec 2008 15:35
Picon
Gravatar

Re: How do I replace my broken ':perform' forms?


On Dec 8, 2008, at 11:47 AM, Robert Goldman wrote:

> Thom Goodsell wrote:
>> Sorry if this has been covered, or if it's just really obvious, but I
>> couldn't find anything helpful in the archives.
>>
>> I recently (i.e., about 15 minutes ago) got a new version of  
>> asdf.lisp
>> when I updated my copy of ccl, and it broke a behavior I've been
>> using. I *believe* that I was using the behavior incorrectly, and  
>> that
>> the change was a bugfix, though I could be misunderstanding the svn
>> logs.
>>
>> In my defsystem, I have the following bit of code:
>>
>>   :perform (load-op :before (op c)
>> 		    ;; the before method runs after dependencies are loaded,
>> 		    ;; but before the components are loaded, so clsql-mysql is
>> available
>> 		    (pushnew #p"/usr/local/mysql/lib/"      ; local development
>> 			     (symbol-value (find-symbol "*FOREIGN-LIBRARY-SEARCH-PATHS*"
>> 							:clsql-sys)))
>> 		    (asdf:oos 'asdf:load-op 'clsql-mysql))
>>
>> It appears, now, that my comment is not correct. The idea is that I
>> want to load all the systems from :depends-on, which includes clsql.
>> Then I want to set up clsql-sys:*foreign-library-search-paths* to
>> include the correct version of the MySQL libraries. Finally, I want  
(Continue reading)


Gmane