[R-pkg-devel] Failed: Future File Timestamp Check

Josiah Parry jo@|@h@p@rry @end|ng |rom gm@||@com
Wed Feb 5 02:29:46 CET 2025


Thanks, Duncan!

It is produced before preparing the tarball. It’s just a way to automate
defining many 100ish  functions that have the same structure.  l run the
script manually when I want to update definitions.

There is not any auto-magical process that creates a file before the build
or install step. This would be the equivalent of something like running the
following once during the development process

writeLines(‘hello_world <- function() { “Hello, world!” }’,
“R/hello-world.R”)


On Tue, Feb 4, 2025 at 17:19 Duncan Murdoch <murdoch.duncan using gmail.com>
wrote:

> One question is when that file is produced.  Do you produce it before
> preparing the tarball, or is it produced as part of the installation
> process?
>
> Duncan Murdoch
>
> On 2025-02-04 6:27 p.m., Josiah Parry wrote:
> > The file was written using writeLines() but it is just a normal R script
> > with normal function definitions and is included in the R/ directory. The
> > source code is just programmatically generated.
> >
> >
> > On Tue, Feb 4, 2025 at 14:54 Jeff Newmiller <jdnewmil using dcn.davis.ca.us>
> > wrote:
> >
> >> Packages are supposed to work when mounted in a read-only filesystem...
> >> using writeLines seems like a very bad idea since you can't assume the
> >> package install is writeable when it is run, and running code from tmp
> is a
> >> security hole.
> >>
> >> If you absolutely cannot think of a way around running code from
> generated
> >> files, then maybe you should use textConnection to run from internal
> RAM.
> >>
> >> On February 4, 2025 1:11:10 PM PST, Josiah Parry <
> josiah.parry using gmail.com>
> >> wrote:
> >>> I'm running R CMD check for my package {calcite} (source:
> >>> https://github.com/r-arcGIS/calcite) which is failing due to what
> >> *looks* like
> >>> a bug.
> >>>
> >>> R CMD check fails at "checking for future file timestamps"
> >>>
> >>> I get this error:  ...Error in if (abs(unclass(now_local) -
> >>> unclass(now)[1]) > 300) missing value where TRUE/FALSE needed.
> >>>
> >>> It seems that an NA is being generated somehow during this check but
> I'm
> >>> unsure how.
> >>>
> >>> One thing that comes to mind is that the file that contains all of my
> >>> function definitions is generated using writeLines() but the output of
> `
> >>> file.info()` looks normal to me.
> >>>
> >>> Have others encountered this? I'm on R 4.4.0 Puppy Cup
> >>>
> >>> platform       aarch64-apple-darwin20
> >>> arch           aarch64
> >>> os             darwin20
> >>> system         aarch64, darwin20
> >>> status
> >>> major          4
> >>> minor          4.0
> >>> year           2024
> >>> month          04
> >>> day            24
> >>> svn rev        86474
> >>> language       R
> >>> version.string R version 4.4.0 (2024-04-24)
> >>> nickname       Puppy Cup
> >>>
> >>>        [[alternative HTML version deleted]]
> >>>
> >>> ______________________________________________
> >>> R-package-devel using r-project.org mailing list
> >>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >>
> >> --
> >> Sent from my phone. Please excuse my brevity.
> >>
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-package-devel using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list