Skip to content

Commit

Permalink
fix #1708: partially revert the solution 029838c for #1403: still use…
Browse files Browse the repository at this point in the history
… find_globals() for identifying global variabls in a chunk, instead of finding all symbols, because the case #1708 is more surprising and difficult to deal with, and #1403 can be more easily solved by cache.globals = 'x'
  • Loading branch information
yihui committed May 16, 2019
1 parent 97e3d80 commit 4d6fc85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: knitr
Type: Package
Title: A General-Purpose Package for Dynamic Report Generation in R
Version: 1.22.10
Version: 1.22.11
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
person("Adam", "Vogt", role = "ctb"),
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

- When the chunk option `dev = 'svg'`, `grDevices::svg()` is used to record plots, instead of the default PDF null device (thanks, @trevorld, #729).

- Partially reverted the solution for #1403 in favor of fixing the more surprising issue #1708, i.e., avoid false positive cache dependencies among chunks more than false negative dependencies when the chunk option `autodep = TRUE` (thanks, @fountainer).

# CHANGES IN knitr VERSION 1.22

## NEW FEATURES
Expand Down
2 changes: 1 addition & 1 deletion R/block.R
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ block_exec = function(options) {
if (options$autodep) {
# you shall manually specify global object names if find_symbols() is not reliable
cache$objects(
objs, options$cache.globals %n% find_symbols(code), options$label,
objs, options$cache.globals %n% find_globals(code), options$label,
options$cache.path
)
dep_auto()
Expand Down

0 comments on commit 4d6fc85

Please sign in to comment.