Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #1549: weaken knitr's dependency on stringr #1552

Closed
wants to merge 63 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
4867c0d
Replace str_trim
HughParsonage May 28, 2018
4530e42
Add stringr_suggestions to collate
HughParsonage May 28, 2018
e3526f1
Require collation
HughParsonage May 28, 2018
cf000a7
Test integration with both TRUE and FALSE
HughParsonage May 28, 2018
0237ef6
Add USE_STRINGR=FALSE
HughParsonage May 28, 2018
73e978d
trimws which
HughParsonage May 28, 2018
42c5a89
Revert
HughParsonage May 28, 2018
7b2c4eb
trim whitespace
HughParsonage May 28, 2018
a14777a
Retreat
HughParsonage May 28, 2018
59db201
Add stringr__ suggestions tests
HughParsonage May 29, 2018
90af50c
Add stringi to suggests
HughParsonage May 29, 2018
e237fd1
Slightly fewer objects
HughParsonage Jun 1, 2018
4aa40ac
Try non-matrix
HughParsonage Jun 1, 2018
171aa64
Kill str_pad
HughParsonage Jun 1, 2018
dcb0ece
Use rep_len for safety
HughParsonage Jun 1, 2018
64f22c1
kill str_pattern
HughParsonage Jun 1, 2018
a17f982
Add str_locate
HughParsonage Jun 1, 2018
b9e5827
Fix typo
HughParsonage Jun 1, 2018
5959f39
Replace with valid negative lookbehind
HughParsonage Jun 1, 2018
4ae08d5
Needs to be perl
HughParsonage Jun 1, 2018
6899d99
No caching of packages -- too many false +ves
HughParsonage Jun 1, 2018
0c78408
Kll str_split
HughParsonage Jun 1, 2018
b037a4c
Kill str_dup and str_trim
HughParsonage Jun 2, 2018
2431f34
Whoops false success
HughParsonage Jun 2, 2018
496dc33
Try null str locate
HughParsonage Jun 2, 2018
0603d4d
typo
HughParsonage Jun 2, 2018
e45ed9b
[Travis] Add binary packages
HughParsonage Jun 2, 2018
6f95d31
List needs to be extracted
HughParsonage Jun 3, 2018
85f5988
Kill str_locate
HughParsonage Jun 3, 2018
4fd1a26
Try travis binaries
HughParsonage Jun 3, 2018
3f2d0de
Hmisc no longer binary
HughParsonage Jun 3, 2018
390e03b
derp
HughParsonage Jun 3, 2018
9caf445
[Travis] binaries
HughParsonage Jun 3, 2018
f0ca08e
line_counter
HughParsonage Jun 3, 2018
30667e1
binaries were a mistake
HughParsonage Jun 3, 2018
3974c64
Don't stringr
HughParsonage Jun 3, 2018
7531611
Revert premature stringr
HughParsonage Jun 3, 2018
ed4f078
Fix locating matches of diff length same line
HughParsonage Jun 4, 2018
dc251d4
Kill str_replace_all
HughParsonage Jun 4, 2018
0e11045
kill str extract all
HughParsonage Jun 4, 2018
502f0a0
Try stringr_match
HughParsonage Jun 4, 2018
931aa6e
Add use_stringr(); clean up regmatch
HughParsonage Jun 4, 2018
12e0190
"FALSE" not quite the same as FALSE
HughParsonage Jun 4, 2018
919376d
Fix leftovers from gregexpr excursion; tests
HughParsonage Jun 4, 2018
756ef04
Use single as repl for str_match_all
HughParsonage Jun 4, 2018
765c3bc
Need to hit different row when multiple matches
HughParsonage Jun 4, 2018
c774248
Add binaries, omit covr
HughParsonage Jun 4, 2018
0adcf0e
Kill str_wrap
HughParsonage Jun 4, 2018
a0e297c
Revert output's str_wrap
HughParsonage Jun 4, 2018
b441c4a
str_wrap perhaps?
HughParsonage Jun 4, 2018
495f640
Avoid spurious whitespace error
HughParsonage Jun 4, 2018
afa6266
Negative integer mistake
HughParsonage Jun 4, 2018
8e96535
Add str_sub
HughParsonage Jun 4, 2018
c7f6831
Needs input as well
HughParsonage Jun 4, 2018
c3fa775
Add str_sub
HughParsonage Jun 4, 2018
5718fb6
fix
HughParsonage Jun 4, 2018
5d41aeb
Deal with multilength sub_assigns
HughParsonage Jun 4, 2018
4905924
Return omitted newline insertion
HughParsonage Jun 5, 2018
aeaf18d
string count logic wrong way around
HughParsonage Jun 5, 2018
2520211
Switch to which
HughParsonage Jun 5, 2018
b14dff1
Revert travis
HughParsonage Jun 5, 2018
1bb5b40
Revert travis; add NEWS
HughParsonage Jun 5, 2018
dce39ec
Remove cruft. Fix some spelling
HughParsonage Aug 20, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ cache:
- $HOME/texlive

before_script:
- export KNITR_USE_STRINGR="FALSE"
- Rscript -e "if (!require('webshot')) devtools::install_github('wch/webshot')"

# run tests
script:
- rm knitr-examples/cache -rf
- make ${TARGET}
- "[ $TARGET = travis ] && Rscript tools/covr.R || true"
#- "[ $TARGET = travis ] && Rscript tools/covr.R || true"

# deploy to xran after integration tests
after_success:
Expand Down
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ Suggests:
httr,
DBI (>= 0.4-1),
showtext,
tibble
tibble,
stringi
License: GPL
URL: https://yihui.name/knitr/
BugReports: https://github.com/yihui/knitr/issues
Expand All @@ -134,6 +135,7 @@ VignetteBuilder: knitr
SystemRequirements: Package vignettes based on R Markdown v2 or reStructuredText require Pandoc (http://pandoc.org).
The function rst2pdf() require rst2pdf (https://github.com/rst2pdf/rst2pdf).
Collate:
'0-stringr_suggestions.R'
'block.R'
'cache.R'
'utils.R'
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export(spin_child)
export(stitch)
export(stitch_rhtml)
export(stitch_rmd)
export(use_stringr)
export(wrap_rmd)
export(write_bib)
import(grDevices)
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGES IN knitr VERSION 1.21 (unreleased)

## NOTICE OF POTENTIALLY BREAKING CHANGES
- `stringr` is now no longer a strict dependency, though it remains in the package imports, and is used by default. The intention is to make `stringr` only a suggested package in two releases' time. For now, please test your use of `knitr` with and without `stringr` and notify us if removing `stringr` would not be safe -- *i.e.* `knitr` behaves differently when `stringr` is not used. See `?use_stringr()` for instructions.

## NEW FEATURES

- Added a new object `cache_engines` for other language engines to handle caching. See `?knitr::cache_engines` for details (thanks, @tmastny, #1518).
Expand Down
Loading