[R-pkg-devel] Rcpp: how best to include source from another Github repository

John Clarke john@c|@rke @end|ng |rom corner@tonenw@com
Tue Jan 21 11:57:46 CET 2025


Hi folks,

I have an Rcpp package I'm developing. All but one of the cpp source code
files are pulled from the original/authoritative (CLI) version of the
application. The only unique cpp source code to the Rcpp package is my
wrapper.cpp which contains the Rcpp interface. This approach works fine,
but every time we make changes to the original CLI repository, it requires
a manual (and duplicate) commit to my Rcpp repo. This is not ideal from a
source tracking perspective and is a DRY violation.

What is the recommended way of maintaining the shared cpp code in a Rcpp
repo? Ideally, it would be nice to be able to pull the files from the
source repo using a tag/hash so that the only code change in the Rcpp repo
would be that reference rather than all the changes to the shared source.
It would also be nice to use some sort of symlinkish setup during
development to allow quick testing before making commits in the original
CLI repo. Is this possible? Recommended? (we can assume dev is on MacOS or
Linux)

Thanks,

-John

John Clarke | Senior Technical Advisor |
Cornerstone Systems Northwest | john.clarke using cornerstonenw.com

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list