Bug 14750 - Wrong timestamp in srcref of sourced files
Summary: Wrong timestamp in srcref of sourced files
Alias: None
Product: R
Classification: Unclassified
Component: Misc (show other bugs)
Version: R 2.14.0
Hardware: All All
: P5 normal
Assignee: R-core
Depends on:
Reported: 2011-12-07 12:35 UTC by Stephan Wahlbrink
Modified: 2015-12-14 13:46 UTC (History)
1 user (show)

See Also:


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.

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

(tested in R 2.14 r57860)