Nadrieril / dhall-rust

Maintainable configuration files, for Rust users
Other
303 stars 27 forks source link

Draft add cache to resolve #165

Closed fteychene closed 4 years ago

fteychene commented 4 years ago

Add cache to resolve as defined in standard

Create a Cache that check env vars depending on os and create folder if needed. On resolve_one_import it search in the cache folder if the import hash is available if cache and hash are available. If it exist then resolve and noramlize it. Check that the hash from the cache match the requested cache, if not delete the file from the cache If cache is missing or invalid load te import like before and try to save it if a hash for import is provided.

Todo :

Rel: #135

Nadrieril commented 4 years ago

Great to see you're working on this! Let me know when you'd like me to have a look at it

fteychene commented 4 years ago

Hey @Nadrieril :wave: I think this code could be review

Still working on adding some unit tests on cache.rs but the logic code is reviewable I think

Nadrieril commented 4 years ago

Oh wow this is really good work! Your testing is quite thorough too. I'm happy to merge it as it is, unless you were planning to add some more tests

fteychene commented 4 years ago

It's ok for me, I think it could be merge as it :ok_hand: :rocket:

Thx

Nadrieril commented 4 years ago

Thanks again!