Message-ID: <CAF0e1n_tG0BJe-Gs1tL5ah-Zx0A+VB2ZW_+i3L-0c3gaf=nV=g@mail.gmail.com>
Date: 2025-01-22T13:33:22Z
From: John Clarke
Subject: [R-pkg-devel] Rcpp: how best to include source from another Github repository
In-Reply-To: <20250121150453.6d63147a@arachnoid>
Thanks Ivan, this is helpful. I'll do some more research. It would be nice
to have an Rcpp standard/recommended way to do this. I don't want to have a
non-standard ./src or ./data folder structure for my Rcpp package, but
these are the two relevant folders in my original repository. Maybe with
some sort of synlinking I could achieve this 'custom' folder/file mapping.
-John
On Tue, Jan 21, 2025 at 1:05?PM Ivan Krylov <ikrylov at disroot.org> wrote:
> ? Tue, 21 Jan 2025 11:57:46 +0100
> John Clarke <john.clarke at 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
>
[[alternative HTML version deleted]]