Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possibly unsafe calls: assignInNamespace on branch modsForLargeArchives #382

Closed
achubaty opened this issue Feb 26, 2024 · 2 comments
Closed

Comments

@achubaty
Copy link
Collaborator

checking R code for possible problems ... [27s/15s] NOTE (14.7s)
   Found the following possibly unsafe calls:
   Filereproducible/R/messages.R:
     assignInNamespace(ns = ns, ".messagePreProcessIndent", paste0(.messagePreProcessIndent, 
       val))
     assignInNamespace(ns = ns, ".messagePreProcessIndent", gsub(paste0(val, 
       "$"), "", .messagePreProcessIndent))
     assignInNamespace(ns = "reproducible", ".messagePreProcessIndent", 
       gsub(paste0(val, "$"), "", .messagePreProcessIndent))

Per the documentaiton:

They should not be used in production code (except perhaps assignInMyNamespace, but see the ‘Note’).

achubaty added a commit that referenced this issue May 9, 2024
allow updating (i.e., needed for `.message$PreProcessIndent`) without using `assignInNamespace`, which cannot be used in packages (#382)
@achubaty
Copy link
Collaborator Author

achubaty commented May 9, 2024

this should be resolved 19a20b7, which adds a new internal package environment to store all internal messages and message-generating functions.

@eliotmcintire
Copy link
Contributor

Thanks @achubaty. This looks great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants