Prior to updating to roxygen2
version 6.0.0, it appeared that the package supported using the @export
tag not at the bottom of the function header in a package. For instance:
#' Title
#' @param foo
#' @return bar
#'
#' @export
#'
#' @seealso Other blah blah
The code above would build successfully with roxygen2
properly filling out the namespace when using my installation of roxygen2
version 5.0.1.
However, with the update this form of documentation would not work and roxygen2
actively removes it from the NAMESPACE.R.
I could fix this by moving @export
to the bottom
#' Title
#' @param foo
#' @return bar
#'
#' @seealso Other blah blah
#' @export
My question is whether this issue occurs by design? I can't see anything specifying this change to @export in the release notes: https://github.com/klutometis/roxygen/releases/tag/v6.0.0
Was this always how roxygen2
was supposed to work and the operation up until this point was unintended? Or is this a deliberate change?
N.B. Obviously making a full mwe for different versions is difficult, any suggestions on how to tackle this welcome
EDIT: After further testing I'm beginning to suspect that there is more to this than just roxygen. I am using the build and document shortcuts in rstudio, which I also update recently, and even stepping back to roxygen2
version 5.0.1 stops me rebuilding the documentation of the old functions that used to work.
export
is always last. – Countershadingdocument
from devtools but usingroxygenize()
from roxygen2 directly gives me the same result (mainly that even if export isn't at the bottom it still includes it in the NAMESPACE file) – Rockweedroxygenize()
– Donaldson