-
-
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
Rcpp::compileAttributes (dot once more) #1129
Comments
Well the sequence of commands involving It even works when I manually add So I see nothing actionable here. |
From another point, it seems like unintended behaviour to have functions generate code files that intend to include each other, but do not. With the danger of repeating myself, the actionable piece comes from the file
which contains the line : |
The code is in the file Using the "interfaces(cpp)" feature is fairly rare, doing it in packages with dots even more so -- which in aggregate appears to suggest nobody was bothered enough to go for it. Contributions welcome! |
I think I'll skip on it, and just leave out the interface to cpp. I simply lack the experience with c++ to efficiently spot where the file text is being compiled in the source code. Another year or two maybe. 👍 |
Given that this seemed like a fairly localized issue, I took a peek and just committed what may well be an appropriate fix addressing this issue of 'interface' use and generated header files for which a possible 'dot' in a package name needs needs conversion. It covers your test case above (of adding a simple @kevinushey : when you have a moment, please take a look. I am learning towards sending what is in master to CRAN once they reopen, but we can possibly discuss including this. But as said before, might just be good enough to wait with this for the next cycle... |
Thanks Dirk, I will keep an eye out and check the Devel build later on! 👍 |
Forgot to add the commit id but it should be pretty obvious as the (so far) sole commit in this new branch. |
Got it! It was just that simple eh? Definitely something that I am going to learn from. I am unlikely to be done prior to the next commit round and either way I'd just update the package as needed. 👍 |
LGTM! I don't have a strong opinion but would otherwise be fine with bringing that for the next Rcpp release. |
This is related to #500 and a question on stackoverflow from 2013.
Assume you have a package with a dot in the name
with.dot
, and you want to provide a C++ interface. This causes an error upon compilation:Here the compilation is executed by
devtools::document
and this causes an error:The problem comes from the file
with.dot/inst/with.dot.h
trying to referencewith.dot/inst/with.dot_RcppExports.h
(note the dot in the file name). It seems to me, that file names should have replaced dots (.
) by underscores (_
) for reference purposes. I tried going through the debugger and got as far asat which point my search stopped.
The text was updated successfully, but these errors were encountered: