Skip to content

Loading package fails on setOldClass #568

Closed
@renozao

Description

@renozao

For the record only, because I realized that things works fine with devtools::document.

If the package to document contains a call to setOldClass, then roxygenise fails with the following error:

Loading required package: roxygen_devtest
Error in .requirePackage(package) : 
  unable to find required packageroxygen_devtestIn addition: Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package calledroxygen_devtest

traceback shows:

13: stop(gettextf("unable to find required package %s", sQuote(package)), 
        domain = NA)
12: .requirePackage(package)
11: makeExtends(name, what, slots = slots, classDef2 = whatClassDef, 
        package = package)
10: makeClassRepresentation(Class, properties, superClasses, prototype, 
        package, validity, access, version, sealed, where = where)
9: setClass(cl, contains = c(prevClass, "VIRTUAL"), where = where)
8: setOldClass("A")
7: eval(expr, envir, enclos)
6: eval(expr, envir = envir)
5: FUN(X[[i]], ...)
4: lapply(paths, sys_source, envir = env, fileEncoding = desc$Encoding %||% 
       "UTF-8")
3: load_code(base_path)
2: parse_package(base_path, load_code, registry, options)
1: roxygen2::roxygenise("~/projects/tmp/A")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions