[Rd] Consider getNamespaceVersion() returning a numeric_version

Dirk Eddelbuettel
Thu, 17 Oct 2024 13:00:01 -0000

On 17 October 2024 at 13:42, Tim Taylor wrote:
| I mean the `numeric_version` object not a numeric (double/int).
| Basically to protect me from myself I'd prefer not to have to remember
| to wrap `getNamespaceVersion()` with `as.package_version()`.

That would be a breaking change. I suspect you would need to supply stronger
motivation.

Note that these days you can add arbitrary fields to DESCRIPTION so you
already can add a new field that you can the require to be a value from an
integer sequence (or a numeric if you prefer).

| I suspect a grep of CRAN may highlight others who are erroneously
| comparing character objects rather than a comparison between a
| `numeric_version` object and a character.

Sure but still a user-level bug though. Usually those get fixed them on that
side.

(And to be clear, I have nothing against your proposal per se and like it in
the abstract. I am just trying to help think through what it may entail.)

Dirk

--
dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org