Skip to content

CRAN failure with upcoming changes to utils::packageVersion() #192

Closed
@simonpcouch

Description

@simonpcouch

A note on upcoming changes to packageVersion() from CRAN folks needs changes submitted soon. With the change "Have packageVersion() warn if not found and always return a (possibly NA) numeric version," they see:

packages are no longer installable because their startup code assumes that
packageVersion() throws an error in the not found case, and hence e.g.

should_register_tune_args_method <- tryCatch(
expr = utils::packageVersion("tune") >= "0.1.6.9001",
error = function(cnd) TRUE
)
if (should_register_tune_args_method) {
...

no longer works as intended.

...

We thus reverted the change for the time being, but can you please
change your package code to work with the documented behavior of
packageVersion()?

Personally, I would use something like

should_register_tune_args_method <-
(nzchar(system.file(package = "tune")) &&
utils::packageVersion("tune") >= "0.1.6.9001")

We would very much appreciate if you could make the changes as quickly
as possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions