rstudio / packrat

Packrat is a dependency management system for R
http://rstudio.github.io/packrat/
401 stars 89 forks source link

Update vendored `renv` with `renv:::vendor()` #711

Closed toph-allen closed 1 year ago

toph-allen commented 1 year ago

Update vendored renv to the latest version — the latest version on GitHub is 0.17.3-62.

Since the last time we updated it, renv now includes an renv:::vendor() method, so I used this. I removed the old script we used to use.

This update is to make available the PPM repo normalization methods available in Packrat.

Manual Testing Notes

To confirm that bundled renv functions still work as expected, deploy this shiny app to a Connect instance:

library(shiny)

ui <- fluidPage(
    titlePanel("Old Faithful Geyser Data"),
    sidebarLayout(
        sidebarPanel(
            sliderInput("bins",
                        "Number of bins:",
                        min = 1,
                        max = 50,
                        value = 30),
            div("username", verbatimTextOutput("user")),
            div("groups", verbatimTextOutput("groups"))
        ),

        mainPanel(
            plotOutput("plot")
        )
    )
)

server <- function(input, output, session) {
  output$plot <- renderPlot({
    x    <- faithful[, 2]
    bins <- seq(min(x), max(x), length.out = input$bins + 1)

    hist(x, breaks = bins, col = 'darkgray', border = 'white')
  })

  output$user <- renderText(session$user)
  output$groups <- renderText(session$groups)
}

shinyApp(ui = ui, server = server)
ChaitaC commented 1 year ago

Verified on with packrat branch toph-update-renv

App deploys without any issue. the logs look different and are printed in red color I am not sure where this change land from

