emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proper namespaces in Elisp


From: João Távora
Subject: Re: Proper namespaces in Elisp
Date: Tue, 5 May 2020 22:29:52 +0100

On Tue, May 5, 2020 at 5:41 PM Vladimir Sedach <address@hidden> wrote:
> João Távora <address@hidden> writes:
> >> 1. Library ABC version 1 does not define or export FUNC1.
> >> 2. Package XYZ :uses ABC, importing all of ABC's exported symbols.
> >> 3. Package XYZ defines FUNC1 for internal use. There is no problem.
> >> 4. Library ABC version 1.1 defines and exports FUNC1.
> >> 5. When XYZ is loaded with ABC version 1.1, XYZ unintentionally
> >>    overrides the definition of FUNC1 for all users of ABC.
> >
> > In which implementation of CL? In the ones I know, step 5
> > will get you an error, exactly describing the conflict,
> > which you handle interactively or automhatically.
>
> That (NAME-CONFLICT error) only happens at run-time if you have ABC
> version 1 already loaded, load XYZ, then load ABC version 1.1.
>
> If you install XYZ, and ABC version 1.1 is pulled in as a dependency,
> the only thing you might see is a warning that FUNC1 is being
> re-defined.

Ah, but that wasn't your recipe 1-5 step, was it?  Anyway, it
sounds like you're describing dependencies failure. The
author of XYZ should probably say that his package
requires ABC 1.0. Or start paying attention to warnings. Or
stop `:USE` of packages of systems whose code he doesn't
control. This is a problem that happens in other languages.

Also note: I don't know what you use to "pull in dependencies",
but quicklisp in particular won't let this happen, since it works
in distributions. Packages within a dist are compatible between
them, that is checked by automated tests. Much like GNU
ELPA.

So the things you think happen, really just don't happen IRL.

João



reply via email to

[Prev in Thread] Current Thread [Next in Thread]