ref: 1f61d1688557fd1b677bfba9b9641fab47a135c5 dhall-ruby/test/test_resolve.rb -rw-r--r-- 9.8 KiB
Fix expectations for tests
implement as Location and use URI internally
Switch IntegrityCheck encoding to multihash
Split IntegrityCheck and NoIntegrityCheck
Not using hexdigest in the constructor anymore
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.
Parse expression from ENV var import

Instead of the path-only support from before.
Pass all import tests
Allow imports to be either binary or source form
Anything we'll eventually run is a skip
Fix test to new binary format

No more null fragment
Implement integrity checks
Support headers for HTTP import
Binary encoding

Every AST node uses as_json to express the generic structure for
encoding itself.  Expression aliases as_cbor to as_json by default and
then uses as_cbor in to_cbor (aliased as to_binary).

This design is because we need to override the encoding of Double for
CBOR, but want to keep the normal Float value for as_json in case that
is used directly (to avoid surprising the user).
If trying to import from IPFS, fallback to gateway
Run all tests on CI
First pass at import resolution