You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: warn when dev scaffolding fns are called in prod mode
Closes#808.
## New features
- New internal helper `warn_if_in_prod_mode()` in `R/make_dev.R` emits a
`warning()` when `getOption('golem.app.prod')` is TRUE, naming the
caller via `sys.call(-1)`.
- Wired into 50 exported scaffolding functions across `use_*`, `add_*`
and `set_golem_*` families so that calling them from a deployed app
surfaces a visible alert. `add_resource_path()` is intentionally left
out since it is part of the runtime, not the scaffolding.
## Test plan
- `devtools::test()` — 608 PASS, 0 FAIL.
- `devtools::check()` — 0 errors, 0 warnings, 1 NOTE (environmental
"unable to verify current time").
- New tests cover the helper in isolation (TRUE/FALSE/NULL cases) and
three representative call sites (`use_external_file()`, `add_module()`,
`set_golem_name()`).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments