moodymudskipper / nakedpipe

Pipe Into a Sequence of Calls Without Repeating the Pipe Symbol.
69 stars 7 forks source link

Temporary values causing issues in debugging #30

Closed jhrcook closed 3 years ago

jhrcook commented 3 years ago

I believe I have found a bug with the debugging pipe. The following code works as expected and a new column x is added with all values 1.

mtcars %.% {
    ~~ .n <- nrow(.)
    ~~ message(paste("There are", .n, "rows at this point."))

    if (.n > 6) {
        add_column(., x = 1)
    } else {
        add_column(., x = 2)
    }
}
#> There are 32 rows at this point.

However, when I try to use the debugging pipe, it breaks at the message with the following error:

Browse[2]> 
debug: side_effect(message(paste("There are", .n, "rows at this point.")))
Browse[2]> 
Error in paste("There are", .n, "rows at this point.") : 
  object '.n' not found

Please let me know if there is any other information you need to address this issue.

moodymudskipper commented 3 years ago

Thanks, it's definitely a bug, I'll get on it!

moodymudskipper commented 3 years ago

Should be solved by 23cb8310bda79c47564d85ebaae4ed2772209c63 , please reinstall, thanks for the report!

github-actions[bot] commented 2 years ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.