From ripley at stats.ox.ac.uk  Wed Feb  8 08:21:35 2006
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Wed, 8 Feb 2006 07:21:35 +0000 (GMT)
Subject: [Rd] Improve error message for bad NAMESPACE file?
In-Reply-To: <m2ek2ee5bo.fsf@ziti.local>
References: <m2ek2ee5bo.fsf@ziti.local>
Message-ID: <Pine.LNX.4.61.0602080720310.2578@gannet.stats>

On Tue, 7 Feb 2006, Seth Falcon wrote:

> If a user mis-types a directive in the NAMESPACE file, the error
> message is quite cryptic.  If it was possible to report the offending
> line/text that would likely give a valuable clue to the user.
>
> Try putting the following line in NAMESPACE
>
> foo("bar")
>
> Then R CMD INSTALL says,
>
> * Installing *source* package 'goodbye' ...
> ** R
> ** preparing package for lazy loading
> Error in gettext(domain, unlist(args)) : invalid 'domain' value
> Execution halted
> ERROR: lazy loading failed for package 'goodbye'

I suspect this line in namespace.R:

                }
                stop(gettextf("unknown namespace directive: %s", deparse(e)),
                     call. = FALSE, domain = FALSE)

Does domain=NA solve this?

>
>
>
>
>
> platform       powerpc-apple-darwin8.4.0
> arch           powerpc
> os             darwin8.4.0
> system         powerpc, darwin8.4.0
> status         Under development (unstable)
> major          2
> minor          3.0
> year           2006
> month          02
> day            05
> svn rev        37270
> language       R
> version.string Version 2.3.0 Under development (unstable) (2006-02-05 r37270)
>
>
>
> --
> + seth
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] Improve error message for bad NAMESPACE file?
Prof Brian Ripley