Is it possible to load multiple versions of the same system?
Ian Tegebo
ian.tegebo at gmail.com
Fri Apr 29 00:05:38 UTC 2016
I've been reading the manual, papers, and slides on ASDF and XCVB. As a
frame of reference, I prefer the qualities exhibited by Racket's
implementation of modules. I was disappointed both to see XCVB bitrot, and
then to see that a major ASDF overhaul would be necessary.
That said, ignoring Racket/ASDF/XCVB, I'm curious about how loading
multiple versions of the same system could possibly be implemented in
Common Lisp (CL). I'm sure people have thought about it, but I'm having a
hard time finding references. I'm afraid I've been skimming some of the
material linked off of the ASDF and XCVB pages, so forgive me if I missed
something.
On the JVM, there's the notion of "classloader" that can be used to load
multiple versions of the same class. Unfortunately, the only approach I
can imagine is to use some form of package renaming. There appear to be
several variations floating around [1], and the trade-offs aren't clear to
me.
If I think about how it might be done in ASDF, it seems like it would
require a series of things:
* intercept package definition to rename with version
* :around-compile to handle some kind of per-system aliasing so code
doesn't have to change
* teaching dependency resolution how to find the renamed, versioned
packages/systems
But that's a wild guess. And the more I think about it, I wonder what to
do about some code that uses strings to put together a symbol - I don't
think symbol-macrolet can help there.
[1] implementation-specific package-local-nicknames, :around-compile in
ASDF, "pseudonyms"
--
Ian Tegebo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20160428/b5f9e116/attachment.html>
More information about the asdf-devel
mailing list