-
Notifications
You must be signed in to change notification settings - Fork 627
New dsl method: lazy(&block) #339
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
Conversation
1969c9b to
2458477
Compare
TSMMark
commented
Jun 9, 2020
This is awesome! I am in need of something like this, and would love to see this merged and released if possible.
TSMMark
commented
May 5, 2023
I'm surprised this doesn't have more traction... Everyone enjoys longer load times because they're loading extra code they don't need all the time I suppose?
Any words from maintainers what it would take to get this merged? Thanks!
Make possible to lazy define tasks in a namespace. The tasks are
loaded only on lookup.
Lazy definitions can be executed on purpose when using the option
--load-lazy-definitions so that `rake --tasks --load-lazy-definitions`
list all tasks including the one defined in a lazy way.
Example of lazy definitions:
```
namespace 'a' do
lazy { task 't' }
end
```
or
```
namespace 'a' do
lazy { load 'namespace_a.rake' }
end
```
gillisd
commented
May 29, 2025
Just discovered this PR, thank you for your hard work @lionelperrin! I too would love to see this merged, is there anything preventing it from doing so?
Make possible to lazy define tasks in a namespace. The tasks are
loaded only on lookup.
Lazy definitions can be executed on purpose when using the option
--load-lazy-definitions so that
rake --tasks --load-lazy-definitionslist all tasks including the one defined in a lazy way.
Example of lazy definitions:
or