[asdf-devel] compile-with-nicknames

Faré fahree at gmail.com
Sun Oct 16 21:52:08 UTC 2011


2011/10/16 Gábor Balázs <gabalz at gmail.com>:
> 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...
>
Dear Gábor,

you describe a common problem and a shared frustration of many CL developers.
However, the problem is not limited to package nicknames, and instead
I would prefer something more general:
the ability to wrap something around compilation,
essentially an advice around compile-file*.
I recently added this feature to xcvb, so that it may compile ironclad,
that uses such a wrapper (an :around method on perform)
to bind the *readtable* and muffle some warnings around compilation.

And so, I propose something more like:

(defun call-with-my-nicknames (thunk)
  (with-package-nicknames
    (("package-1" "pckg-1")
     ("package-3" "pckg-3"))
    (funcall thunk)))

(defsystem my-system
  :depends-on ("system-1" "system-2" "system-3" ...)
  :around-compile call-with-my-nicknames
  :components (...))

What do you think?

Of course, you'd have to use ASDF 2.018 or later for that.
Or maybe it's time to call it ASDF 2.18 instead?

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org




More information about the asdf-devel mailing list