insightsengineering / insightsengineering/teal.code
[Feature Request]: Explore and implement robust sandboxing mechanism
- Dominant language
- R
- Stars
- 12
- Forks
- 11
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 1
Description
### Feature description
Currently `eval_code` evaluates each call in the new (cloned) environment where `parent.env(env) <- parent.env(.GlobalEnv)`. When executing `library` via `eval_code` new `library` is added over each `qenv@env` - i.e. all `qenv` objects have the same package-namespaces in the search path.
We would like to separate `@env` as much as possible.
### Separate search path for each `env@env`
So that each `qenv` is a child of libraries which have been attached in this `eval_code`

### Separate `qenv` sessions
Other solution is to separate sessions where `eval_code` is executed [rlang::r_session](https://callr.r-lib.org/reference/r_session.html)
Contributor guide
Assessment
This issue has not been assessed yet.