Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

includeRmd should evaluate chunks in a child of global #972

Closed
lionel- opened this issue Nov 15, 2019 · 4 comments
Closed

includeRmd should evaluate chunks in a child of global #972

lionel- opened this issue Nov 15, 2019 · 4 comments
Labels
bug an unexpected problem or unintended behavior markdown ⬇️
Milestone

Comments

@lionel-
Copy link
Member

lionel- commented Nov 15, 2019

Currently the Rmd is evaluated in a child of the roxygen namespace.

lionel- added a commit to lionel-/tidyselect that referenced this issue Nov 15, 2019
lionel- added a commit to lionel-/tidyselect that referenced this issue Nov 20, 2019
@hadley hadley added bug an unexpected problem or unintended behavior markdown ⬇️ labels Nov 20, 2019
@hadley hadley added this to the v7.0.1 milestone Nov 20, 2019
@hadley hadley closed this as completed in cfadace Nov 20, 2019
@hadley
Copy link
Member

hadley commented Nov 20, 2019

@lionel- can you please confirm this fixes your issue, since I didn't write a unit test.

@lionel-
Copy link
Member Author

lionel- commented Nov 21, 2019

@lionel-
Copy link
Member Author

lionel- commented Oct 4, 2021

One issue with evaluating in a child of global is that closures and quosures are marked with non-default environments and that is a bit distracting in user documentation. Also this makes it more difficult to define S3 methods since tidyverse S3 dispatch (purrr, vctrs) doesn't inspect the calling env, only the global env.

On the other hand evaluating in global would cause more issues of state cleanup (cf #1092).

@lionel-
Copy link
Member Author

lionel- commented Oct 4, 2021

a bit distracting in user documentation

The local env adresses also cause spurious diffs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior markdown ⬇️
Projects
None yet
Development

No branches or pull requests

2 participants