-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Add Shield around parameters in Rcpp::interfaces (fixes #712) #713
Conversation
Hah. Saves me some testing and means I can go straight to rev.dep testing this :) |
Codecov Report
@@ Coverage Diff @@
## master #713 +/- ##
=======================================
Coverage 89.57% 89.57%
=======================================
Files 66 66
Lines 3588 3588
=======================================
Hits 3214 3214
Misses 374 374
Continue to review full report at Codecov.
|
@@ -2172,7 +2172,7 @@ namespace attributes { | |||
|
|||
const std::vector<Argument>& args = function.arguments(); | |||
for (std::size_t i = 0; i<args.size(); i++) { | |||
ostr() << "Rcpp::wrap(" << args[i].name() << ")"; | |||
ostr() << "Shield<SEXP>(Rcpp::wrap(" << args[i].name() << "))"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could make this Rcpp::Shield for consistency with Rcpp::wrap but I see other identifiers without the namespace qualifier.
Yeah I originally had it with the qualifier then noticed the same thing you
did (already have unqualified references elsewhere so why press the issue
here).
…On Wed, Jun 14, 2017 at 3:14 PM, Dirk Eddelbuettel ***@***.*** > wrote:
***@***.**** commented on this pull request.
------------------------------
In src/attributes.cpp
<#713 (comment)>:
> @@ -2172,7 +2172,7 @@ namespace attributes {
const std::vector<Argument>& args = function.arguments();
for (std::size_t i = 0; i<args.size(); i++) {
- ostr() << "Rcpp::wrap(" << args[i].name() << ")";
+ ostr() << "Shield<SEXP>(Rcpp::wrap(" << args[i].name() << "))";
We could make this Rcpp::Shield for consistency with Rcpp::wrap but I see
other identifiers without the namespace qualifier.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#713 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGXx2s1DCY28uhC8UzvdwOQZANaHUm5ks5sEDEwgaJpZM4N59_u>
.
|
Looks good, and have a rev.dep run chugging along. May as well merge now. |
Would it be worth it to prefix with |
The fact that we're injecting a |
I don't recall why that using namespace Rcpp is there but I don't think I
would have done it capriciously so I wouldn't just rip it out and hope for
the best. It doesn't pollute the namespace of users of the package, just
the implementation namespace of the package (which is by definition using
the Rcpp namespace).
…On Wed, Jun 14, 2017 at 10:07 PM, Kevin Ushey ***@***.***> wrote:
The fact that we're injecting a using namespace Rcpp; statement into
another package's namespace within a header file is a little bit wonky, so
it might be worth doing.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#713 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAGXx9bdSqBY9gXDCn68cPJ9OdOCjEVEks5sEJHugaJpZM4N59_u>
.
|
Also, aren't we talking |
Good point :) Okay, let's not touch anything there. |
Thanks for the very quick fix! |
Thanks to you for the heads-up. I also ran a full rev.dep check yesterday, and we're good. I did sixteen out of 1050 or so packages failing, and about eight looked like possible dplyr interactions I had not seen (and do no worry about for Rcpp as they also fail at CRAN for the released version -- hence unlikely to be us). |
Thanks. Most of the eight new failures look familiar, I hope the upcoming dplyr point release will fix them. |
No description provided.