remake icon indicating copy to clipboard operation
remake copied to clipboard

delete from command line

Open dfalster opened this issue 10 years ago • 1 comments

Is it possible expose remake::delete function in the command line interface? i nearly always use remake from the command line. There it's possible to build targets, but not to delete (as far as i can tell)

➜  testthat git:(master) remake  plot.pdf
[  LOAD ] 
[  READ ]           |  # loading sources
<  MAKE > plot.pdf
[    OK ] data.csv
[    OK ] processed
[    OK ] plot.pdf
➜  testthat git:(master) remake delete plot.pdf
Error in assert_has_targets(target_names, obj) : No such target delete
Calls: <Anonymous> ... remake_update -> remake_is_current -> assert_has_targets
Execution halted

dfalster avatar Sep 11 '15 03:09 dfalster

This is an ongoing problem with the command line interface for remake, and that I would like feedback on at some point (I'll create a new issue once I document it fully and tag you). The short version is this:

We want

remake <foo>

to build the target <foo> -- even if foo is delete. That makes it hard to use other remake commands (not just delete but also diagram might be nice, archive import / archive export might be useful). So how do we have both?

One option could be

remake --delete <foo>

and proliferate --command args. Another way would be to use the -- operator:

remake -- make <foo> # same as remake foo
remake -- delete <foo>

Or go with something else like R CMD <foo> does, like remake CMD make <foo>

richfitz avatar Sep 11 '15 09:09 richfitz