Deployment log ``` ── Preparing for deployment ──────────────────────────────────────────────────── ✔ Deploying "renv" to "server: test_box / username: chaitatest" ℹ Creating application on server... ✔ Created application with id 1097 ℹ Bundling 1 file: app.R ℹ Capturing R dependencies with renv ✔ Found 30 dependencies ✔ Created 16,699b bundle ℹ Uploading bundle... ✔ Uploaded bundle with id 1298 ── Deploying to server ───────────────────────────────────────────────────────── Building Shiny application... Bundle created with R version 4.1.1 is compatible with environment Local with R version 4.3.0 from /opt/R/4.3.0/bin/R Bundle requested R version 4.1.1; using /opt/R/4.3.0/bin/R which has version 4.3.0 Performing manifest.json to packrat transformation. [rsc-session] Content GUID: a42083b4-6d2b-41cf-8e2c-c5434347fd7c [rsc-session] Content ID: 1097 [rsc-session] Bundle ID: 1298 During startup - Warning messages: 1: Setting LC_CTYPE failed, using "C" 2: Setting LC_COLLATE failed, using "C" 3: Setting LC_TIME failed, using "C" 4: Setting LC_MESSAGES failed, using "C" 5: Setting LC_MONETARY failed, using "C" 6: Setting LC_PAPER failed, using "C" 7: Setting LC_MEASUREMENT failed, using "C" Running on host: connect Linux distribution: Ubuntu 22.04.2 LTS (jammy) Running as user: uid=999(jenkins) gid=999(jenkins) groups=999(jenkins) Connect version: 2023.06.0-dev+422 LANG: en_US.UTF-8 Working directory: /connect/mnt/app Using R 4.3.0 R.home(): /opt/R/4.3.0/lib/R Using user agent string: 'RStudio R (4.3.0 x86_64-pc-linux-gnu x86_64 linux-gnu)' Configuring packrat to use available credentials for private repository access. # Validating R library read / write permissions -------------------------------- Using R library for packrat bootstrap: /connect/mnt/R/4.3.0 # Validating managed packrat installation -------------------------------------- Vendored packrat archive: /connect/ext/R/packrat_0.9.1_91ea7f537fb69ce5706114dd8f949fa5b0820efc.tar.gz Vendored packrat SHA: 91ea7f537fb69ce5706114dd8f949fa5b0820efc Managed packrat SHA: Managed packrat version: (none) Installing packrat from /connect/ext/R/packrat_0.9.1_91ea7f537fb69ce5706114dd8f949fa5b0820efc.tar.gz. During startup - Warning messages: 1: Setting LC_CTYPE failed, using "C" 2: Setting LC_TIME failed, using "C" 3: Setting LC_MESSAGES failed, using "C" 4: Setting LC_MONETARY failed, using "C" 5: Setting LC_PAPER failed, using "C" 6: Setting LC_MEASUREMENT failed, using "C" * installing *source* package 'packrat' ... ** using staged installation ** R ** inst ** byte-compile and prepare package for lazy loading During startup - Warning messages: ** help 1: Setting LC_CTYPE failed, using "C" 2: Setting LC_TIME failed, using "C" 3: Setting LC_MESSAGES failed, using "C" 4: Setting LC_MONETARY failed, using "C" 5: Setting LC_PAPER failed, using "C" 6: Setting LC_MEASUREMENT failed, using "C" *** installing help indices ** building package indices During startup - Warning messages: 1: Setting LC_CTYPE failed, using "C" 2: Setting LC_TIME failed, using "C" 3: Setting LC_MESSAGES failed, using "C" ** testing if installed package can be loaded from temporary location 4: Setting LC_MONETARY failed, using "C" 5: Setting LC_PAPER failed, using "C" 6: Setting LC_MEASUREMENT failed, using "C" During startup - Warning messages: 1: Setting LC_CTYPE failed, using "C" 2: Setting LC_TIME failed, using "C" 3: Setting LC_MESSAGES failed, using "C" 4: Setting LC_MONETARY failed, using "C" 5: Setting LC_PAPER failed, using "C" 6: Setting LC_MEASUREMENT failed, using "C" ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path During startup - Warning messages: 1: Setting LC_CTYPE failed, using "C" 2: Setting LC_TIME failed, using "C" 3: Setting LC_MESSAGES failed, using "C" 4: Setting LC_MONETARY failed, using "C" 5: Setting LC_PAPER failed, using "C" 6: Setting LC_MEASUREMENT failed, using "C" * DONE (packrat) Managed packrat version: 0.9.1 # Validating packrat cache read / write permissions ---------------------------- Using packrat cache directory: /connect/mnt/packrat/4.3.0 Audited package hashes with local packrat installation. # Installing required R packages with `packrat::restore()` --------------------- Installing R6 (2.5.1) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/PACKAGES.rds curl: HTTP 200 https://cran.rstudio.com/src/contrib/R6_2.5.1.tar.gz Caching R6. Using cached R6. OK (built source) Installing Rcpp (1.0.9) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/Archive/Rcpp/Rcpp_1.0.9.tar.gz Caching Rcpp. Using cached Rcpp. OK (built source) Installing base64enc (0.1-3) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/base64enc_0.1-3.tar.gz Caching base64enc. Using cached base64enc. OK (built source) Installing cli (3.5.0) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/Archive/cli/cli_3.5.0.tar.gz Caching cli. Using cached cli. OK (built source) Installing commonmark (1.8.0) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/Archive/commonmark/commonmark_1.8.0.tar.gz Caching commonmark. Using cached commonmark. OK (built source) Installing crayon (1.5.1) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/Archive/crayon/crayon_1.5.1.tar.gz Caching crayon. Using cached crayon. OK (built source) Installing digest (0.6.31) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/digest_0.6.31.tar.gz Caching digest. Using cached digest. OK (built source) Installing fastmap (1.1.0) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/Archive/fastmap/fastmap_1.1.0.tar.gz Caching fastmap. Using cached fastmap. OK (built source) Installing fs (1.5.2) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/Archive/fs/fs_1.5.2.tar.gz Caching fs. Using cached fs. OK (built source) Installing glue (1.6.2) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/glue_1.6.2.tar.gz Caching glue. Using cached glue. OK (built source) Installing jsonlite (1.8.4) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/Archive/jsonlite/jsonlite_1.8.4.tar.gz Caching jsonlite. Using cached jsonlite. OK (built source) Installing magrittr (2.0.3) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/magrittr_2.0.3.tar.gz Caching magrittr. Using cached magrittr. OK (built source) Installing mime (0.12) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/mime_0.12.tar.gz Caching mime. Using cached mime. OK (built source) Installing rappdirs (0.3.3) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/rappdirs_0.3.3.tar.gz Caching rappdirs. Using cached rappdirs. OK (built source) Installing rlang (1.0.6) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/Archive/rlang/rlang_1.0.6.tar.gz Caching rlang. Using cached rlang. OK (built source) Installing sourcetools (0.1.7) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/Archive/sourcetools/sourcetools_0.1.7.tar.gz Caching sourcetools. Using cached sourcetools. OK (built source) Installing withr (2.5.0) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/withr_2.5.0.tar.gz Caching withr. Using cached withr. OK (built source) Installing xtable (1.8-4) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/xtable_1.8-4.tar.gz Caching xtable. Using cached xtable. OK (built source) Installing cachem (1.0.6) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/Archive/cachem/cachem_1.0.6.tar.gz Caching cachem. Using cached cachem. OK (built source) Installing ellipsis (0.3.2) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/ellipsis_0.3.2.tar.gz Caching ellipsis. Using cached ellipsis. OK (built source) Installing later (1.3.0) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/Archive/later/later_1.3.0.tar.gz Caching later. Using cached later. OK (built source) Installing lifecycle (1.0.3) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/lifecycle_1.0.3.tar.gz Caching lifecycle. Using cached lifecycle. OK (built source) Installing htmltools (0.5.4) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/Archive/htmltools/htmltools_0.5.4.tar.gz Caching htmltools. Using cached htmltools. OK (built source) Installing promises (1.2.0.1) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/promises_1.2.0.1.tar.gz Caching promises. Using cached promises. OK (built source) Installing fontawesome (0.4.0) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/Archive/fontawesome/fontawesome_0.4.0.tar.gz Caching fontawesome. Using cached fontawesome. OK (built source) Installing jquerylib (0.1.4) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/jquerylib_0.1.4.tar.gz Caching jquerylib. Using cached jquerylib. OK (built source) Installing sass (0.4.1) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/Archive/sass/sass_0.4.1.tar.gz Caching sass. Using cached sass. OK (built source) Installing httpuv (1.6.7) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/Archive/httpuv/httpuv_1.6.7.tar.gz Caching httpuv. Using cached httpuv. OK (built source) Installing bslib (0.3.1) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/Archive/bslib/bslib_0.3.1.tar.gz Caching bslib. Using cached bslib. OK (built source) Installing shiny (1.7.4) ... curl: HTTP 200 https://cran.rstudio.com/src/contrib/shiny_1.7.4.tar.gz Caching shiny. Using cached shiny. OK (built source) Warning message: In packrat::restore(overwrite.dirty = TRUE, prompt = FALSE, restart = FALSE) : The most recent snapshot was generated using R version 4.1.1 Completed packrat build against R version: '4.3.0' Launching Shiny application... ── Deployment complete ───────────────────────────────────────────────────────── ✔ Successfully deployed to Deployment completed: http://localhost:3939/connect/#/apps/a42083b4-6d2b-41cf-8e2c-c5434347fd7c ```