Skip to content

Commit

Permalink
fix dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gogonzo committed Nov 13, 2024
1 parent b7e837c commit 2f8d88f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ Imports:
checkmate (>= 2.1.0),
grDevices,
lifecycle (>= 0.2.0),
rlang (>= 1.1.0)
rlang (>= 1.1.0),
stats,
utils
Suggests:
cli (>= 3.4.0),
knitr (>= 1.42),
Expand Down
2 changes: 1 addition & 1 deletion R/qenv-c.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ c.qenv <- function(...) {
stop(join_validation)
}

x@code <- modifyList(x@code, y@code)
x@code <- utils::modifyList(x@code, y@code)

# insert (and overwrite) objects from y to x
x@.xData <- rlang::env_clone(x@.xData, parent = parent.env(.GlobalEnv))
Expand Down
4 changes: 2 additions & 2 deletions R/qenv-eval_code.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ setMethod("eval_code", signature = c("qenv", "character"), function(object, code
if (length(parsed_code) == 0) {
# empty code, or just comments
attr(code, "dependency") <- extract_dependency(parsed_code) # in case comment contains @linksto tag
object@code <- c(object@code, setNames(list(code), sample.int(.Machine$integer.max, size = 1)))
object@code <- c(object@code, stats::setNames(list(code), sample.int(.Machine$integer.max, size = 1)))
return(object)
}
code_split <- split_code(paste(code, collapse = "\n"))
Expand Down Expand Up @@ -84,7 +84,7 @@ setMethod("eval_code", signature = c("qenv", "character"), function(object, code
return(x)
}
attr(current_code, "dependency") <- extract_dependency(current_call)
object@code <- c(object@code, setNames(list(current_code), sample.int(.Machine$integer.max, size = 1)))
object@code <- c(object@code, stats::setNames(list(current_code), sample.int(.Machine$integer.max, size = 1)))
}

lockEnvironment(object@.xData, bindings = TRUE)
Expand Down

0 comments on commit 2f8d88f

Please sign in to comment.