Skip to content

Commit d7504a2

Browse files
committed
ci: restore R.utils, which the dependency trim removed by mistake
R.utils is named in no chapter, which is why b4d3666 dropped it as historical leftovers. It is needed anyway: yulab.utils' download_yulab_file() calls R.utils::gunzip() when gzfile = TRUE, and the only copy of HDO.sqlite on the server is the gzipped one, so gzfile = TRUE is unavoidable here. The failure is silent by design. check_pkg() aborts with a missing_package_error, and download_yulab_file wraps the download and the gunzip in one tryCatch that converts any error to FALSE -- it then walks to the next URL, fails the same way, and returns the destination path as though it had succeeded. The caller sees a plausible path, checks file.exists(), and concludes the network was unreachable. That is why the previous commit's retry() wrapper could not help: the download was never the thing failing. The timeline matches. The last successful publish, on 2026-10-11, ran with R.utils installed and passed this step. Every run since b4d3666 landed has failed here, which is why the site has been frozen at the 10-11 build. Proved by running the step's own R payload out of the workflow file, against a fresh HOME, twice: library without R.utils -> exit 1; the download completes to 100% and leaves HDO.sqlite.gz behind with no HDO.sqlite library with R.utils -> exit 0; HDO.sqlite written, 10.95 MB The lesson is about the method rather than the package. That trim was decided by searching the .qmd sources for mentions, which cannot see a dependency that lives inside another package's code. Same reason the same commit had to keep ggupset and ggridges, which no chapter names either.
1 parent 3a16136 commit d7504a2

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎.github/workflows/publish-book.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@ jobs:
7878
# executed chunks. They currently arrive only as transitive dependencies of
7979
# clusterProfiler, enrichplot and biomaRt; a chapter that calls a package
8080
# should not depend on another package happening to import it.
81+
#
82+
# R.utils looks unused -- no chapter mentions it -- but yulab.utils needs
83+
# it: download_yulab_file(..., gzfile = TRUE) calls R.utils::gunzip()
84+
# after fetching the ontology cache, and the only copy of HDO.sqlite on
85+
# the server is the gzipped one. check_pkg() then aborts, and
86+
# download_yulab_file swallows that into FALSE and returns the
87+
# destination path as though the download had worked, so the cache is
88+
# silently absent and the HDO prewarm step fails. Do not remove it on
89+
# the grounds that it is unreferenced in the .qmd sources: trimming by
90+
# text search cannot see a dependency that lives inside another package.
8191
retry Rscript -e 'options(Ncpus = 1); pak::pkg_install(c(
8292
"cran::dplyr",
8393
"cran::ggplot2",
@@ -94,6 +104,7 @@ jobs:
94104
"cran::wget",
95105
"cran::httr2",
96106
"cran::dotenv",
107+
"cran::R.utils",
97108
"cran::ggupset",
98109
"cran::ggridges",
99110
"cran::shadowtext",

0 commit comments

Comments
 (0)