Skip to content
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

Support incremental reruns #5

Open
aleclarson opened this issue Oct 17, 2024 · 0 comments
Open

Support incremental reruns #5

aleclarson opened this issue Oct 17, 2024 · 0 comments
Labels
planned This will be added at some point. PR welcome

Comments

@aleclarson
Copy link
Contributor

aleclarson commented Oct 17, 2024

Currently, jumpgen has a store object for preserving arbitrary data between runs. When combined with the changes array, you can manually determine which data in your store has been invalidated, allowing you to know which parts of your generator need to be rerun.

With a new API, we could make this less of a hassle.

  • Add task function that takes a name string and a callback.
  • When a task starts and ends, a "task:start" or "task:end" event is emitted with the task name.
  • Any paths watched from within a task's callback will only invalidate that task when changed.
  • When your generator reruns, some tasks may not rerun and instead will return a memoized result, if nothing they watched has changed.
  • Optionally, you can specify that a task's result should be stored in a filesystem cache, rather than kept in memory. (This feature won't exist in the initial implementation)
@aleclarson aleclarson added the planned This will be added at some point. PR welcome label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
planned This will be added at some point. PR welcome
Projects
None yet
Development

No branches or pull requests

1 participant