Dasonk / docstring

Provides docstring like functionality to R functions without requiring the need to create a package.
57 stars 6 forks source link

Fixed namespace issue due to roxygenise call #29

Open ZacharyWaller opened 3 years ago

ZacharyWaller commented 3 years ago

Fixes #28

Since {roxygen2} 7.0.0 (released 2019/11/12) roxygenise uses pkgload::load_all() by default. This ends up loading up the devtools_shims namespace - which includes its own version of the ? function.

This means that when you load up {docstring} you can use docstring's version of ? but, behind the scenes, it runs roxygenise() which then loads up the devtools_shims namespace. Next time you use ? you're running the one loaded up in devtools_shims. This is the source of the error found.

Adding the load = "source" argument in the roxygenise() call bypasses loading up the devtools_shims namespace but still produces the desired behaviour.