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

ARROW-5488: [R] bundling headers with the R package #4479

Closed

Conversation

romainfrancois
Copy link
Contributor

configure no longer need to deal with PKG_CFLAGS because the headers are coming from inst/include

This is an alternative experiment to #4471

@romainfrancois romainfrancois added WIP PR is work in progress Component: R labels Jun 5, 2019

NAMESPACE <- environment()

.onLoad <- function(libname, pkgname) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jimhester @jjallaire I'm doing this, inspired from what RcppParallel does, so that I could load the package library after e.g. the dependent Arrow and Parquet libraries, or perhaps gracefully fail at runtime when these are not available

but it seems that this does not play nicely with load_all() :

Is that a known thing ?

❯ devtools::load_all()
Loading arrow
Error in find.package(package, lib.loc, verbose = verbose) : 
  there is no package called ‘arrow’
❯ traceback()
7: stop(packageNotFoundError(bad, lib.loc, sys.call()))
6: find.package(package, lib.loc, verbose = verbose)
5: library.dynam("arrow", pkgname, libname) at zzz.R#24
4: nsenv[[f_name]](dirname(ns_path), package)
3: run_pkg_hook(package, "load")
2: pkgload::load_all(path = path, reset = reset, recompile = recompile, 
       export_all = export_all, helpers = helpers, quiet = quiet, 
       ...)
1: devtools::load_all()

devtools::document() fails too and leaves a dirty NAMESPACE

@jjallaire
Copy link

That's correct, it indeed doesn't play nicely with load_all()

@romainfrancois
Copy link
Contributor Author

closing this for now in favor of #4471

@romainfrancois romainfrancois deleted the ARROW-5488/workaround-2 branch June 12, 2019 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: R WIP PR is work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants