[R-pkg-devel] duplicate function during build

Hadley Wickham h.wickham at gmail.com
Sat Jul 23 16:17:16 CEST 2016


I think this sort of meta problem is best solved with svn/git because you
can easily see if the changes you think you made align with the changes you
actually made. Learning svn or git is a lot of work, but the payoff is
worth it.

Hadley

On Friday, July 22, 2016, ProfJCNash <profjcnash at gmail.com> wrote:

> In trying to rationalize some files in a package I'm working on, I
> copied a function from one file to another, but forgot to change the
> name of one of them. It turns out the name of the file containing the
> "old" function was later in collation sequence than the one I was
> planning to be the "new" one. To debug some issues, I put some print()
> and cat() statements in the "new" file, but after building the package,
> they weren't there. Turns out the "old" function got installed, as might
> be expected if files processed in order. Debugging this took about 2
> hours of slightly weird effort with 2 machines and 3 OS distributions
> before I realized the problem. It's fairly obvious that I should expect
> issues in this case, but not so clear how to detect the source of the
> problem.
>
> Question: Has anyone created a script to catch such duplicate functions
> from different files during build? I think a warning message that there
> are duplicate functions could save some time and effort. Maybe it's
> already there, but I saw no obvious message. In this case, I'm only
> working in R.
>
> I've found build.R in the R tarball, which is where I suspect such a
> check should go, and I'm willing to prepare a patch when I figure out
> how this should be done. However, it seems worth asking if anyone has
> needed to do this before. I've already done some searching, but the
> results seem to pick up quite different posts than I need.
>
> Cheers, JN
>
> ______________________________________________
> R-package-devel at r-project.org <javascript:;> mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>


-- 
http://hadley.nz

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list