deno
8ff0fd2e - fix(task): fold appended CLI args into the input cache fingerprint

Commit
44 days ago
fix(task): fold appended CLI args into the input cache fingerprint Address review feedback. The fingerprint hashed only the command string, but the executed command is get_script_with_args(command, argv), so `deno task build foo` and `deno task build bar` produced the same fingerprint and the second run was wrongly skipped with the first run's args. Add argv to the cache key, hash it (length-prefixed) into the fingerprint, and render the cached-output line with the appended args so it reflects what actually ran. Expand the spec test to cover the argv case plus env-var invalidation, command change, and the glob-matches-nothing bail-out. Document the first-pass caveats (outputs not restored on hit; tasks that mutate their own inputs never cache) on the cache module and the deno.json `files` schema.
Author
Parents
Loading