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

error with renv::dependencies #56

Open
jkylearmstrong opened this issue Feb 12, 2025 · 3 comments
Open

error with renv::dependencies #56

jkylearmstrong opened this issue Feb 12, 2025 · 3 comments

Comments

@jkylearmstrong
Copy link

jkylearmstrong commented Feb 12, 2025

When I go to render a file I recently started getting this error:

grateful::cite_packages(output = "paragraph",
                         out.dir = getwd(),
                         omit = NULL,
                         dependencies = F,
                         include.RStudio = F,
                         passive.voice = T)
updating existing packages
ERROR: 
compilation failed- error
Text line contains an invalid character.
l.5119 Please see `^^[
                      ]8;;ide:help:renv::dependencies^^G?renv::dependencies^... 

I have added a .renvignore file and I have suppressed everything except the list of .qmd files I plan on rendering and the DESCRIPTION file. When I run

grateful::cite_packages(output = "paragraph",
                         out.dir = getwd(),
                         omit = NULL,
                         dependencies = F,
                         include.RStudio = F,
                         passive.voice = T)

interactively I am not seeing any issues.

The result of

X <- capture.output(renv::dependencies(), "message")

is 2498 lines,

Any idea what might be causing this?

To be clear renv has been experiencing some issues since the last update (rstudio/renv#2089 , rstudio/renv#2091), but I have reverted back to version

> packageVersion('renv')
[1] ‘1.0.11’
@jkylearmstrong
Copy link
Author

I was able to get the document to render when I switched to:

grateful::cite_packages(output = "paragraph",
                        out.dir = getwd(),
                        pkgs = "Session",
                        omit = NULL,
                        dependencies = F,
                        include.RStudio = F,
                        passive.voice = T)

not sure why I'm getting the error with pkgs = "All" option when

> unique(renv::dependencies(progress = FALSE)$Package)
 [1] "knitr"          "dplyr"          "tidyr"          "tidyverse"     
 [5] "here"           "readr"          "labelled"       "datasci"       
 [9] "furrr"          "missForest"     "grateful"       "rmarkdown"     
[13] "purrr"          "ggplot2"        "pacman"         "cowplot"       
[17] "broom.helpers"  "gt"             "gtsummary"      "survival"      
[21] "caret"          "tibble"         "patchwork"      "ggpubr"        
[25] "lmerTest"       "broom"          "broom.mixed"    "stringr"       
[29] "ggridges"       "officer"        "quarto"         "arsenal"       
[33] "data.table"     "distributional" "ggdist"         "tidymodels"    
[37] "readxl"         "janitor"        "forcats"        "scales"        
[41] "ggfortify"      "plotly"         "ggmice"         "mice"          
[45] "doFuture"       "future"         "parallel"       "censored"      
[49] "workflowsets"   "vip"            "magick"         "ranger"        
[53] "lme4"           "yardstick"      "kableExtra"     "equatiomatic"  
[57] "writexl"        "glmnet"         "stats"          "kknn"          
[61] "finetune"       "survminer"      "futuremice"     "ggrepel"       
[65] "glue"           "partykit"       "tools"          "multilevelmod" 
[69] "rsample"        "DALEX"          "DALEXtra"       "doParallel"    
[73] "openxlsx"       "nnet"           "Amelia"         "AMR"           
[77] "corrplot"       "embed"          "fs"             "ggforce"       
[81] "ingredients"    "renv"           "shiny"          "tune"          
[85] "xgboost"  

@Pakillo
Copy link
Owner

Pakillo commented Feb 16, 2025

Hi @jkylearmstrong

Thanks for the report. Is your repository public so that I can have a look to investigate what might be going on? It looks like {renv} or {grateful} are finding too many packages to cite? Or some weird interaction with Quarto? (since you mentioned it works fine when running interactively)

What is the output of grateful::scan_packages() in your repo? Does it coincide with the output of unique(renv::dependencies(progress = FALSE)$Package) you posted above?

Also, what is the output of

grateful::cite_packages(output = "paragraph",
                         out.dir = getwd(),
                         omit = NULL,
                         dependencies = F,
                         include.RStudio = F,
                         passive.voice = T)

Thanks

@jkylearmstrong
Copy link
Author

I will try and test with updates to renv and see what comes out at this point.

Right now I rolled back renv to the prior version and applied "session" to account for errors to keep my project functional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants