Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
explicitly make exported functions visible #720
Marks exported Rcpp functions as visible, on supported platforms. The
__attribute__ ((visibility ("default")))
And otherwise it is blank. The idea is that we can compile packages with
Limiting visibility to exported functions reduces the chances of symbol conflicts like we saw in ropensci/hunspell#21. Here both rstudio and the hunspell package include a copy of libhunspell but different versions. Apparently their C++ classes start conflicting under certain circumstances. Hiding the
@@ Coverage Diff @@ ## master #720 +/- ## ======================================= Coverage 93.15% 93.15% ======================================= Files 66 66 Lines 3432 3432 ======================================= Hits 3197 3197 Misses 235 235
Interesting. I was so far only aware of a user-space clash between Boost and RStudio which I had hit with anytime and (the new, non CRAN) RcppMLPACK. This got fixed in the RStudio dailies a little while ago thanks to @kevinushey
I am always a little wary of making a global change but this one may be sensible. Maybe to wait till I get home though.
Alternatively could we change this to defining and inly if another variable is defined? I seem to have
so should we condition on that?
I think the conditioning is already done by R itself. Header
#ifdef HAVE_VISIBILITY_ATTRIBUTE # define attribute_visible __attribute__ ((visibility ("default"))) # define attribute_hidden __attribute__ ((visibility ("hidden"))) #else # define attribute_visible # define attribute_hidden #endif