diff --git a/DESCRIPTION b/DESCRIPTION index 47beeec0..fd1a69a2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: profvis Title: Interactive Visualizations for Profiling R Code -Version: 0.3.4 +Version: 0.3.4.9000 Authors@R: c( person("Winston", "Chang", email = "winston@rstudio.com", role = c("aut", "cre")), person("Javier", "Luraschi", email = "javier@rstudio.com", role = "aut"), diff --git a/NEWS.md b/NEWS.md index 4dde6e3c..dc08421d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +profvis 0.3.4.9000 +============= + +* Fixed problem with development build of R where source refs are turned on by defaut (reported by Tomas Kalibera). + profvis 0.3.4 ============= diff --git a/R/file_contents.R b/R/file_contents.R index aa37bb85..9fd2c700 100644 --- a/R/file_contents.R +++ b/R/file_contents.R @@ -73,8 +73,12 @@ get_pkg_srcrefs <- function(pkg) { # Given a char vector with contents of an entire package, split out all # files into separate entries in a list. full_src_to_file_contents <- function(src) { - # Drop first line (simply contains package name) - src <- src[-1] + # Before R 2.5.0, the first line looked like this: + # .packageName <- "R6" + # As of 2.5.0, that line was dropped. If that line is present, remove it. + if (grepl("^\\.packageName <-", src[1])) { + src <- src[-1] + } # Lines which contain filenames. Have a format like: # "#line 1 \"/tmp/Rtmp6W0MLC/R.INSTALL1a531f3beb59/ggplot2/R/aaa-.r\""