Skip to content

rcmdcheck::check() fails on Windows when Rtools is not installed #174

@maxsutton

Description

@maxsutton

Description

rcmdcheck::check() now throws an error and stops checking the package on Windows when Rtools is not installed.

Previous working behaviour

Previously (rcmdcheck v1.3.3), check() would issue a warning about missing Rtools, but still complete the checking of the package.

Cause

The cause seems to be the pkgbuild::local_build_tools() call introduced for #111 , which was seemingly done for convenience.

Here is the line in the latest version, where the issue remains:

pkgbuild::without_cache(pkgbuild::local_build_tools())

local_build_tools() has an argument required which is TRUE by default and is called as such. The description of the required argument is:

If TRUE, and build tools are not available, will throw an error. Otherwise will attempt to run code without them

Possible solutions

There are a couple of ways that I've thought of to fix this regression. There are likely others:

  • rcmdcheck::check() could call local_build_tools(required = FALSE), but I don't know if this would break the new intended behaviour introduced in Use pkgbuild::with_build_tools() in rcmcheck #111.

  • An option could be added which would set the required argument to false: e.g. options("rcmdcheck.rtools.required" = FALSE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions