hi,
i'm thinking about adding a version check when connecting to a swank server to ensure that slime.el and swank.lisp are in-synch. this would remove the, admitedly rare, errors whan the two are out of synch (this can happen when running a local slime against a remote lisp or when swank has be built into the image and isn't reloaded each time the lisp is started). however this would require that everytime a change is commited people must remeber to update the version number. is this worth the overhead?
Marco Baringer wrote:
hi,
i'm thinking about adding a version check when connecting to a swank server to ensure that slime.el and swank.lisp are in-synch. this would remove the, admitedly rare, errors whan the two are out of synch (this can happen when running a local slime against a remote lisp or when swank has be built into the image and isn't reloaded each time the lisp is started). however this would require that everytime a change is commited people must remeber to update the version number. is this worth the overhead?
I have run into errors from this on a few occasions. However a lot of the time the two can be a little bit out of sync and never cause problems... maybe just a warning?
More complex idea: Code that compares major version (updated whenever there is a release), and additionally compare cvs version numbers if the cvs folder exists? Is that an easy question to answer with cvs?
Marco Baringer mb@bese.it writes:
i'm thinking about adding a version check when connecting to a swank server to ensure that slime.el and swank.lisp are in-synch. this would remove the, admitedly rare, errors whan the two are out of synch (this can happen when running a local slime against a remote lisp or when swank has be built into the image and isn't reloaded each time the lisp is started). however this would require that everytime a change is commited people must remeber to update the version number. is this worth the overhead?
I think so, having been bitten by this myself. ,-)
...though I'm not sure that it need to be incremented for _every_ commit, since often enough what passes over the wire is unaffected.
Also, FWIW, SBCL has had good experience with version.lisp-expr, which gets incremented for each commit.
Cheers,
-- Nikodemus Schemer: "Buddha is small, clean, and serious." Lispnik: "Buddha is big, has hairy armpits, and laughs."
Marco Baringer mb@bese.it writes:
hi,
i'm thinking about adding a version check when connecting to a swank server to ensure that slime.el and swank.lisp are in-synch. this would remove the, admitedly rare, errors whan the two are out of synch (this can happen when running a local slime against a remote lisp or when swank has be built into the image and isn't reloaded each time the lisp is started). however this would require that everytime a change is commited people must remeber to update the version number. is this worth the overhead?
what about just using the first line of ChangeLog? though this gets updated more often than the wire protocl changes it doesn't require any extra work on the part of slime contcributors. what's worse? spurious protocol mismatch errors or having to update slime too often?
what about just using the first line of ChangeLog? though this gets updated more often than the wire protocl changes it doesn't require any extra work on the part of slime contcributors. what's worse? spurious protocol mismatch errors or having to update slime too often?
you could then #.(file-write-date-of-slime.el) somwhere in swank.lisp, but that brings the same problem: it's will much more often signal then actually reasonable.
but if it's only a big fat warning then imho it's fine...
* Marco Baringer [2006-10-26 12:07+0200] writes:
Marco Baringer mb@bese.it writes:
hi,
i'm thinking about adding a version check when connecting to a swank server to ensure that slime.el and swank.lisp are in-synch. this would remove the, admitedly rare, errors whan the two are out of synch (this can happen when running a local slime against a remote lisp or when swank has be built into the image and isn't reloaded each time the lisp is started). however this would require that everytime a change is commited people must remeber to update the version number. is this worth the overhead?
what about just using the first line of ChangeLog? though this gets updated more often than the wire protocl changes it doesn't require any extra work on the part of slime contcributors. what's worse? spurious protocol mismatch errors or having to update slime too often?
We had implemented that for some time (around revision swank.lisp:1.150), but Luke removed it. Probably because it didn't work so well.
It's a bit problematic to determine the proper filenames (at compile time). It also means that the source files should be recompiled after updates to the ChangeLog, even if the source didn't change. Our loader uses the time-stamp of the ChangeLog for the fasl directory name, so it recompiles automatically (at least the CL files).
I think that Emacs should ask how to continue on a version mismatch or abort. It wouldn't be worth to add version numbers just for another warning.
Helmut.
Move all functions affecting the wire protocol to separate files wire.lisp, and wire.el, and make the version number the MD5 sum of those files.
Haha, only serious ;-)
-- Nikodemus Schemer: "Buddha is small, clean, and serious." Lispnik: "Buddha is big, has hairy armpits, and laughs."