Skip to content

Commit

Permalink
Fix for R-devel parsing issue (reported by Tomas Kalibera)
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Feb 13, 2018
1 parent dbce086 commit 2b53ece
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 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"),
Expand Down
5 changes: 5 additions & 0 deletions 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
=============

Expand Down
8 changes: 6 additions & 2 deletions R/file_contents.R
Expand Up @@ -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\""
Expand Down

0 comments on commit 2b53ece

Please sign in to comment.