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

Warning regarding error when calling from package code. #2

Open
krlmlr opened this issue Dec 11, 2020 · 2 comments
Open

Warning regarding error when calling from package code. #2

krlmlr opened this issue Dec 11, 2020 · 2 comments

Comments

@krlmlr
Copy link

krlmlr commented Dec 11, 2020

assignInNamespace should not be used in final code, and will in future throw an error if called from a package. Already certain uses are disallowed.

This warning has been around since 2011, apparently without any action: wch/r-source@91f910d.

I wonder if we should at least hide the call to assignInNamespace() so that it's more difficult to detect with automated checks.

@nbenn
Copy link
Owner

nbenn commented Dec 11, 2020

Tbh, I was expecting a bit of pushback when I submitted to CRAN. But I pointed out in my cran-comments.md that I'm using utils::assignInNamespace() and they were fine with my reasoning. I do not have a lot of experience with this kind of issue though. Does it happen often that they change their minds on things like that?

@sckott
Copy link

sckott commented Dec 11, 2020

Interested to see how this turns out if you use assignInNamespace - I've been wanting to use it in some pkgs, but just assumed CRAN wouldn't accept a pkg with it. Odd there's so many pkgs on CRAN using it if it's not allowed

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

3 participants