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

[Feature Request] Deno Task caching #26993

Open
shinebayar-g opened this issue Nov 22, 2024 · 1 comment
Open

[Feature Request] Deno Task caching #26993

shinebayar-g opened this issue Nov 22, 2024 · 1 comment
Labels
suggestion suggestions for new features (yet to be agreed) task runner related to deno task

Comments

@shinebayar-g
Copy link

shinebayar-g commented Nov 22, 2024

I really like that I'm able to remove more and more dependencies using Deno!

v2.1 release is awesome. Perhaps this is already discussed internally, but I couldn't find any tickets here. So here we go.

With the help of task inputs and outputs it will be possible to cache task results. NX and Turbo repo uses similar model to achieve task caching.

High level API looks like this:

  1. User defines task inputs and outputs
  2. Deno hashes task inputs and outputs
  3. Deno saves outputs in internal cache

Next time task is run:

  1. Deno hashes input files again
  2. Deno compares new input hash with the previous input hash.
    3a. If the input hashes don't match, Deno clears previous cached content (output) and runs task again.
    3b. If the input hashes match, deno hashes output files and compares with the previous output hash. If the output hashes don't match, restore output contents from the previous output hash. If the output hashes match, do nothing.
@shinebayar-g shinebayar-g changed the title Deno Task caching [Feature Request] Deno Task caching Nov 22, 2024
@dsherret
Copy link
Member

There's a feature request here, but it's a bit broad. It might be good to break it up into issues like this one: #26462

@dsherret dsherret added suggestion suggestions for new features (yet to be agreed) task runner related to deno task labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion suggestions for new features (yet to be agreed) task runner related to deno task
Projects
None yet
Development

No branches or pull requests

2 participants