[asdf-devel] compile-with-nicknames
Gábor Balázs
gabalz at gmail.com
Sun Oct 16 20:25:21 UTC 2011
hY,
I would like to propose a kind of an enhancement to the ASDF
functionalities.
So there is a problem with package nicknames that they have to be unique. So
using the :nicknames option in a package definition can cause
"uncorrectable" collisions. On the other hand, by not doing so, one has to
use fully qualified package names (eg. :com.gigamonkeys.macro-utilities)
during library development which makes the code completely unreadable (in my
opinion at least).
So there would be a possibility in asdf to at least partially handle this
problem. It would be nice to define temporary nicknames for the compilation
time. At the moment, it is possible by the :perform asdf option. So one can
place and remove the nicknames by :perform (compile-op :before ...) and
:perform (compile-op :after) options. Often it would be desirable, to do so
for every asdf compilation unit, but there is no easy way to do so yet.
Note: one has to define the nickname operators for every compilation unit in
which it is used, otherwise the exclusive recompilation of this unit will
produce an error (which would make development difficult).
The other problem with this approach is when a compilation fails, the
nicknames won't be cleared. However it is not a big problem for a
development process, and otherwise it should not happen.
Defining the :perform options for each asdf unit, is pretty ugly. So it is
nice to have a script at least which walks over all compilation units and
sets the perform options.
But there would be a nicer way, and this is the proposal. What about a new
asdf option (eg :compile-with-nicknames), which could look like something
this?
(defsystem my-system
:depends-on ("package-1" "package-2" "package-3" ...)
:compile-with-nicknames (("package-1" "pckg-1")
("package-3" "pckg-3"))
:components (...))
I think this approach nicely works in a "clear" environment for non-parallel
compilation when there are no insane nickname requests.
The "clear" environment assumption can be relaxed to say that the user
hasn't defined any nicknames which causes collisions for any necessary
compilations.
Or if you know a better way to handle this problem, I would be happy to hear
about that...
Thanks,
`bg`
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20111016/7b9d67b7/attachment.html>
More information about the asdf-devel
mailing list