Skip to content

Remove conditional registration on tune version #121

@DavisVaughan

Description

@DavisVaughan

workflows/R/zzz.R

Lines 10 to 23 in 84ae7af

# Can't use `rlang::is_installed()` at all, as that doesn't work when
# called from `.onLoad()` for some reason. Instead, rely on `packageVersion()`
# erroring when the package isn't installed.
has_at_least_version <- function(pkg, version) {
tryCatch(
expr = utils::packageVersion(pkg) >= version,
error = function(cnd) FALSE
)
}
if (has_at_least_version("tune", "0.1.3.9001")) {
# `required_pkgs.workflow()` moved from tune to workflows
vctrs::s3_register("generics::required_pkgs", "workflow", required_pkgs_workflow)
}

Since many tune versions have gone by since then

Metadata

Metadata

Assignees

No one assigned

    Labels

    upkeepmaintenance, infrastructure, and similar

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions