denoland / deno_cache_dir

Deno CLI's module cache

Home Page:https://jsr.io/@deno/cache-dir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Occurs missing field error at old cache

kuuote opened this issue · comments

commented

Problem

Cache loading was failed with following message when Deno 1.36.1

error: missing field `now` at line 32 column 1

Appropriate cache file is too old and it metadata is missing now field.

Up until now this field has default value.

https://github.com/denoland/deno/blob/a037ed77a2b2dbef1d2c4175c0401738a13f13bd/cli/cache/http_cache/mod.rs#L26

but now avoid it.
https://github.com/denoland/deno_cache/blob/657b0ecf4946b5606585516778f586da0ce8d179/rs_lib/src/cache.rs#L17

Expected behavior

Load successful without error or recached automatically.

So the deno CLI would always serialize the now field, but this cache library previously didn't. I opened a PR to fix and we'll get this in the next Deno patch this week.