Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
lionelperrin wants to merge 2 commits into ruby:master
base: master
Choose a base branch
Loading
from lionelperrin:master
Open

Conversation

@lionelperrin
Copy link

@lionelperrin lionelperrin commented Feb 18, 2020

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

TSMMark reacted with thumbs up emoji
Copy link

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.

Copy link

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
```
Copy link

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?

TSMMark reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /