Closed anthonypileggi closed 3 years ago
hey @anthonypileggi, thanks for the bug report! You're almost certainly right that this is a side effect of using prex_r
. What version of slackr
are you on?
I'll try to repro and ship and new version. I might just roll back the mechanism slackr
uses to get off of using reprex
, since I think the error handling was a little better before, too.
Awesome, thanks for the quick response @mrkaye97 and all your hard work on this package!
I encountered this problem on both the cran (v3.0.1) and dev (v3.1.1) versions, but it works fine on v2.4.1.
Yep, makes sense! Thanks. 3.0.0+
relies on reprex
for rendering, so that checks out. I'll write a test for this tonight and see if I can ship a fix. No guarantees till the weekend though -- I'll report back
Alright @anthonypileggi, so I've looked into this and AFAICT, there's no way around the eval environment issue that you pointed out. I'm going to roll back to the old eval scheme and then see if I can update this to something better later on.
When wrapped within a function,
slackr()
cannot evaluate expressions involving variables that have been defined within the scope of the function.I wonder if this is a side-effect of using
prex_r()
and what environment it is evaluating in. I've also encountered the same issue when usingslackr_bot()
.