[Rd] best way to build from Git

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Thu Dec 26 11:41:15 CET 2019


On 25/12/2019 8:37 p.m., frederik using ofb.net wrote:
> Dear R-devel,
> 
> I checked out a recent copy of R via Subversion and made a few changes to the code. I wanted to commit them locally to my repo, just to stay organized and keep them separate from other changes I plan to make. However, I was not able to commit them because I don't think SVN allows this?

What I used to do in that situation was to run "svn diff >patchfile" 
(maybe with some options, I forget), then save the patch locally.  "svn 
patch" can usually apply the patch appropriately after the working copy 
has been updated:  it understands the svn revision numbers recorded in 
the patch.  (Conflicts cause trouble, but no more than any other time.)
This doesn't work so well if you are adding or moving files.

The patch produced in this way is also suitable for including in a bug 
report on bugs.r-project.org.

Duncan Murdoch

> 
> Plan B, check out a Git mirror of R, https://github.com/wch/r-source/
> 
> It has some instructions for building: https://github.com/wch/r-source/wiki
> 
> However, there are some complicated workarounds due to a commit from 2013 (https://github.com/wch/r-source/commit/4f13e5325dfbcb9fc8f55fc6027af9ae9c7750a3). And it only seems to succeed if the build directory is the same as the source directory.
> 
> Makefile.in has some odd stuff that might be related, like why is it checking for "$(srcdir)/doc/FAQ" rather than "$(top_builddir)/doc/FAQ"? Conversely, there is a check for "$(top_builddir)/.git" which I would expect to be in "$(srcdir)/.git" instead. And it runs "git svn info" which seems to take indefinitely long - I am not using "git svn", I'm just trying to build from a regular git repo. This is difficult to debug because it is inside an @if, so "make -n" still runs it. Also there are no comments to explain what e.g. the "svnonly" target is doing, or anything else.
> 
> After some time I still have little idea why it is necessary for the build system to depend on the revision control system. Clearly we are trying to do something fancy, but why not e.g. just failover to "Last Changed Date: unknown; not SVN" if SVN-REVISION is missing?
> 
> I am wondering if there is any plan to clean up this situation because it seems like a stumbling block for users who might want to contribute to R.

I



More information about the R-devel mailing list