Hi,
I was wondering if I could ask for some advice.
I'm currently working with lisp-zmq which uses grovel to create the CFFI declarations. This is fine and works great on my development box, but I would prefer not to require that other developers in my organization also run grovel.
As such, I would like to be able to check in the files that were generated by grovel and have these automatically loaded in other environments.
This already works! However, my problem is that in our environment, ASDF compiles fasls into a default user output path and then loads them (something like ~/.cache/common-lisp/...). I will not have any control over the content at this location prior to loading the lisp-zmq system for the first time, and so there isn't really anywhere that I can automatically deploy the pre-generated grovel files.
My questions are: * Is there any way to specify using defsystem that a local fasl should be used? * Are there any suggestions that anybody can give me to solve my problem. Perhaps I should precompile the lisp-zmq system and load that instead.
I'd rather not change any of the behavior on anybody's development environment, so (asdf:disable-output-translations) isn't an option. I'd like to have this self contained as much as possible.
Many Thanks,
Kevin
: Yellow Dog yellowdog967@gmail.com I'm currently working with lisp-zmq which uses grovel to create the CFFI declarations. This is fine and works great on my development box, but I would prefer not to require that other developers in my organization also run grovel.
As such, I would like to be able to check in the files that were generated by grovel and have these automatically loaded in other environments.
This already works! However, my problem is that in our environment, ASDF compiles fasls into a default user output path and then loads them (something like ~/.cache/common-lisp/...). I will not have any control over the content at this location prior to loading the lisp-zmq system for the first time, and so there isn't really anywhere that I can automatically deploy the pre-generated grovel files.
My questions are:
- Is there any way to specify using defsystem that a local fasl should be
used?
There is always a way for everything. You could change some input-files or output-files or translate method to check for a shared cache, and use it if it's up to date.
- Are there any suggestions that anybody can give me to solve my problem.
Perhaps I should precompile the lisp-zmq system and load that instead.
Have you tried ASDF3's binary-op? It should help you get what you want: a single fasl for your system and a .asd file to load it. Or you could somehow preload it and use register-preloaded-system.
I'd rather not change any of the behavior on anybody's development environment, so (asdf:disable-output-translations) isn't an option. I'd like to have this self contained as much as possible.
It's hard to tell without deeper knowledge of your company's setup.
I'd like to recommend you use Google's build system instead, but it's not (yet) available to the public.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Free Market is not the end of every large-scale economical problem; but it's the beginning to any long-term solution to anyone of them.
Free Software is not the end of every large-scale software problem; but it's the beginning to any long-term solution to anyone of them.
Freedom is not the end of every large-scale problem; but it's the beginning to any long-term solution to anyone of them. — Faré
Hi François,
I tried out the binary-op and that works, the only thing I didn't like about it is that dependent libraries must also be precompiled-systems. The suggestion on creating my own operation seems like a little bit of overkill for what I want to do.
Another possibility that occurred to me is to create a new file, load-grovel.lisp that just falls (load) on the fasl directly and thus bypasses the defsystem loader. The defsystem would list this file instead of the grovel.lisp file. Cons are that I am modifying a third-party library, but I think that's inevitable no matter which solution I choose.
Many Thanks for all of the suggestions! They were very helpful.
Kevin
On Wed, Dec 11, 2013 at 6:04 PM, Faré fahree@gmail.com wrote:
: Yellow Dog yellowdog967@gmail.com I'm currently working with lisp-zmq which uses grovel to create the CFFI declarations. This is fine and works great on my development box, but I would prefer not to require that other developers in my organization also run grovel.
As such, I would like to be able to check in the files that were
generated
by grovel and have these automatically loaded in other environments.
This already works! However, my problem is that in our environment, ASDF compiles fasls into a default user output path and then loads them (something like ~/.cache/common-lisp/...). I will not have any control
over
the content at this location prior to loading the lisp-zmq system for the first time, and so there isn't really anywhere that I can automatically deploy the pre-generated grovel files.
My questions are:
- Is there any way to specify using defsystem that a local fasl should be
used?
There is always a way for everything. You could change some input-files or output-files or translate method to check for a shared cache, and use it if it's up to date.
- Are there any suggestions that anybody can give me to solve my problem.
Perhaps I should precompile the lisp-zmq system and load that instead.
Have you tried ASDF3's binary-op? It should help you get what you want: a single fasl for your system and a .asd file to load it. Or you could somehow preload it and use register-preloaded-system.
I'd rather not change any of the behavior on anybody's development environment, so (asdf:disable-output-translations) isn't an option. I'd like to have this self contained as much as possible.
It's hard to tell without deeper knowledge of your company's setup.
I'd like to recommend you use Google's build system instead, but it's not (yet) available to the public.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Free Market is not the end of every large-scale economical problem; but it's the beginning to any long-term solution to anyone of them.
Free Software is not the end of every large-scale software problem; but it's the beginning to any long-term solution to anyone of them.
Freedom is not the end of every large-scale problem; but it's the beginning to any long-term solution to anyone of them. — Faré
Hi Anton,
Interesting suggestion! I'll try it out. It still means changing the asd file that came with the package, but I think that's inevitable.
Thanks for the post!
Kevin
On Thu, Dec 12, 2013 at 9:38 PM, Anton Vodonosov avodonosov@yandex.ruwrote:
Why do you consider fasl files? As far as I understand, grovel generates .lisp file first, and only after that this Lisp code is compiled to .fasl.
So you could save the generated .lisp file and add it as any other .lisp file to your ASDF system.
But note, this might be non-portable. The lisp code is generated from C includes, which may have different meaning on different platforms (different sizes of integer, char and structure types, refer to different functions, etc).
If you distribute your ASDF system to the same platforms, you can distribute it together with pre-generated grovel output. But if you distribute it to different platforms, the user still may need to run grovel himself.
Best regards,
- Anton