diff --git a/DESCRIPTION b/DESCRIPTION index 52ac15f33..9713609bd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: teal.code Title: Code Storage and Execution Class for 'teal' Applications -Version: 0.7.0.9006 +Version: 0.7.1 Date: 2025-12-15 Authors@R: c( person("Dawid", "Kaledkowski", , "dawid.kaledkowski@roche.com", role = c("aut", "cre")), diff --git a/NEWS.md b/NEWS.md index ce8fde311..3f1e70ef8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,8 @@ -# teal.code 0.7.0.9006 +# teal.code 0.7.1 + +### Bug fixes + +* Fix a problem detecting dependencies when using subassignemnts reusing the same object (#276). # teal.code 0.7.0 diff --git a/R/qenv-within.R b/R/qenv-within.R index 9e229d38c..925535ed8 100644 --- a/R/qenv-within.R +++ b/R/qenv-within.R @@ -3,8 +3,11 @@ #' `within()` is a convenience method that wraps `eval_code` to provide a simplified way of passing expression. #' `within` accepts only inline expressions (both simple and compound) and allows to substitute `expr` #' with `...` named argument values. -#' Functions that trigger side effects like `options` or `set.seed` can be linked to specific objects for further code retrieval (with `get_code`), but only through `eval_code` where code input as `character`. `within` works on `expressions` that do not preserve comments, hence you can not use `# @linksto` tag explained in `get_code`. -#' @alias within +#' Functions that trigger side effects like `options` or `set.seed` can be +#' linked to specific objects for further code retrieval (with `get_code`), but +#' only through `eval_code` where code input as `character`. `within` works on +#' `expressions` that do not preserve comments, hence you can not use `# @linksto` tag explained in `get_code`. +#' @aliases within #' @section Using language objects with `within`: #' Passing language objects to `expr` is generally not intended but can be achieved with `do.call`. #' Only single `expression`s will work and substitution is not available. See examples. diff --git a/R/utils-get_code_dependency.R b/R/utils-get_code_dependency.R index 954448d31..4adea57db 100644 --- a/R/utils-get_code_dependency.R +++ b/R/utils-get_code_dependency.R @@ -365,7 +365,7 @@ move_functions_after_arrow <- function(ans, functions) { #' Static code analysis may be insufficient to determine which objects are created or modified by such a function call. #' The `@linksto` comment tag is introduced to mark a call as having a (side) effect on one or more objects. #' With this tag a complete object dependency structure can be established. -#' Read more about side effects and the usage of `@linksto` tag in [`get_code_dependencies()`] function. +#' Read more about side effects and the usage of `@linksto` tag in [`get_code()`] function. #' #' @param pd `data.frame`; #' one of the results of `utils::getParseData()` split into subsets representing individual calls; diff --git a/inst/WORDLIST b/inst/WORDLIST index bfd17ef20..298d57078 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -2,3 +2,4 @@ Forkers Hoffmann funder qenv +subassignemnts diff --git a/man/within.qenv.Rd b/man/within.qenv.Rd index 6a2b1937b..eddb5de0e 100644 --- a/man/within.qenv.Rd +++ b/man/within.qenv.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/qenv-within.R \name{within.qenv} \alias{within.qenv} +\alias{within} \title{Evaluate code in \code{qenv}} \usage{ \method{within}{qenv}(data, expr, ...) @@ -21,7 +22,10 @@ Evaluate code in \code{qenv} \code{within()} is a convenience method that wraps \code{eval_code} to provide a simplified way of passing expression. \code{within} accepts only inline expressions (both simple and compound) and allows to substitute \code{expr} with \code{...} named argument values. -Functions that trigger side effects like \code{options} or \code{set.seed} can be linked to specific objects for further code retrieval (with \code{get_code}), but only through \code{eval_code} where code input as \code{character}. \code{within} works on \code{expressions} that do not preserve comments, hence you can not use \verb{# @linksto} tag explained in \code{get_code}. +Functions that trigger side effects like \code{options} or \code{set.seed} can be +linked to specific objects for further code retrieval (with \code{get_code}), but +only through \code{eval_code} where code input as \code{character}. \code{within} works on +\code{expressions} that do not preserve comments, hence you can not use \verb{# @linksto} tag explained in \code{get_code}. } \section{Using language objects with \code{within}}{