New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Look for Sakefile in parent folders as well #23
Conversation
|
Is there prior art on this for any other build tools? This seems like it could end up surprising the user. |
|
Good point. |
Rake does it. Rakefile: task :default do
puts 'default'
endTrying it out: alex@librepad:~/raketest/foo$ rakeOutput: |
|
@wbiker maybe it's a good idea to look how Rake does it. For example, maybe there are some edge cases that need to be covered? Otherwise looks good to me. |
|
-0.5 from me. |
|
I dent to close this PR. Sake is around quite a while and I have no idea what side effects could be shown if it is merged. |
Now is probably the best time to make a change like this. However, the PR has to be modified I think. One problem, as far as I can see, is that it does not Also, currently it evals all of the Sakefiles up to |
|
@AlexDaniel ...it does not chdir into the directory where the sakefile file is located... |
|
Since this issue is more than just looking for sakefiles in the path, I close this. |
|
@wbiker Maybe consider making a module that depends on and uses Sake? This way you can have let's say |
|
Thanks. Will stick with my changed code for now. But will think about that |
My idea was to be able to have not just one Sakefile in the current folder, instead Sakefiles in parent folders should be find as well. That has the benefit, that tasks can be available or overwritten depending of the current working folder.
For that, I added a method to the pm file plus a test file to test it.
Changed the behavior though. Sake no longer dies if a task already exists. It just ignores the task found in parent folders with the same name. So, always the task is used that is the nearest to the current working dir. That might be not the desired approach for other users.