Commit c02ace5
authored
PR1706 follow-ups (#1716)
* fix(plot): avoid leaking plot_backend into the global environment
profile.R is sourced as the user's R_PROFILE_USER, so the top-level
plot_backend assignment created a stray variable in the user's global
environment that persisted after startup (reported by @Fred-Wu).
Wrap the sess::connect() setup in local() so the temporary plot_backend
binding stays scoped, matching the pattern used by the .Rprofile block
above it.
* feat(plot): warn when a requested plot backend is unavailable
When r.plot.backend explicitly selects jgd or httpgd (or the legacy
r.plot.useHttpgd is true) but the package is not installed, register_hooks
silently fell back to the standard viewer. The standard viewer has no
plot-cycling UI, so users saw a degraded experience with no explanation
(several reports on #1706).
Emit a warning from register_hooks naming the requested backend and the
remedy, but only when a specific backend was explicitly requested. The
auto mode (use_jgd && use_httpgd) still degrades silently by design.1 parent 1802ecb commit c02ace5
2 files changed
Lines changed: 28 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
165 | 185 | | |
166 | 186 | | |
167 | 187 | | |
| |||
0 commit comments