8000 Unfriendly error for '@include zoo' instead of '@import zoo' · Issue #1497 · r-lib/roxygen2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Unfriendly error for '@include zoo' instead of '@import zoo' #1497
Closed
@MichaelChirico

Description

@MichaelChirico

The logic for processing @include could go for a sanity check. Using @include zoo by mistake gives some hard-to-trace error:

Warning in normalizePath(file.path(path, "R", collate)) :
  path[3]="...R/zoo": No such file or directory
Warning in file(con, "r") :
  cannot open file '...R/zoo': No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: Main ... parse_package -> lapply -> FUN -> read_lines -> <Anonymous> -> file
In addition: Warning message:
'Collate' must contain a list of .R files

In retrospect this makes sense, but it took quite some time to debug. Is it valid to @include a non-R file? Couldn't we check file.exists() for @include directives to prevent this with a friendlier error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0