Stop R CMD CHECK from rebuilding markdown vignettes#16
Merged
Conversation
Copilot
AI
changed the title
[WIP] Remove VignetteBuilder entry to prevent re-compilation of vignettes
Stop R CMD CHECK from rebuilding markdown vignettes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
R CMD CHECK was failing because vignette installation tried to re-render
.Rmdfiles and expected HTML/PDF outputs, while this repo tracks pre-rendered markdown vignettes (github_document). This change switches package metadata to treat vignette markdown as precompiled docs instead of knitr build targets.Problem alignment
.Rmdrebuild for vignettes that intentionally output.md.Changes
DESCRIPTIONVignetteBuilder: knitr.R-CMD-checkworkflow without a--no-build-vignettesargs override (reverted/original behavior).Resulting behavior
vignettes/*.mdare treated as checked-in documentation artifacts, avoiding install-time vignette recompilation expectations for HTML/PDF.Original prompt
Use pre-compiled markdown vignettes without knitr rebuilding.
Problem
The R-CMD-check workflow fails because R CMD CHECK attempts to re-compile
.Rmdvignettes during package installation. The vignettes useoutput: github_documentformat which generates.mdfiles, but R CMD CHECK expects.htmlor.pdfoutput. The--no-build-vignettesflag doesn't work because the vignette compilation happens during package installation, not during the check phase.Solution
Remove the
VignetteBuilder: knitrentry from DESCRIPTION file. This tells R that:.mdfiles in vignettes/ are pre-compiled documentation, not build artifactsThis approach:
github_documentoutput format (git-friendly diffs).mdfiles in version controlFiles to Change
VignetteBuilder: knitrargsparameter with--no-build-vignettes(revert to original)Why This Works
Without VignetteBuilder specified, R treats the vignettes/ directory as regular documentation, not as build artifacts that need compilation. R CMD CHECK skips the vignette building step entirely.
The following is the prior conversation context from the user's chat exploration (may be truncated):
Assistant: Entiendo. Ese job que me diste es del run anterior (el que falló). Necesitas que se ejecute un nuevo run con tu cambio actualizado.
Opción rápida: Fuerza un re-run desde GitHub
O si prefieres hacerlo por CLI:
Eso ejecutará el workflow de nuevo con tu cambio del
_R_CHECK_VIGNETTES_SKIP_RUN_: trueincluido en el archivo.¿Ya lo hiciste o quieres que te ayude con otra cosa?
User: (r-reticulate) K29054NKJK:Open-Hotgenes virger$ gh run rerun 26854962034
bash: gh: command not found
Assistant: Necesitas instalar
gh(GitHub CLI). Pero hay una forma más fácil:Simplemente haz un commit vacío y push a tu rama del PR:
git commit --allow-empty -m "Trigger workflow re-run" git pushEso triggeará automáticamente el workflow con tu cambio del
_R_CHECK_VIGNETTES_SKIP_RUN_: true.O si prefieres la UI: Ve a https://github.com/pfizer-opensource/Open-Hotgenes/actions/runs/26854962034 y busca el botón "Re-run failed jobs" en la parte superior derecha.
¿Cuál prefieres?
User: que tal con los workflows?
Assistant: Excelente! ✅ Tu cambio funciona:
El run 26859113069 es el nuevo que triggeaste con tu commit "Update R-CMD-check.yml":
_R_CHECK_VIGNETTES_SKIP_RUN_: truein_progress(ejecutándose ahora)Espera a que termine (unos 10-15 minutos). Cuando complete, debería mostrar
successen todos los jobs en lugar defailure.¿Quieres que revise el resultado cuando termine o prefieres que le des un vistazo tú directamente?
User: https://github.com/pfizer-opensource/Open-Hotgenes/actions/runs/26859113069/job/79208573704?pr=14
Assistant: ❌ El cambio NO funcionó como esperado. El problema es que:
La variable de entorno
_R_CHECK_VIGNETTES_SKIP_RUN_no se está aplicando correctamente porque la acciónr-lib/actions/check-r-packagesigue intentando compilar las viñetas.El error ahora es diferente (vemos más detalles):
.htmlni.pdf)Could not resolve hostname zenodo.org) - intentan descargar datos✅ Solución Correcta - Opción 2 (Deshabilitar viñetas)
Necesitamos usar la opción
argsen lugar de una variable de entorno:Agregar
"--no-build-vignettes"alargs. ¿Quieres que haga ese cambio?User: si
Assistant: Necesito tu confirmación para hacer el cambio. Te voy a mostrar exactamente qué se va a cambiar:
Cambio en
.github/workflows/R-CMD-check.yml(línea 52-56):