From j@me@@|@he@ter @end|ng |rom gm@||@com  Fri Aug  9 16:23:47 2019
From: j@me@@|@he@ter @end|ng |rom gm@||@com (Jim Hester)
Date: Fri, 9 Aug 2019 10:23:47 -0400
Subject: [Rd] Underscores in package names
In-Reply-To: <4f049dfc-5e33-68d9-6946-19766b54eb44@gmail.com>
References: <CAD6tx94RYHAWCFVuMgMXLUUFG3BgKSCfs3Un=SStQ7rCtgAUSQ@mail.gmail.com>
 <4f049dfc-5e33-68d9-6946-19766b54eb44@gmail.com>
Message-ID: <CAD6tx95E2cu2SE4-3JS8DJH+LMFwpNCXu1B-AZmde-mDB_Y_WA@mail.gmail.com>

To be clear, I'd be happy to contribute code to make this work, with
the changes mentioned by Duncan and elsewhere in the codebase, if
someone on R-core was interested in reviewing it.

Jim

On Thu, Aug 8, 2019 at 11:05 AM Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
>
> On 08/08/2019 10:31 a.m., Jim Hester wrote:
> > Are there technical reasons that package names cannot be snake case?
> > This seems to be enforced by `.standard_regexps()$valid_package_name`
> > which currently returns
> >
> >     "[[:alpha:]][[:alnum:].]*[[:alnum:]]"
> >
> > Is there any technical reason this couldn't be altered to accept `_`
> > as well, e.g.
> >
> >    "[[:alpha:]][[:alnum:]._]*[[:alnum:]]"
> >
> > I realize that historically `_` has not always been valid in variable
> > names, but this has now been acceptable for 15+ years (since R 1.9.0 I
> > believe). Might we also allow underscores for package names?
>
> The tarball names separate the package name from the version number
> using an underscore.  There is code that is written to assume there is
> at most one underscore, e.g. .check_package_CRAN_incoming in
> src/library/tools/R/QC.r.
>
> That code could be changed, but so could the proposed package name...
>
> Duncan Murdoch



[Rd] Underscores in package names
Jim Hester