ruby / rake

A make-like build utility for Ruby.

Home Page:https://ruby.github.io/rake

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`rule` does not accept prereqs with Symbol names

jasonkarns opened this issue · comments

It is common for non-file-based tasks to be given names as symbols. It is also common to use symbols as the names of prereq tasks. However, when attempting to define a rule which has non-file-based prereqs, rule will not accept Symbols as prereqs.

task :nonfile

rule ".json" => ['%d', :nonfile] do
end

The output is:

rake aborted!
Don't know how to handle rule dependent: :nonfile

The cause of the error is traced to TaskManager where Symbol is not a valid case match.

when String