From 76f005693ffd12b7f08cc5faf9b7ede91740e00d Mon Sep 17 00:00:00 2001 From: Marcos Navarro Date: Tue, 28 Jan 2025 14:19:27 -0600 Subject: [PATCH 1/7] troubleshooting renv --- docs/troubleshooting.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index fa8a4e8d7..3542c816e 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -50,6 +50,28 @@ For example, in [Posit Connect 2024.12.0](https://docs.posit.co/connect/news/#po Gradio app support was introduced. When deploying a Gradio app to a server running an older version of Posit Connect than 2024.12.0, it will error. +### `renv` errors on deployment + +When deploying projects using `R`, it is indispensable for the Posit Publisher extension +to have access to a record of the dependencies used by your project. +This record is expected to be found as a `lockfile` (commonly named as `renv.lock`) generated by `renv`, +since the [`renv` package](https://rstudio.github.io/renv/articles/renv.html) +is a great choice to create reproducible environments. + +Clarifying things a bit, `renv` is not a requirement, the `lockfile` is. +It is possible to collaborate in projects that already have a `lockfile` +and not having `renv` available in your system. + +If there is not a `lockfile`, the Posit Publisher extension will attempt to scan the current state of the project +and provide you with a solution to generate the expected `lockfile`. + +![](https://cdn.posit.co/publisher/assets/img/publisher-renv-setup-notification.png) + +Solutions provided by the Posit Publisher extension to fix an `renv` environment are limited +to the most common scenarios, any other issue around `renv` and a `lockfile` generation will require +additional attention by you. For those cases the Posit Publisher extension will suggest +to evaluate the situation getting the status of the environment with `renv::status()`. + ## Still having trouble? If you're still having trouble with Posit Publisher or have any questions, From 0681600edeb017ac47258ba966fc9c08b901a29b Mon Sep 17 00:00:00 2001 From: Marcos Date: Tue, 28 Jan 2025 15:22:37 -0600 Subject: [PATCH 2/7] Update docs/troubleshooting.md Co-authored-by: Jordan Jensen --- docs/troubleshooting.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 3542c816e..25c748907 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -67,10 +67,9 @@ and provide you with a solution to generate the expected `lockfile`. ![](https://cdn.posit.co/publisher/assets/img/publisher-renv-setup-notification.png) -Solutions provided by the Posit Publisher extension to fix an `renv` environment are limited -to the most common scenarios, any other issue around `renv` and a `lockfile` generation will require -additional attention by you. For those cases the Posit Publisher extension will suggest -to evaluate the situation getting the status of the environment with `renv::status()`. +When uncommon errors occur that Posit Publisher cannot solve for you, it +prompts to evaluate the status of `renv` using +[`renv::status()`](https://rstudio.github.io/renv/reference/status.html). ## Still having trouble? From 2fd242bd595044b44125e18bcebc2e7515f4ea7d Mon Sep 17 00:00:00 2001 From: Marcos Date: Tue, 28 Jan 2025 15:22:58 -0600 Subject: [PATCH 3/7] Update docs/troubleshooting.md Co-authored-by: Jordan Jensen --- docs/troubleshooting.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 25c748907..a2bf1e2a1 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -62,8 +62,8 @@ Clarifying things a bit, `renv` is not a requirement, the `lockfile` is. It is possible to collaborate in projects that already have a `lockfile` and not having `renv` available in your system. -If there is not a `lockfile`, the Posit Publisher extension will attempt to scan the current state of the project -and provide you with a solution to generate the expected `lockfile`. +If an R project doesn't have a `lockfile` on deploy, Posit Publisher prompts to +provide a solution to generate the expected `lockfile`. ![](https://cdn.posit.co/publisher/assets/img/publisher-renv-setup-notification.png) From ccd403eb9592f0aa90e804889768703dee5368ba Mon Sep 17 00:00:00 2001 From: Marcos Date: Tue, 28 Jan 2025 15:23:18 -0600 Subject: [PATCH 4/7] Update docs/troubleshooting.md Co-authored-by: Jordan Jensen --- docs/troubleshooting.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index a2bf1e2a1..d4e7160f6 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -58,9 +58,7 @@ This record is expected to be found as a `lockfile` (commonly named as `renv.loc since the [`renv` package](https://rstudio.github.io/renv/articles/renv.html) is a great choice to create reproducible environments. -Clarifying things a bit, `renv` is not a requirement, the `lockfile` is. -It is possible to collaborate in projects that already have a `lockfile` -and not having `renv` available in your system. +Projects that already include a `lockfile` do not require `renv` be setup. If an R project doesn't have a `lockfile` on deploy, Posit Publisher prompts to provide a solution to generate the expected `lockfile`. From e970729cbe808ab210c64ff9380cb5c168ead6de Mon Sep 17 00:00:00 2001 From: Marcos Date: Tue, 28 Jan 2025 15:24:24 -0600 Subject: [PATCH 5/7] Update docs/troubleshooting.md Co-authored-by: Jordan Jensen --- docs/troubleshooting.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index d4e7160f6..27cd9c9a0 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -52,11 +52,11 @@ running an older version of Posit Connect than 2024.12.0, it will error. ### `renv` errors on deployment -When deploying projects using `R`, it is indispensable for the Posit Publisher extension -to have access to a record of the dependencies used by your project. -This record is expected to be found as a `lockfile` (commonly named as `renv.lock`) generated by `renv`, -since the [`renv` package](https://rstudio.github.io/renv/articles/renv.html) -is a great choice to create reproducible environments. +When deploying `R` projects, it is essential that Posit Publisher has +access to a record of the dependencies used by your project to reproduce +the project on Posit Connect. +The [`renv` package](https://rstudio.github.io/renv/articles/renv.html) can +create that record as a `lockfile` (commonly named `renv.lock`). Projects that already include a `lockfile` do not require `renv` be setup. From f1d9d71d509291c0678476519ba9f2db2f31bb73 Mon Sep 17 00:00:00 2001 From: Marcos Date: Tue, 28 Jan 2025 15:24:46 -0600 Subject: [PATCH 6/7] Update docs/troubleshooting.md Co-authored-by: Jordan Jensen --- docs/troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 27cd9c9a0..4ab83cec3 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -50,7 +50,7 @@ For example, in [Posit Connect 2024.12.0](https://docs.posit.co/connect/news/#po Gradio app support was introduced. When deploying a Gradio app to a server running an older version of Posit Connect than 2024.12.0, it will error. -### `renv` errors on deployment +## `renv` errors on deployment When deploying `R` projects, it is essential that Posit Publisher has access to a record of the dependencies used by your project to reproduce From 3f81f37fb3a9449aced0ccc59bc058860bb5faf9 Mon Sep 17 00:00:00 2001 From: Marcos Date: Tue, 28 Jan 2025 15:50:24 -0600 Subject: [PATCH 7/7] Update docs/troubleshooting.md Co-authored-by: Jordan Jensen --- docs/troubleshooting.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 4ab83cec3..fcbbfeafa 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -58,13 +58,13 @@ the project on Posit Connect. The [`renv` package](https://rstudio.github.io/renv/articles/renv.html) can create that record as a `lockfile` (commonly named `renv.lock`). -Projects that already include a `lockfile` do not require `renv` be setup. - If an R project doesn't have a `lockfile` on deploy, Posit Publisher prompts to provide a solution to generate the expected `lockfile`. ![](https://cdn.posit.co/publisher/assets/img/publisher-renv-setup-notification.png) +Projects that already include a `lockfile` do not require `renv` be setup. + When uncommon errors occur that Posit Publisher cannot solve for you, it prompts to evaluate the status of `renv` using [`renv::status()`](https://rstudio.github.io/renv/reference/status.html).