Bug 14750 - Wrong timestamp in srcref of sourced files
Wrong timestamp in srcref of sourced files
Status: RESOLVED FIXED
Product: R
Classification: Unclassified
Component: Misc
R 2.14.0
All All
: P5 normal
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-07 12:35 UTC by Stephan Wahlbrink
Modified: 2011-12-19 17:55 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Wahlbrink 2011-12-07 12:35:36 UTC
When sourcing R code files, the timestamp is not the modification stamp of the source file.

source("file.R")
unclass(file.info("file.R")[1, "mtime"])
unclass(attr(body(myFun), "srcfile")$timestamp)

The issue occurs in:
R version 2.14.0 Patched (2011-12-06 r57834)
R Under development (unstable) (2011-12-06 r57834)
(tested on win and linux)

The timestamp was correct in older versions (2.13).

I think the bug was introduced in the function source when the call srcfile was replaced with srcfilecopy.
Comment 1 Duncan Murdoch 2011-12-07 16:44:06 UTC
Will fix.
Comment 2 Duncan Murdoch 2011-12-09 14:34:21 UTC
Fixed in R-patched and R-devel.
Comment 3 Stephan Wahlbrink 2011-12-19 17:55:06 UTC
Thanks

(tested in R 2.14 r57860)