[R-pkg-devel] Rcpp: how best to include source from another Github repository
Ivan Krylov
|kry|ov @end|ng |rom d|@root@org
Tue Jan 21 13:04:53 CET 2025
В Tue, 21 Jan 2025 11:57:46 +0100
John Clarke <john.clarke using cornerstonenw.com> пишет:
> 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.
I've been using Git submodules for this purpose:
https://codeberg.org/aitap/Ropj/src/branch/master/src
https://git-scm.com/book/en/v2/Git-Tools-Submodules
Every time the upstream changes I have to update the commit pointer in
my repository too, but other than that, it's been working fine. My
.Rbuildignore filters out all the unnecessary files included in the
upstream repository, leaving only the relevant source code in the
resulting source package.
The resulting repository must be cloned with --recurse-submodules (or,
if forgotten, must be initialised with git submodule update --init);
further updates to the tracked commit pointer must be applied with git
submodule update. If the referenced repository becomes unavailable, it
will be impossible to build the package.
--
Best regards,
Ivan
More information about the R-package-devel
mailing list