Trim dependencies: drop glue, uuid, and brew - #167
Merged
Merged
Conversation
Remove three Imports that each had only one or two call sites, reducing the
package's transitive dependency footprint:
- glue: the single `glue::glue()` call in `format_ae_forestly()` is replaced
with an equivalent `sprintf()`.
- uuid: the crosstalk filter id in `ae_forestly()` now uses
`basename(tempfile(""))` instead of `uuid::UUIDgenerate()`.
- brew: add a small base-R `brew()` helper in `R/utils.R` that substitutes
`<%=var%>` placeholders with variables looked up in the caller's
environment, and use it to render `inst/js/sparkline.js`. The var-less
`filter-crosstalk.js` template no longer needs rendering at all, so its
html dependency is now sourced directly from the installed `js/` directory
instead of being copied to `tempdir()`.
No behavior change; interactive plots render identically.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
LittleBeannie
approved these changes
Sep 25, 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.
Summary
Reduces the package's transitive dependency footprint by dropping three
Importsthat each had only one or two call sites. No behavior change — interactive plots render identically and all tests pass.gluesprintf()uuidbasename(tempfile(""))brewbrew()helper inR/utils.RDetails
glue::glue()informat_ae_forestly()becomes an equivalentsprintf().ae_forestly()now usesbasename(tempfile(""))(still unique per session; only needs to be unique for the[id*="filter_ae_"]JS matcher).R/utils.Radds a minimalbrew(file, envir)that substitutes<%=var%>placeholders with variables looked up in the caller's environment (single-pass viaregmatches<-+mget()), used to renderinst/js/sparkline.js. The var-lessfilter-crosstalk.jstemplate needed no rendering at all, sohtml_dependency_filter_crosstalk()now sources it directly from the installedjs/dir instead of copying totempdir().Importsgoes from 10 → 7.Not in scope
reactable+reactR+crosstalk(~35 transitive deps) are the next lever, pending the lightweightltrender migration.ggplot2left as-is.🤖 Generated with Claude Code