Hello.
I use SLIME with SBCL; I have two instances of SBCL in my system (sometimes more); one is system-wide installation, second is project-local, both are of the same version, but with possibly different features. Both use SLIME (project-local version loads swank by hand). Problem is that system-wide SBCL is threaded, and project-local one is not; thus, .fasl files generated by one are unreadable to other. I don't want project-local SBCL and SLIME to mess with my system-wide settings and I'd prefer to have it leave any files outside project dir alone.
I made a small patch against current CVS to swank to make it possible to keep FASL files in source directory; now it is turned on by pushing :SWANK-FASL-IN-PLACE to *FEATURES*; I couldn't think of better way of signalling swank-loader.lisp that we want to have FASL with sources before loading it (i.e. before (DEFPACKAGE)s and (DEFVAR)s). If this way is ok, please apply this patch; I don't insist on this particular way of communicationg with loader (it seems kludgy), if there is better one, please treat this post as yet another feature request.
* Maciek Pasternacki [2006-01-10 01:07+0100] writes:
I made a small patch against current CVS to swank to make it possible to keep FASL files in source directory; now it is turned on by pushing :SWANK-FASL-IN-PLACE to *FEATURES*; I couldn't think of better way of signalling swank-loader.lisp that we want to have FASL with sources before loading it (i.e. before (DEFPACKAGE)s and (DEFVAR)s). If this way is ok, please apply this patch; I don't insist on this particular way of communicationg with loader (it seems kludgy), if there is better one, please treat this post as yet another feature request.
I changed the loader so that there's a new entry point: load-swank which takes the fasl directory as optional argument.
Here's an example how you could use it:
(setq slime-lisp-implementations '((clisp ("clisp" "-q")) (clisp2 ("clisp" "-q") :init clisp2-init)))
(defun clisp2-init (port-file _) (format "(load %S) (swank-loader:load-swank :fasl-directory %S) (swank:start-server %S)\n" (concat slime-path slime-backend) "/tmp/fasl" port-file))
`M-- M-x slime clisp2' will load swank an put the compiled files in the /tmp/fasl directory.
Helmut.
On Boomtime, Chaos 17, 3172 YOLD, Helmut Eller wrote:
I changed the loader so that there's a new entry point: load-swank which takes the fasl directory as optional argument.
Here's an example how you could use it:
Thanks. I intend to use it rather on Lisp side (I connect Emacs with M-x slime-connect) but this patch is fine for me. If you also added parameter with Slime source directory pathname (patch attached), it would be perfect -- I want to keep fasl files just in Slime source dir, and (swank-loader:load-swank :fasl-directory swank-loader:*slime-source-directory*) would be the easiest way to specify it.