Handling tasks with edge cases #1567
Replies: 2 comments 1 reply
-
I personally favor the idea that the task compilation happens in a separate step & the setup script suggest you write config files & then do the task compilation (after configs that affect tasks). Ideally every time the task compilation is re-run (refreshed) - it reviews all configs again. All but the last option would also benefit from a warning / notice (that sees when configs have changed and suggest a task recompile - if workable). |
Beta Was this translation helpful? Give feedback.
-
I have two possible answers to the problem. First, more directly to the issue of compiling tasks. A useful paradigm for this kind of thing has been around for a long time in the The second is, what if we moved the inflection into a runtime evaluated file, like toml or something? |
Beta Was this translation helpful? Give feedback.
-
Related: #1566
Right now we precompile a selected set of tasks. The ones that are precompiled are the tasks that generally won't change between two separate apps. For example,
lucky gen.task CustomTask
. That task would run the exact same between 2 separate Lucky apps, so this means we can precompile it, and when you run it, it's fast. However,lucky db.migrate
would run different between two Lucky apps because the database is different, credentials may be different...With that said, if you look at the related issue, you'll see that in some cases, someone might want to change how the inflectors are setup. This would change the output between two different apps when doing a
lucky gen.whatever
. To fix this, you would need to know to delete the precompiled tasks you intend to run, and then recompile them.What sort of options do we have to make this a better experience? Here's my ideas:
config/inflectors.cr
file in to consideration.What are your thoughts on these options? Do you have any other ideas for options?
Beta Was this translation helpful? Give feedback.
All reactions