-
Notifications
You must be signed in to change notification settings - Fork 25
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
Unit tests for readProtoFiles2 #45
Conversation
Add proto files within two projects with bidirectional dependencies
Nice work. I was a little put back when I saw a change to I'll let this sit here for a day or two so that @murraystokely and @jeroen can comment, but this looks good to me at first glance. Will look once more. Thanks for this! |
R/internals.R
Outdated
@@ -101,6 +101,12 @@ readProtoFiles2 <- function(files, | |||
invisible(NULL) | |||
} | |||
|
|||
resetDescriptorPool <- function(){ | |||
.Call( "resetDescriptorPool_cpp" ) |
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.
I guess .Call()
used to want a PACKAGE=
argument but under registration=TRUE
that should not be needed. I do wonder if we should purge the .Call()
for new code and eg here just call resetDescriptorPool_cpp()
...
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.
I added the PACKAGE argument. I think using the registered symbols instead of a string should be part of a package wide refactoring. In my understanding, we still have to use .Call
; it's just that we provide a symbol instead of expecting .Call to search for the name.
R/internals.R
Outdated
@@ -102,7 +102,7 @@ readProtoFiles2 <- function(files, | |||
} | |||
|
|||
resetDescriptorPool <- function(){ | |||
.Call( "resetDescriptorPool_cpp" ) | |||
.Call( "resetDescriptorPool_cpp", PACKAGE = "RProtoBuf" ) |
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.
I was about to say we don't need this -- but then I realized that this package is still old-school not using Rcpp Attributes. Adding this follow the code convention even though we now also register symbols so I think it is not strictly needed -- but won't harm or hurt.
Thanks again! |
As requested in #39 and discussed in #40.