eddelbuettel / bh

R package providing Boost Header files
85 stars 32 forks source link

Small "feature" request #40

Closed thk686 closed 7 years ago

thk686 commented 7 years ago

Would it be possible to include a single R function like "bh_version" or something so that we can put the package into the "Include:" directive in the DESCRIPTION file? This is to work around CRAN checks. There are cases where BH is needed for compiling test code and it seems to work if BH is Included, but not always if it is in Suggests.

eddelbuettel commented 7 years ago

I don't understand.

You need it in LinkingTo. Add it there -- as discussed on r-package-devel, the rest may be your personal problem in how you drive Travis or alike.

Being header-only is a feature.

Brooke Anderson and I just wrote a long paper (focussed on add-on data packages) and dealing with Suggests. You can condition on a Suggested package being present, and you should. Else Depend on it.

eddelbuettel commented 7 years ago

The requireNamespace("BH") idiom works perfectly. Add the package to Suggests: and test for it.

thk686 commented 7 years ago

It was "feature" in quotes... I know it would be a hack. My problem is everything works perfectly (Travis, AppVeyor, R-devel build locally) until I submit to CRAN. Then it breaks without BH in Depends, which generates a NOTE.

On Wed, Feb 15, 2017 at 8:12 AM, Dirk Eddelbuettel <notifications@github.com

wrote:

I don't understand.

You need it in LinkingTo. Add it there -- as discussed on r-package-devel, the rest may be your personal problem in how you drive Travis or alike.

Being header-only is a feature.

Brooke Anderson and I just wrote a long paper (focussed on add-on data packages) and dealing with Suggests. You can condition on a Suggested package being present, and you should. Else Depend on it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eddelbuettel/bh/issues/40#issuecomment-280020550, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkLybm2xOfuryvyZM55JUF9FWhNCZ7Nks5rcwe2gaJpZM4MBwJm .

eddelbuettel commented 7 years ago

I wrote SUGGESTS not Depends. This is all in Writing R Extensions.

thk686 commented 7 years ago

On Wed, Feb 15, 2017 at 2:30 PM, Dirk Eddelbuettel <notifications@github.com

wrote:

I wrote SUGGESTS not Depends. This is all in Writing R Extensions.

I'm using Suggests. It works perfectly on all systems tried, except on my last CRAN submission. No idea why.

eddelbuettel commented 7 years ago

Not really my problem, is it; and nothing reproducible here for me to help you.