From murdoch.duncan at gmail.com  Sat May 20 11:50:52 2017
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Sat, 20 May 2017 05:50:52 -0400
Subject: [Rd] What to do re 'replacing previous import' errors
In-Reply-To: <CAOVYLHeoFeOKQdYa19FocOKCwnHu+K8+O-2+8zoPkXwOitSZNA@mail.gmail.com>
References: <CAOVYLHeoFeOKQdYa19FocOKCwnHu+K8+O-2+8zoPkXwOitSZNA@mail.gmail.com>
Message-ID: <3f532845-4835-6059-ce6e-6361367b2801@gmail.com>

On 20/05/2017 5:14 AM, Ronald Barry wrote:
> After looking at a few discussions of this problem online, I can't seem to
> find a good solution.  When running a CHECK on a package I'm working on
> (which passed all tests a few years ago), I get the following 'significant
> warning':
>
> Warning: replacing previous import ?spam::tail? by ?utils::tail? when
> loading ?latticeDensity?
>   Warning: replacing previous import ?spam::head? by ?utils::head? when
> loading ?latticeDensity?
>
> Humorously enough, I don't use the 'tail' function anywhere.  It seems to
> be some sort of namespace clash between spam and utils.  In my namespace,
> I'm importing spam and utils.  Is there a fix for this problem?  Thanks.

It's generally a good idea to import only the functions you need, not 
everything. If latticeDensity used

importFrom(utils, foo, bar)

etc., then it would only get a clash if you explicitly imported two 
things with the same name.  (You can do a rename when importing if you 
really want to do that.)

Duncan Murdoch



[Rd] What to do re 'replacing previous import' errors
Duncan Murdoch