Conversation
ee0bfe6 to
7a5b7cd
Compare
| cat_line() | ||
| all_vars <- Sys.getenv() | ||
| rchk_vars <- all_vars[ | ||
| grep("_R_CHECK|NOT_CRAN|RCMDCHECK|R_TESTS", names(all_vars)) |
There was a problem hiding this comment.
I think you could just print _R_CHECK var here — the idea is that devtools prints the env vars that it sets; rcmdcheck prints all the env vars that affect the operation of R CMD check, regardless of how they've been setting.
There was a problem hiding this comment.
I was thinking that it looked a little duplicative when called from devtools::check() and that we could let it all be handled by rcmdcheck? Here's what it looks like when you call devtools::check() with the PR rcmdcheck + release version devtools (note that it reprints the same variables, basically):
R> devtools::check("~/_nflverse/nflreadr")
══ Documenting ══════════════════════════════════════════════════════════════════════════════
ℹ Updating nflreadr documentation
ℹ Loading nflreadr
══ Building ═════════════════════════════════════════════════════════════════════════════════
Setting env vars:
• CFLAGS : -Wall -pedantic -fdiagnostics-color=always
• CXXFLAGS : -Wall -pedantic -fdiagnostics-color=always
• CXX11FLAGS: -Wall -pedantic -fdiagnostics-color=always
• CXX14FLAGS: -Wall -pedantic -fdiagnostics-color=always
• CXX17FLAGS: -Wall -pedantic -fdiagnostics-color=always
• CXX20FLAGS: -Wall -pedantic -fdiagnostics-color=always
── R CMD build ──────────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/home/tan/_nflverse/nflreadr/DESCRIPTION’ ...
─ preparing ‘nflreadr’:
✔ checking DESCRIPTION meta-information ...
─ installing the package to build vignettes
✔ creating vignettes (7s)
─ checking for LF line-endings in source and make files and shell scripts (591ms)
─ checking for empty or unneeded directories
─ building ‘nflreadr_1.5.0.tar.gz’
══ Checking ═════════════════════════════════════════════════════════════════════════════════
Setting env vars:
• _R_CHECK_CRAN_INCOMING_USE_ASPELL_ : TRUE
• _R_CHECK_CRAN_INCOMING_REMOTE_ : FALSE
• _R_CHECK_CRAN_INCOMING_ : FALSE
• _R_CHECK_FORCE_SUGGESTS_ : FALSE
• _R_CHECK_PACKAGES_USED_IGNORE_UNUSED_IMPORTS_: FALSE
• NOT_CRAN : true
── R CMD check ──────────────────────────────────────────────────────────────────────────────
─ R CMD check env vars set:
• _R_CHECK_CRAN_INCOMING_ = FALSE
• _R_CHECK_CRAN_INCOMING_REMOTE_ = FALSE
• _R_CHECK_CRAN_INCOMING_USE_ASPELL_ = TRUE
• _R_CHECK_FORCE_SUGGESTS_ = FALSE
• _R_CHECK_PACKAGES_USED_IGNORE_UNUSED_IMPORTS_ = FALSE
• NOT_CRAN = true
My initial instinct was to make printing the envvars that relate to checking all get printed by rcmdcheck (even if set by devtools or otherwise), so also made a corresponding PR to remove the printing by devtools r-lib/devtools#2621
There was a problem hiding this comment.
as for the RCMDCHECK / R_TESTS grep patterns, I did a search through the rcmdcheck codebase for Sys.getenv https://github.com/search?q=repo%3Ar-lib%2Frcmdcheck%20Sys.getenv&type=code and saw those two patterns being referred to in a handful of places, figured they might as well get printed
There was a problem hiding this comment.
(I'm happy to change to "just" the _R_CHECK ones if we have a stronger preference to have devtools print the vars set by devtools, just explaining the original rationale)
There was a problem hiding this comment.
If we had this, we'd drop the R_CHECK_ printing in devtools, but still set the other envvars.
rcmdcheck is used in other places apart from devtools, so the goals are a little different — here I'm worried more about env vars that are set elsewhere (i.e. not by devtools). We can also wait for Gabor to take a look.
There was a problem hiding this comment.
If we had this, we'd drop the R_CHECK_ printing in devtools, but still set the other envvars.
Yeah, I think that's what I tried to implement here (maybe worth eyeballing to confirm?) https://github.com/r-lib/devtools/pull/2621/files
Closes #172 - prints
_R_CHECK_*,NOT_CRAN, and other related rcmdcheck envvars.