Anirban166 / testComplexity

Asymptotic complexity testing framework
https://anirban166.github.io/testComplexity/
Other
36 stars 2 forks source link

Avoiding unnecessary qpdf check #47

Closed Anirban166 closed 4 years ago

Anirban166 commented 4 years ago

image

The only warning generated via a devtools::check() is for the qpf dependency for size reduction on pdfs (although I have no vignettes built as a pdf/RnW yet)

I had a look at the R source code for this check, which triggers the warning if R_check_doc_sizes (environment variable) is set, (also need to disable it for cran) with the existence of /docs directory. (which is not ideal at all, dunno why they have it there)

Anirban166 commented 4 years ago

As perfectly stated by Kirill here (in a similar situation with no pdf vignettes to begin with), the premature qpdf check should be avoided, for which he sent a patch to check for its existence when required only. But this doesn't work now (as observed above), with another instance of the warning being mentioned in this thread, where the OP suggests it worked before (probably after the patch) and doesn't work now with the current devtools version (although am not sure it is a devtools-specific issue).

Anirban166 commented 4 years ago

I set up the path for the env. variable for qpdf, but it wasn't visible via a

Sys.getenv("PATH")

in RStudio, for Sys.which(Sys.getenv("R_QPDF", "qpdf")). All of the current paths for my system:
image

After trying a few methods with qpdf installed (but occurrence of the warning still prevalent), I resorted to TPArrow's answer on this SO thread. Simple solution to get around the issue, but the files (within /bin/ of extracted qpdf contents) weren't being copied to Windows/System32 (isn't a good thing), with no prompt or error. (already have all permissions)

Explorer started to crash as well, had to re-open a new session of explorer.exe via the task manager. It works now i.e. R could trace qpdf:
image

Finally, no warnings!
image

Anirban166 commented 4 years ago

devtools::check() has the --as-cran arg. set, but will still cross-check the package after building the bundle (after the final vignette) with the same argument for a R CMD check via the terminal. (+ Reminder: need to check for the development branch as well, and devtools::build_win() isn't available anymore for building the windows binary.)