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

The use of unexported/internal functions called via ::: is not allowed by CRAN #70

Closed
nevrome opened this issue Oct 16, 2018 · 4 comments

Comments

@nevrome
Copy link
Collaborator

nevrome commented Oct 16, 2018

We get a new NOTE in the check results:

* checking dependencies in R code ... NOTE
Unexported objects imported by ':::' calls:
  ‘usethis:::done’ ‘usethis:::field’ ‘usethis:::git_uncommitted’
  ‘usethis:::todo’ ‘usethis:::value’
  See the note in ?`:::` about the use of this operator.

We have four options to deal with this:

  1. Ignore it. A CRAN release would be difficult though.
  2. Contact the usethis package authors and ask them to export these functions.
  3. Copy the function source code (and cite the author).
  4. This nasty workaround: https://stat.ethz.ch/pipermail/r-devel/2013-August/067210.html
@nevrome nevrome mentioned this issue Oct 16, 2018
@benmarwick
Copy link
Owner

Yes, thanks for raising this, and summarizing the options so nicely. Should we take a vote about what do to?

@nevrome
Copy link
Collaborator Author

nevrome commented Oct 17, 2018

Haha - now I'm really curious about the result of a survey.

I personally suggest to copy/reimplement the code. I believe all of these five functions are very small and simple helpers. And as far as I remember rrtools already contains initially foreign code.

@joeroe
Copy link

joeroe commented Jan 16, 2019

A potential headache with copying the functions is that usethis is GPL licensed. Google says that reusing GPL code under an MIT license isn't kosher. I think you'd have to dual-license the entire package as MIT and GPL (keeping the two parts separate), or switch to GPL.

Fortunately, since this was opened, usethis has decided to export its UI functions, including done(), todo(), field() and value(). See r-lib/usethis/issues/308. So we could just switch to using the exported version on usethis's next release.

That just leaves usethis:::git_uncommitted() to deal with.

@benmarwick
Copy link
Owner

Thanks, we're now using the newly exported functions from usethis, and we have a local custom version of git_uncommitted()

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