remake icon indicating copy to clipboard operation
remake copied to clipboard

remake doesn't treat functional sequences the same as functions

Open aammd opened this issue 10 years ago • 1 comments

I finally managed to reproduce my bug! It turns out that changes in functional sequences composed with %>% don't trigger a rebuild of the target, but a true function will.

I've created a repository to hold my minimal reproducible example. in this commit (aammd/remake_fun_seq@9ee1161054c6ad1dc356e05f29d90972acb8875f) i ran remake and got the expected result; in aammd/remake_fun_seq@0bf133a02f861d53325bbb1fb055b2e5f181e05b i changed a value in a functional sequence and ran remake::make(). This didn't trigger a rebuild of the target data3.

This might be an enhancement, not a bug, because you have other things to do besides pander to fashion victims like myself.

On the other hand, I'd argue that the function composition technique encouraged by magrittr is a very remake-ish way to code: there is only one input and one output, and it is easier to type (no need to write function(x) every time you want to simply transform an object).

aammd avatar Mar 15 '15 23:03 aammd

Thanks Andrew! I'll look into this shortly (I've been sans email for the last 10 days and am at the ropensci hackathon/unconference for the next bit). While I've not looked at what causes your problem, I think it's the same root cause as anything where the function is generated by another function, rather than just being by its source, so it might be general.

richfitz avatar Mar 25 '15 06:03 richfitz