Skip to content

Copying functions from rlang now fixes version on installation #2

@JoFAM

Description

@JoFAM

If you do the following:

typed_as_name <- rlang::enquo

the function code is copied from rlang into your own package at time of installation. That also means that when an updated version of rlang is installed by the user, your function typed_as_name still uses the old rlang::enquo code. The prefered (and documented) way to get around this issue, is to wrap it in a function (see eg explanation in Writing R extensions:

typed_as_name <- function(arg) rlang::enquo(arg)

But in that case typed_as_name won't work any longer due to dplyr::mytate_impl() not being able to process arg correctly. Same happens when you try with

typed_as_name <- function(arg) eval.parent(rlang::enquo(arg))

Given the nature of the function rlang::enquo, this issue is pretty hard to get around. Then again, these rlang functions are unlikely to change so this shouldn't really be a problem in everyday use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions