rake icon indicating copy to clipboard operation
rake copied to clipboard

Enhancement: Document and add a command line option to show all implicit rules

Open apatniv opened this issue 1 year ago • 0 comments

We can easily verify that a file task is synthesized whenever rake finds that user provided task doesn't match any defined tasks and there is file with that name.

How to reproduce

# create an empty rakefile 
(ins)-> touch rakefile

# Try to execute hello_world task
ins)-> rake hello_world
rake aborted!
Don't know how to build task 'hello_world' (See the list of available tasks with `rake --tasks`)

(See full trace by running task with --trace)

# create a file by name hello_world and task which failed previously will succeed now. 
(ins)-> touch hello_world
(ins)-> rake hello_world

I feel this behavior should be documented and possibly a new command line option can be added. This new option will list all implicit rules just like how make does it.

apatniv avatar Jan 29 '24 03:01 apatniv