You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rake -P output is ambiguous with prereq namespaces #704
When tasks are in a namespace, their pre-reqs "inherit" the namespace prefix.
Given the following rakefile:
task:setupdoputs"global setup, oops"endnamespace:tooldotask:setupdoputs"setting up"endtaskrun: :setupdoputs"running"endtaskrun2: 'tool:setup'doputs"running a second way"endend
The both tasks run and run2 have the same pre-req (setup). However, task run omits the namespace, while run2 is explicit with its pre-req's namespace. Both forms work as expected:
$ rake tool:runsetting uprunning
$ rake tool:run2setting uprunning a second way
However, when the pre-req tree is printed, rake is not clear about what the pre-reqs' full names are.
$ rake -Prake setuprake tool:run setup # <--- This is ambiguous!rake tool:run2 tool:setuprake tool:setup
The expectation is that rake -P prints the "fully resolved" pre-reqs and is thus clear about what task will actually be run. In the example above, it is not clear what tool:run's pre-req is. Is it the "global" setup, task as it appears in the -P output? Or is it in fact tool:setup because it is namespaced?
To be clear, rake's invocation behavior matches my expectations: tool:run invokes tool:setup, not setup. But this behavior is not evident in rake's --prereqs output.
Activity
leoarnold commentedon Jul 31, 2026
@jasonkarns Thanks for pointing this out! Check out #759.
Use fully qualified names when displaying task prerequsites