Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Incorrect command in debug mode  #975

@wlandau

Description

@wlandau

In targets 0.14.0:

targets/R/class_builder.R

Lines 231 to 237 in 32ef529

target$command$expr <- as.expression(
list(
instructions = quote(targets::tar_debug_instructions()),
browser = quote(browser()),
expr = target$command$expr
)
)

If you continue in the debugger, the target will ignore any debug(your_function) calls and return the quoted expression in target$command$expr rather than the result of evaluating target$command$expr. The code excerpt in R/class_builder.R needs to be this:

target$command$expr <- c(
  expression(targets::tar_debug_instructions()),
  expression(browser()),
  target$command$expr
)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions