From 05acd0b967c6977bb04774e6e3095f9502cb2a53 Mon Sep 17 00:00:00 2001 From: Joshua Kunst Date: Mon, 27 Jul 2026 15:32:20 -0400 Subject: [PATCH 01/10] Prepare runtime dependency fixes --- .github/workflows/patch-runtime-deps.yml | 55 ++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/patch-runtime-deps.yml diff --git a/.github/workflows/patch-runtime-deps.yml b/.github/workflows/patch-runtime-deps.yml new file mode 100644 index 0000000..3bcf3e3 --- /dev/null +++ b/.github/workflows/patch-runtime-deps.yml @@ -0,0 +1,55 @@ +name: Patch runtime dependencies + +on: + push: + branches: [fix-shinylive-runtime-deps] + +permissions: + contents: write + +jobs: + patch: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + ref: fix-shinylive-runtime-deps + + - name: Apply dependency declarations + shell: python + run: | + from pathlib import Path + + def insert_after(path, anchor, line): + p = Path(path) + text = p.read_text() + if line in text: + return + text = text.replace(anchor, anchor + "\n" + line, 1) + p.write_text(text) + + insert_after("roc-curve/app.R", "library(tibble)", "library(markdown)") + insert_after("kmeans/app.R", "library(deldir)", "library(markdown)") + insert_after("logistic-regression/app.R", "library(markdown)", "library(broom)") + + p = Path(".github/workflows/pages.yml") + text = p.read_text() + anchor = " any::bslib\n" if " any::bslib\n" in text else " any::cli\n" + additions = "" + if " any::broom\n" not in text: + additions += " any::broom\n" + if " any::markdown\n" not in text: + additions += " any::markdown\n" + if additions: + text = text.replace(anchor, anchor + additions, 1) + p.write_text(text) + + Path(".github/workflows/patch-runtime-deps.yml").unlink() + + - name: Commit fixes + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add . + git commit -m "Declare Shinylive runtime dependencies" + git push From 7cb0d76d7d456dc914b0e40eea0c2019ea8f7931 Mon Sep 17 00:00:00 2001 From: Joshua Kunst Date: Mon, 27 Jul 2026 15:33:45 -0400 Subject: [PATCH 02/10] Trigger runtime dependency patch From a8bd10a59cfd0bc9a24b45acbafd1af9befe4eea Mon Sep 17 00:00:00 2001 From: Joshua Kunst Date: Mon, 27 Jul 2026 15:35:03 -0400 Subject: [PATCH 03/10] Declare broom in logistic regression app --- logistic-regression/app.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/logistic-regression/app.R b/logistic-regression/app.R index d6f3991..03d65b0 100644 --- a/logistic-regression/app.R +++ b/logistic-regression/app.R @@ -6,6 +6,7 @@ library(ggplot2) library(stringr) library(scales) library(markdown) +library(broom) library(risk3r) # remotes::install_github("jbkunst/risk3r", force = TRUE) library(klassets) # remotes::install_github("jbkunst/klassets", force = TRUE) @@ -213,4 +214,4 @@ server <- function(input, output, session) { } -shinyApp(ui, server) \ No newline at end of file +shinyApp(ui, server) From 7f8e79a4db11f94af7487aac3c9b35e6ecfef4ab Mon Sep 17 00:00:00 2001 From: Joshua Kunst Date: Mon, 27 Jul 2026 15:35:29 -0400 Subject: [PATCH 04/10] Declare hidden ROC Curve Shinylive dependency --- roc-curve/shinylive-deps.R | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 roc-curve/shinylive-deps.R diff --git a/roc-curve/shinylive-deps.R b/roc-curve/shinylive-deps.R new file mode 100644 index 0000000..04de86a --- /dev/null +++ b/roc-curve/shinylive-deps.R @@ -0,0 +1,4 @@ +# Dependencies used indirectly at runtime and not detected from app.R. +if (FALSE) { + library(markdown) +} From 45e804128a7ed177147862fa6f9c19b890c06d6a Mon Sep 17 00:00:00 2001 From: Joshua Kunst Date: Mon, 27 Jul 2026 15:35:44 -0400 Subject: [PATCH 05/10] Declare hidden K-means Shinylive dependency --- kmeans/shinylive-deps.R | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 kmeans/shinylive-deps.R diff --git a/kmeans/shinylive-deps.R b/kmeans/shinylive-deps.R new file mode 100644 index 0000000..04de86a --- /dev/null +++ b/kmeans/shinylive-deps.R @@ -0,0 +1,4 @@ +# Dependencies used indirectly at runtime and not detected from app.R. +if (FALSE) { + library(markdown) +} From f18a08e418dc6c26ec12c48a659dda491f1f953c Mon Sep 17 00:00:00 2001 From: Joshua Kunst Date: Mon, 27 Jul 2026 15:36:17 -0400 Subject: [PATCH 06/10] Install explicit Shinylive runtime dependencies --- .github/workflows/pages.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 2eb4b4c..b4f9d2a 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -36,11 +36,13 @@ jobs: uses: r-lib/actions/setup-r-dependencies@v2 with: packages: | + any::broom any::cli any::dplyr any::fs any::glue any::httpuv + any::markdown any::purrr any::quarto any::shinylive @@ -56,7 +58,7 @@ jobs: uses: actions/cache@v4 with: path: ~/.cache/shinylive - key: ${{ runner.os }}-shinylive-${{ hashFiles('**/app.R') }} + key: ${{ runner.os }}-shinylive-${{ hashFiles('**/app.R', '**/shinylive-deps.R') }} restore-keys: | ${{ runner.os }}-shinylive- From 50dd6cdbe50efd03b97353bd5c6a24b29f4976e4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 19:36:34 +0000 Subject: [PATCH 07/10] Declare Shinylive runtime dependencies --- .github/workflows/patch-runtime-deps.yml | 55 ------------------------ kmeans/app.R | 1 + roc-curve/app.R | 1 + 3 files changed, 2 insertions(+), 55 deletions(-) delete mode 100644 .github/workflows/patch-runtime-deps.yml diff --git a/.github/workflows/patch-runtime-deps.yml b/.github/workflows/patch-runtime-deps.yml deleted file mode 100644 index 3bcf3e3..0000000 --- a/.github/workflows/patch-runtime-deps.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Patch runtime dependencies - -on: - push: - branches: [fix-shinylive-runtime-deps] - -permissions: - contents: write - -jobs: - patch: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - with: - ref: fix-shinylive-runtime-deps - - - name: Apply dependency declarations - shell: python - run: | - from pathlib import Path - - def insert_after(path, anchor, line): - p = Path(path) - text = p.read_text() - if line in text: - return - text = text.replace(anchor, anchor + "\n" + line, 1) - p.write_text(text) - - insert_after("roc-curve/app.R", "library(tibble)", "library(markdown)") - insert_after("kmeans/app.R", "library(deldir)", "library(markdown)") - insert_after("logistic-regression/app.R", "library(markdown)", "library(broom)") - - p = Path(".github/workflows/pages.yml") - text = p.read_text() - anchor = " any::bslib\n" if " any::bslib\n" in text else " any::cli\n" - additions = "" - if " any::broom\n" not in text: - additions += " any::broom\n" - if " any::markdown\n" not in text: - additions += " any::markdown\n" - if additions: - text = text.replace(anchor, anchor + additions, 1) - p.write_text(text) - - Path(".github/workflows/patch-runtime-deps.yml").unlink() - - - name: Commit fixes - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git add . - git commit -m "Declare Shinylive runtime dependencies" - git push diff --git a/kmeans/app.R b/kmeans/app.R index e0c3a4e..51b7113 100644 --- a/kmeans/app.R +++ b/kmeans/app.R @@ -8,6 +8,7 @@ library(tibble) library(stringr) library(klassets) library(deldir) +library(markdown) # theme options ----------------------------------------------------------- thematic::thematic_shiny(font = "auto") diff --git a/roc-curve/app.R b/roc-curve/app.R index e632841..9cc52f8 100644 --- a/roc-curve/app.R +++ b/roc-curve/app.R @@ -3,6 +3,7 @@ library(shiny) library(bslib) library(highcharter) library(tibble) +library(markdown) # theme ------------------------------------------------------------------- apptheme <- bs_theme(primary = "#007BC2") From 8911d5eb3461d62773d8931c30eefedba903a329 Mon Sep 17 00:00:00 2001 From: Joshua Kunst Date: Mon, 27 Jul 2026 15:37:51 -0400 Subject: [PATCH 08/10] Remove redundant Shinylive dependency helper --- roc-curve/shinylive-deps.R | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 roc-curve/shinylive-deps.R diff --git a/roc-curve/shinylive-deps.R b/roc-curve/shinylive-deps.R deleted file mode 100644 index 04de86a..0000000 --- a/roc-curve/shinylive-deps.R +++ /dev/null @@ -1,4 +0,0 @@ -# Dependencies used indirectly at runtime and not detected from app.R. -if (FALSE) { - library(markdown) -} From 4756495da7b99d5686111b40e26f1b3891790c02 Mon Sep 17 00:00:00 2001 From: Joshua Kunst Date: Mon, 27 Jul 2026 15:38:00 -0400 Subject: [PATCH 09/10] Remove redundant Shinylive dependency helper --- kmeans/shinylive-deps.R | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 kmeans/shinylive-deps.R diff --git a/kmeans/shinylive-deps.R b/kmeans/shinylive-deps.R deleted file mode 100644 index 04de86a..0000000 --- a/kmeans/shinylive-deps.R +++ /dev/null @@ -1,4 +0,0 @@ -# Dependencies used indirectly at runtime and not detected from app.R. -if (FALSE) { - library(markdown) -} From cf838f95d1ca64cb46a83ac03939e38b5caade60 Mon Sep 17 00:00:00 2001 From: Joshua Kunst Date: Mon, 27 Jul 2026 15:39:09 -0400 Subject: [PATCH 10/10] Keep Shinylive cache keyed by app sources --- .github/workflows/pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index b4f9d2a..30b65ba 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -58,7 +58,7 @@ jobs: uses: actions/cache@v4 with: path: ~/.cache/shinylive - key: ${{ runner.os }}-shinylive-${{ hashFiles('**/app.R', '**/shinylive-deps.R') }} + key: ${{ runner.os }}-shinylive-${{ hashFiles('**/app.R') }} restore-keys: | ${{ runner.os }}-shinylive-