~singpolyma/dhall-ruby

ref: b561310f04f8e0b358b39679da096e1d5eb953aa dhall-ruby/lib/dhall/resolve.rb -rw-r--r-- 12.1 KiB
Customizable cache

Caches implemented in this commit:

StandardFileCache - cache conforming to dhall-lang
RamCache - stores in a hash, meant for single-load caching
NoCache - when you want to be sure
Default max import depth of 50

So even without a timeout, there is a limit on bonkers cases.

Standard resolver defaults to INIFINTY since the standard does not
define a depth limit.
Timeout mechanism

Sets timeouts in HTTP readers, checks for deadline exceeded before each
resolution step, and uses Timeout::timeout for pure-ruby computations.
Parse expression from ENV var import

Instead of the path-only support from before.
Standard reader requires UTF-8

To disable heuristics, force remote content to be UTF-8 text.
Add grab-bag of useful utils onto expressions
Pass all import tests
Anything we'll eventually run is a skip
Clean up style violations
Implement integrity checks
Support headers for HTTP import
If trying to import from IPFS, fallback to gateway
First pass at import resolution