diff options
Diffstat (limited to '')
183 files changed, 1805 insertions, 306 deletions
@@ -32,6 +32,11 @@ dependencies = [ ] [[package]] +name = "anyhow" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "arrayvec" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -45,6 +50,21 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "autocfg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "base64" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "block-buffer" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -64,6 +84,11 @@ dependencies = [ ] [[package]] +name = "bumpalo" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "byte-tools" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -74,11 +99,43 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "bytes" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "c2-chacha" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cc" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "cfg-if" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "core-foundation" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "core-foundation-sys" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "ctor" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -103,9 +160,11 @@ dependencies = [ "pest_generator 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_cbor 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -133,16 +192,102 @@ dependencies = [ ] [[package]] +name = "dtoa" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "either" version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "encoding_rs" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "fake-simd" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "fnv" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-channel" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-io" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-sink" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-task" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-util" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "generic-array" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -151,16 +296,129 @@ dependencies = [ ] [[package]] +name = "getrandom" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "h2" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "half" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "heck" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "hermit-abi" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "hex" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "http" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "http-body" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "httparse" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "hyper" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "hyper-tls" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "idna" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "indexmap" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -169,6 +427,14 @@ dependencies = [ ] [[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "itertools" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -177,6 +443,28 @@ dependencies = [ ] [[package]] +name = "itoa" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "js-sys" +version = "0.3.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -194,22 +482,119 @@ dependencies = [ ] [[package]] +name = "libc" +version = "0.2.67" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "log" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "maplit" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "matches" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "memchr" version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "mime_guess" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mio" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miow" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "native-tls" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.10.28 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "net2" +version = "0.2.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "nodrop" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "nom" +version = "4.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "nom" version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ @@ -219,6 +604,15 @@ dependencies = [ ] [[package]] +name = "num_cpus" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "hermit-abi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "once_cell" version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -229,6 +623,36 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "openssl" +version = "0.10.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "openssl-probe" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "openssl-sys" +version = "0.9.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", + "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "output_vt100" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -303,6 +727,44 @@ dependencies = [ ] [[package]] +name = "pin-project" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-internal" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-lite" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pin-utils" +version = "0.1.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pkg-config" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "ppv-lite86" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "pretty" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -348,6 +810,90 @@ dependencies = [ ] [[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_chacha" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "redox_syscall" +version = "0.1.56" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "remove_dir_all" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "reqwest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-tls 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "rustc_version" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -369,6 +915,34 @@ dependencies = [ ] [[package]] +name = "schannel" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "security-framework" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "security-framework-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "semver" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -419,6 +993,27 @@ dependencies = [ ] [[package]] +name = "serde_json" +version = "1.0.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "serde_urlencoded" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] name = "sha-1" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -430,11 +1025,21 @@ dependencies = [ ] [[package]] +name = "slab" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "smallvec" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "sourcefile" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "static_assertions" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -450,6 +1055,77 @@ dependencies = [ ] [[package]] +name = "tempfile" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "time" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-tls" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-util" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tower-service" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "try-lock" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "typed-arena" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -465,16 +1141,65 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "unicase" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "smallvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-segmentation" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "unicode-xid" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "url" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "vcpkg" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "version_check" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "version_check" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "walkdir" version = "2.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -485,6 +1210,122 @@ dependencies = [ ] [[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "wasm-bindgen" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "wasm-bindgen-webidl" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "web-sys" +version = "0.3.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "weedle" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "winapi" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -494,6 +1335,11 @@ dependencies = [ ] [[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -511,35 +1357,103 @@ name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winreg" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [metadata] "checksum abnf 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e065019cf2f9438a593954cc8e774925656b86701b72720b82ec3141e682ac14" "checksum annotate-snippets 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c7021ce4924a3f25f802b2cccd1af585e39ea1a363a1aa2e72afe54b67a3a7a7" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +"checksum anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" "checksum arrayvec 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" "checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" +"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" +"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" "checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" "checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +"checksum bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1f359dc14ff8911330a51ef78022d376f25ed00248912803b58f00cb1c27f742" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" +"checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" +"checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" +"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +"checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" +"checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum ctor 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8ce37ad4184ab2ce004c33bf6379185d3b1c95801cab51026bd271bf68eedc" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" "checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +"checksum dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" "checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" +"checksum encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" +"checksum futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" +"checksum futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" +"checksum futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" +"checksum futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" +"checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" "checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +"checksum h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1" "checksum half 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9ff54597ea139063f4225f1ec47011b03c9de4a486957ff3fc506881dac951d0" +"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +"checksum hermit-abi 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1010591b26bbfe835e9faeabeb11866061cc7dcebffd56ad7d0942d0e61aefd8" "checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" +"checksum http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b" +"checksum http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" +"checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" +"checksum hyper 0.13.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fa1c527bbc634be72aa7ba31e4e4def9bbb020f5416916279b7c705cd838893e" +"checksum hyper-tls 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa" +"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" "checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2" +"checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" "checksum itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" +"checksum itoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" +"checksum js-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9" +"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum lexical-core 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2304bccb228c4b020f3a4835d247df0a02a7c4686098d4167762cfbbe4c5cb14" +"checksum libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018" +"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum maplit 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" +"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" +"checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +"checksum mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" +"checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" +"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +"checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" +"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" "checksum nodrop 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" +"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" "checksum nom 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c618b63422da4401283884e6668d39f819a106ef51f5f59b81add00075da35ca" +"checksum num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" "checksum once_cell 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b1c601810575c99596d4afc46f78a678c80105117c379eb3650cf99b8a21ce5b" "checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" +"checksum openssl 0.10.28 (registry+https://github.com/rust-lang/crates.io-index)" = "973293749822d7dd6370d6da1e523b0d1db19f06c459134c658b2a4261378b52" +"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" +"checksum openssl-sys 0.9.54 (registry+https://github.com/rust-lang/crates.io-index)" = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986" "checksum output_vt100 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" "checksum pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e4fb201c5c22a55d8b24fef95f78be52738e5e1361129be1b5e862ecdb6894a" @@ -548,30 +1462,79 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" "checksum pest_generator 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9fcf299b5712d06ee128a556c94709aaa04512c4dffb8ead07c5c998447fc0" "checksum pest_meta 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "df43fd99896fd72c485fe47542c7b500e4ac1e8700bf995544d1317a60ded547" +"checksum pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c" +"checksum pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f" +"checksum pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" +"checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" +"checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" +"checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" "checksum pretty 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f60c0d9f6fc88ecdd245d90c1920ff76a430ab34303fc778d33b1d0a4c3bf6d3" "checksum pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427" "checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" "checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27" "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +"checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +"checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" +"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" +"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" +"checksum reqwest 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a9f62f24514117d09a8fc74b803d3d65faa27cea1c7378fb12b0d002913f3831" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" "checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" +"checksum schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295" +"checksum security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" +"checksum security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" "checksum serde_cbor 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "45cd6d95391b16cd57e88b68be41d504183b7faae22030c0cc3b3f73dd57b2fd" "checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" +"checksum serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" +"checksum serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" "checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68" +"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum smallvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44e59e0c9fa00817912ae6e4e6e3c4fe04455e75699d06eedc7d85917ed8e8f4" +"checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" "checksum static_assertions 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7f3eb36b47e512f8f1c9e3d10c2c1965bc992bd9cdb024fa581e2194501c83d3" "checksum syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "dff0acdb207ae2fe6d5976617f887eb1e35a2ba52c13c7234c790960cdad9238" +"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" +"checksum tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "0fa5e81d6bc4e67fe889d5783bd2a128ab2e0cfa487e0be16b6a8d177b101616" +"checksum tokio-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7bde02a3a5291395f59b06ec6945a3077602fac2b07eeeaf0dee2122f3619828" +"checksum tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" +"checksum tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" +"checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum typed-arena 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9b2228007eba4120145f785df0f6c92ea538f5a3635a612ecf4e334c8c1446d" "checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" "checksum ucd-trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8f00ed7be0c1ff1e24f46c3d2af4859f7e863672ba3a6e92e7cff702bf9f06c2" +"checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +"checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" +"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +"checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" +"checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" +"checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" "checksum walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9658c94fa8b940eab2250bd5a457f9c48b748420d71293b165c8cdbe2f55f71e" +"checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +"checksum wasm-bindgen 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c" +"checksum wasm-bindgen-backend 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45" +"checksum wasm-bindgen-futures 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8bbdd49e3e28b40dec6a9ba8d17798245ce32b019513a845369c641b275135d9" +"checksum wasm-bindgen-macro 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3" +"checksum wasm-bindgen-macro-support 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" +"checksum wasm-bindgen-shared 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601" +"checksum wasm-bindgen-webidl 0.2.58 (registry+https://github.com/rust-lang/crates.io-index)" = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d" +"checksum web-sys 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b" +"checksum weedle 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164" +"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" +"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +"checksum winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" +"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" @@ -62,13 +62,12 @@ assert_eq!(deserialized_map, expected_map); ## Standard-compliance -This implementation currently supports partially the [Dhall +This implementation currently supports most of the [Dhall standard](https://github.com/dhall-lang/dhall-lang) version `14.0.0`. -Only local imports are supported, but otherwise the main features are -implemented. See +The main missing features are import caching and import headers. See [here](https://github.com/Nadrieril/dhall-rust/issues?q=is%3Aopen+is%3Aissue+label%3Astandard-compliance) -for a list of missing features. +for a list of the other missing features. # Contributing @@ -159,6 +158,14 @@ same name as the corresponding test. ## Changelog +[???] + +- Implement remote imports with conservative sanity checking +- Implement `missing` and `env:VAR` imports +- Implement `as Text` and `as Location` imports +- Implement projection by expression +- Implement some normalization simplifications + [0.3.0] - Update to supporting dhall v14.0.0 diff --git a/dhall-lang b/dhall-lang -Subproject 68c8aa875801355a319261c87b547b9a017df3c +Subproject 1a20024421d4e0574e7d9c85a7b0e751b0534dc diff --git a/dhall/Cargo.toml b/dhall/Cargo.toml index 4d9595a..90374b6 100644 --- a/dhall/Cargo.toml +++ b/dhall/Cargo.toml @@ -18,9 +18,11 @@ once_cell = "1.3.1" percent-encoding = "2.1.0" pest = "2.1" pest_consume = "1.0" +reqwest = { version = "0.10.3", features = ["blocking"] } serde = "1.0" serde_cbor = "0.9.0" smallvec = "1.0.0" +url = "2.1.1" [dev-dependencies] pretty_assertions = "0.6.1" diff --git a/dhall/build.rs b/dhall/build.rs index d9bceeb..4b6e52b 100644 --- a/dhall/build.rs +++ b/dhall/build.rs @@ -77,8 +77,10 @@ struct TestFeature { directory: &'static str, /// Relevant variant of `dhall::tests::Test` variant: &'static str, + /// Given a file name, whether to only include it in release tests + too_slow_path: Box<dyn FnMut(&str) -> bool>, /// Given a file name, whether to exclude it - path_filter: Box<dyn FnMut(&str) -> bool>, + exclude_path: Box<dyn FnMut(&str) -> bool>, /// Type of the input file input_type: FileType, /// Type of the output file, if any @@ -98,9 +100,12 @@ fn make_test_module( for (name, path) in dhall_files_in_dir(&tests_dir, take_ab_suffix, feature.input_type) { - if (feature.path_filter)(&path) { + if (feature.exclude_path)(&path) { continue; } + if (feature.too_slow_path)(&path) { + writeln!(w, "#[cfg(not(debug_assertions))]")?; + } let path = tests_dir.join(path); let path = path.to_string_lossy(); let test = match feature.output_type { @@ -152,10 +157,9 @@ fn generate_tests() -> std::io::Result<()> { module_name: "parser_success", directory: "parser/success/", variant: "ParserSuccess", - path_filter: Box::new(|path: &str| { + too_slow_path: Box::new(|path: &str| path == "largeExpression"), + exclude_path: Box::new(|path: &str| { false - // Too slow in debug mode - || path == "largeExpression" // Pretty sure the test is incorrect || path == "unit/import/urls/quotedPathFakeUrlEncode" // TODO: RFC3986 URLs @@ -171,7 +175,8 @@ fn generate_tests() -> std::io::Result<()> { module_name: "parser_failure", directory: "parser/failure/", variant: "ParserFailure", - path_filter: Box::new(|_path: &str| false), + too_slow_path: Box::new(|_path: &str| false), + exclude_path: Box::new(|_path: &str| false), input_type: FileType::Text, output_type: Some(FileType::UI), }, @@ -179,10 +184,9 @@ fn generate_tests() -> std::io::Result<()> { module_name: "printer", directory: "parser/success/", variant: "Printer", - path_filter: Box::new(|path: &str| { + too_slow_path: Box::new(|path: &str| path == "largeExpression"), + exclude_path: Box::new(|path: &str| { false - // Too slow in debug mode - || path == "largeExpression" // TODO: RFC3986 URLs || path == "unit/import/urls/emptyPath0" || path == "unit/import/urls/emptyPath1" @@ -196,10 +200,9 @@ fn generate_tests() -> std::io::Result<()> { module_name: "binary_encoding", directory: "parser/success/", variant: "BinaryEncoding", - path_filter: Box::new(|path: &str| { + too_slow_path: Box::new(|path: &str| path == "largeExpression"), + exclude_path: Box::new(|path: &str| { false - // Too slow in debug mode - || path == "largeExpression" // Pretty sure the test is incorrect || path == "unit/import/urls/quotedPathFakeUrlEncode" // See https://github.com/pyfisch/cbor/issues/109 @@ -219,7 +222,8 @@ fn generate_tests() -> std::io::Result<()> { module_name: "binary_decoding_success", directory: "binary-decode/success/", variant: "BinaryDecodingSuccess", - path_filter: Box::new(|path: &str| { + too_slow_path: Box::new(|_path: &str| false), + exclude_path: Box::new(|path: &str| { false // We don't support bignums || path == "unit/IntegerBigNegative" @@ -233,7 +237,8 @@ fn generate_tests() -> std::io::Result<()> { module_name: "binary_decoding_failure", directory: "binary-decode/failure/", variant: "BinaryDecodingFailure", - path_filter: Box::new(|_path: &str| false), + too_slow_path: Box::new(|_path: &str| false), + exclude_path: Box::new(|_path: &str| false), input_type: FileType::Binary, output_type: Some(FileType::UI), }, @@ -241,15 +246,19 @@ fn generate_tests() -> std::io::Result<()> { module_name: "import_success", directory: "import/success/", variant: "ImportSuccess", - path_filter: Box::new(|path: &str| { + too_slow_path: Box::new(|_path: &str| false), + exclude_path: Box::new(|path: &str| { false - || path == "alternativeEnvNatural" - || path == "alternativeEnvSimple" + // TODO: import hash || path == "alternativeHashMismatch" + || path == "hashFromCache" + || path == "unit/AlternativeHashMismatch" + // TODO: This test is wrong || path == "asLocation" - || path == "asText" + // TODO: the standard does not respect https://tools.ietf.org/html/rfc3986#section-5.2 + || path == "unit/asLocation/RemoteCanonicalize4" + // TODO: import headers || path == "customHeaders" - || path == "hashFromCache" || path == "headerForwarding" || path == "noHeaderForwarding" }), @@ -260,13 +269,12 @@ fn generate_tests() -> std::io::Result<()> { module_name: "import_failure", directory: "import/failure/", variant: "ImportFailure", - path_filter: Box::new(|path: &str| { + too_slow_path: Box::new(|_path: &str| false), + exclude_path: Box::new(|path: &str| { false - || path == "alternativeEnv" - || path == "alternativeEnvMissing" + // TODO: import hash || path == "hashMismatch" - || path == "missing" - || path == "referentiallyInsane" + // TODO: import headers || path == "customHeadersUsingBoundVariable" }), input_type: FileType::Text, @@ -276,25 +284,18 @@ fn generate_tests() -> std::io::Result<()> { module_name: "beta_normalize", directory: "normalization/success/", variant: "Normalization", - path_filter: Box::new(|path: &str| { - // We don't support bignums - path == "simple/integerToDouble" - // Too slow - || path == "remoteSystems" + too_slow_path: Box::new(|path: &str| path == "remoteSystems"), + exclude_path: Box::new(|path: &str| { + false + // We don't support bignums + || path == "simple/integerToDouble" // TODO: fix Double/show || path == "prelude/JSON/number/1" // TODO: doesn't typecheck || path == "unit/RightBiasedRecordMergeWithinRecordProjection" || path == "unit/Sort" - // // TODO: Further record simplifications - || path == "simplifications/rightBiasedMergeWithinRecordProjectionWithinFieldSelection0" - || path == "simplifications/rightBiasedMergeWithinRecordProjectionWithinFieldSelection1" - || path == "simplifications/rightBiasedMergeWithinRecursiveRecordMergeWithinFieldselection" + // TODO: Further record simplifications || path == "simplifications/issue661" - || path == "unit/RecursiveRecordMergeWithinFieldSelection0" - || path == "unit/RecursiveRecordMergeWithinFieldSelection1" - || path == "unit/RecursiveRecordMergeWithinFieldSelection2" - || path == "unit/RecursiveRecordMergeWithinFieldSelection3" }), input_type: FileType::Text, output_type: Some(FileType::Text), @@ -303,8 +304,9 @@ fn generate_tests() -> std::io::Result<()> { module_name: "alpha_normalize", directory: "alpha-normalization/success/", variant: "AlphaNormalization", - path_filter: Box::new(|path: &str| { - // This test doesn't typecheck + too_slow_path: Box::new(|_path: &str| false), + exclude_path: Box::new(|path: &str| { + // This test is designed to not typecheck path == "unit/FunctionNestedBindingXXFree" }), input_type: FileType::Text, @@ -314,9 +316,11 @@ fn generate_tests() -> std::io::Result<()> { module_name: "type_inference_success", directory: "type-inference/success/", variant: "TypeInferenceSuccess", - path_filter: Box::new(|path: &str| { + too_slow_path: Box::new(|_path: &str| false), + exclude_path: Box::new(|path: &str| { false - // Too slow + // Too slow, but also not all features implemented + // For now needs support for hashed imports || path == "prelude" }), input_type: FileType::Text, @@ -326,7 +330,8 @@ fn generate_tests() -> std::io::Result<()> { module_name: "type_inference_failure", directory: "type-inference/failure/", variant: "TypeInferenceFailure", - path_filter: Box::new(|path: &str| { + too_slow_path: Box::new(|_path: &str| false), + exclude_path: Box::new(|path: &str| { false // TODO: enable free variable checking || path == "unit/MergeHandlerFreeVar" diff --git a/dhall/src/error/mod.rs b/dhall/src/error/mod.rs index 8829d47..e28b98b 100644 --- a/dhall/src/error/mod.rs +++ b/dhall/src/error/mod.rs @@ -1,6 +1,6 @@ use std::io::Error as IOError; -use crate::semantics::resolve::ImportStack; +use crate::semantics::resolve::{ImportLocation, ImportStack}; use crate::syntax::{Import, ParseError}; mod builder; @@ -26,8 +26,12 @@ pub(crate) enum ErrorKind { #[derive(Debug)] pub(crate) enum ImportError { + Missing, + MissingEnvVar, + SanityCheck, UnexpectedImport(Import<()>), - ImportCycle(ImportStack, Import<()>), + ImportCycle(ImportStack, ImportLocation), + Url(url::ParseError), } #[derive(Debug)] @@ -109,6 +113,11 @@ impl From<ParseError> for Error { ErrorKind::Parse(err).into() } } +impl From<url::ParseError> for Error { + fn from(err: url::ParseError) -> Error { + ErrorKind::Resolve(ImportError::Url(err)).into() + } +} impl From<DecodeError> for Error { fn from(err: DecodeError) -> Error { ErrorKind::Decode(err).into() diff --git a/dhall/src/lib.rs b/dhall/src/lib.rs index 34d7bc3..d68ad6b 100644 --- a/dhall/src/lib.rs +++ b/dhall/src/lib.rs @@ -17,11 +17,12 @@ pub mod syntax; use std::fmt::Display; use std::path::Path; +use url::Url; use crate::error::{EncodeError, Error, TypeError}; use crate::semantics::parse; use crate::semantics::resolve; -use crate::semantics::resolve::ImportRoot; +use crate::semantics::resolve::ImportLocation; use crate::semantics::{ typecheck, typecheck_with, Hir, Nir, NirKind, Tir, Type, }; @@ -34,7 +35,7 @@ pub type ResolvedExpr = Expr; pub type NormalizedExpr = Expr; #[derive(Debug, Clone)] -pub struct Parsed(ParsedExpr, ImportRoot); +pub struct Parsed(ParsedExpr, ImportLocation); /// An expression where all imports have been resolved /// @@ -66,6 +67,9 @@ impl Parsed { pub fn parse_file(f: &Path) -> Result<Parsed, Error> { parse::parse_file(f) } + pub fn parse_remote(url: Url) -> Result<Parsed, Error> { + parse::parse_remote(url) + } pub fn parse_str(s: &str) -> Result<Parsed, Error> { parse::parse_str(s) } diff --git a/dhall/src/semantics/nze/normalize.rs b/dhall/src/semantics/nze/normalize.rs index dedd659..27862ee 100644 --- a/dhall/src/semantics/nze/normalize.rs +++ b/dhall/src/semantics/nze/normalize.rs @@ -233,7 +233,7 @@ pub(crate) fn normalize_one_layer(expr: ExprKind<Nir>, env: &NzEnv) -> NirKind { ExprKind::Builtin(b) => Ret::Nir(Nir::from_builtin_env(b, env)), ExprKind::Assert(_) => Ret::Expr(expr), ExprKind::App(v, a) => Ret::Nir(v.app(a)), - ExprKind::Lit(l) => Ret::NirKind(Lit(l.clone())), + ExprKind::Lit(l) => Ret::NirKind(Lit(l)), ExprKind::SomeLit(e) => Ret::NirKind(NEOptionalLit(e)), ExprKind::EmptyListLit(t) => { let arg = match t.kind() { @@ -286,23 +286,6 @@ pub(crate) fn normalize_one_layer(expr: ExprKind<Nir>, env: &NzEnv) -> NirKind { None => Ret::Expr(expr), }, - ExprKind::Projection(_, ref ls) if ls.is_empty() => { - Ret::NirKind(RecordLit(HashMap::new())) - } - ExprKind::Projection(ref v, ref ls) => match v.kind() { - RecordLit(kvs) => Ret::NirKind(RecordLit( - ls.iter() - .filter_map(|l| kvs.get(l).map(|x| (l.clone(), x.clone()))) - .collect(), - )), - PartialExpr(ExprKind::Projection(v2, _)) => { - return normalize_one_layer( - ExprKind::Projection(v2.clone(), ls.clone()), - env, - ) - } - _ => Ret::Expr(expr), - }, ExprKind::Field(ref v, ref l) => match v.kind() { RecordLit(kvs) => match kvs.get(l) { Some(r) => Ret::Nir(r.clone()), @@ -311,6 +294,12 @@ pub(crate) fn normalize_one_layer(expr: ExprKind<Nir>, env: &NzEnv) -> NirKind { UnionType(kts) => { Ret::NirKind(UnionConstructor(l.clone(), kts.clone())) } + PartialExpr(ExprKind::Projection(x, _)) => { + return normalize_one_layer( + ExprKind::Field(x.clone(), l.clone()), + env, + ) + } PartialExpr(ExprKind::BinOp( BinOp::RightBiasedRecordMerge, x, @@ -329,11 +318,11 @@ pub(crate) fn normalize_one_layer(expr: ExprKind<Nir>, env: &NzEnv) -> NirKind { Some(r) => Ret::Expr(ExprKind::Field( Nir::from_kind(PartialExpr(ExprKind::BinOp( BinOp::RightBiasedRecordMerge, - Nir::from_kind(RecordLit({ - let mut kvs = HashMap::new(); - kvs.insert(l.clone(), r.clone()); - kvs - })), + Nir::from_kind(RecordLit( + Some((l.clone(), r.clone())) + .into_iter() + .collect(), + )), y.clone(), ))), l.clone(), @@ -347,66 +336,81 @@ pub(crate) fn normalize_one_layer(expr: ExprKind<Nir>, env: &NzEnv) -> NirKind { }, _ => Ret::Expr(expr), }, - PartialExpr(ExprKind::BinOp( - BinOp::RecursiveRecordTypeMerge, - x, - y, - )) => match (x.kind(), y.kind()) { - (RecordLit(kvs), _) => match kvs.get(l) { - Some(_) => Ret::Expr(expr), - None => { - return normalize_one_layer( - ExprKind::Field(y.clone(), l.clone()), - env, - ) - } - }, - (_, RecordLit(kvs)) => match kvs.get(l) { - Some(_) => Ret::Expr(expr), - None => { - return normalize_one_layer( - ExprKind::Field(x.clone(), l.clone()), - env, - ) - } - }, - _ => Ret::Expr(expr), - }, + PartialExpr(ExprKind::BinOp(BinOp::RecursiveRecordMerge, x, y)) => { + match (x.kind(), y.kind()) { + (RecordLit(kvs), _) => match kvs.get(l) { + Some(r) => Ret::Expr(ExprKind::Field( + Nir::from_kind(PartialExpr(ExprKind::BinOp( + BinOp::RecursiveRecordMerge, + Nir::from_kind(RecordLit( + Some((l.clone(), r.clone())) + .into_iter() + .collect(), + )), + y.clone(), + ))), + l.clone(), + )), + None => { + return normalize_one_layer( + ExprKind::Field(y.clone(), l.clone()), + env, + ) + } + }, + (_, RecordLit(kvs)) => match kvs.get(l) { + Some(r) => Ret::Expr(ExprKind::Field( + Nir::from_kind(PartialExpr(ExprKind::BinOp( + BinOp::RecursiveRecordMerge, + x.clone(), + Nir::from_kind(RecordLit( + Some((l.clone(), r.clone())) + .into_iter() + .collect(), + )), + ))), + l.clone(), + )), + None => { + return normalize_one_layer( + ExprKind::Field(x.clone(), l.clone()), + env, + ) + } + }, + _ => Ret::Expr(expr), + } + } + _ => Ret::Expr(expr), + }, + ExprKind::Projection(_, ref ls) if ls.is_empty() => { + Ret::NirKind(RecordLit(HashMap::new())) + } + ExprKind::Projection(ref v, ref ls) => match v.kind() { + RecordLit(kvs) => Ret::NirKind(RecordLit( + ls.iter() + .filter_map(|l| kvs.get(l).map(|x| (l.clone(), x.clone()))) + .collect(), + )), PartialExpr(ExprKind::Projection(v2, _)) => { return normalize_one_layer( - ExprKind::Field(v2.clone(), l.clone()), + ExprKind::Projection(v2.clone(), ls.clone()), env, ) } _ => Ret::Expr(expr), }, - - ExprKind::ProjectionByExpr(ref v, ref t) => match dbg!(v).kind() { - RecordLit(kvs) => match dbg!(t).kind() { - RecordType(kts) => Ret::NirKind(RecordLit( - kts.iter() - .filter_map(|(l, _)| { - kvs.get(l).map(|x| (l.clone(), x.clone())) - }) - .collect(), - )), - _ => Ret::Expr(expr), - }, - _ => match dbg!(t).kind() { - RecordType(kts) => { - use crate::syntax::map::DupTreeSet; - use std::iter::FromIterator; - - let ts = DupTreeSet::from_iter( - kts.iter().map(|(l, _)| l.clone()), - ); - return normalize_one_layer( - ExprKind::Projection(v.clone(), ts), - env, - ); - } - _ => Ret::Expr(expr), - }, + ExprKind::ProjectionByExpr(ref v, ref t) => match t.kind() { + RecordType(kts) => { + return normalize_one_layer( + ExprKind::Projection( + v.clone(), + kts.keys().cloned().collect(), + ), + env, + ) + } + _ => Ret::Expr(expr), }, ExprKind::Merge(ref handlers, ref variant, _) => { diff --git a/dhall/src/semantics/parse.rs b/dhall/src/semantics/parse.rs index ee35536..45860d0 100644 --- a/dhall/src/semantics/parse.rs +++ b/dhall/src/semantics/parse.rs @@ -1,30 +1,37 @@ use std::fs::File; use std::io::Read; use std::path::Path; +use url::Url; use crate::error::Error; -use crate::semantics::resolve::ImportRoot; +use crate::semantics::resolve::ImportLocation; use crate::syntax::binary; use crate::syntax::parse_expr; use crate::Parsed; pub(crate) fn parse_file(f: &Path) -> Result<Parsed, Error> { - let mut buffer = String::new(); - File::open(f)?.read_to_string(&mut buffer)?; - let expr = parse_expr(&*buffer)?; - let root = ImportRoot::LocalDir(f.parent().unwrap().to_owned()); + let text = std::fs::read_to_string(f)?; + let expr = parse_expr(&text)?; + let root = ImportLocation::Local(f.to_owned()); + Ok(Parsed(expr, root)) +} + +pub(crate) fn parse_remote(url: Url) -> Result<Parsed, Error> { + let body = reqwest::blocking::get(url.clone()).unwrap().text().unwrap(); + let expr = parse_expr(&body)?; + let root = ImportLocation::Remote(url); Ok(Parsed(expr, root)) } pub(crate) fn parse_str(s: &str) -> Result<Parsed, Error> { let expr = parse_expr(s)?; - let root = ImportRoot::LocalDir(std::env::current_dir()?); + let root = ImportLocation::Missing; Ok(Parsed(expr, root)) } pub(crate) fn parse_binary(data: &[u8]) -> Result<Parsed, Error> { let expr = binary::decode(data)?; - let root = ImportRoot::LocalDir(std::env::current_dir()?); + let root = ImportLocation::Missing; Ok(Parsed(expr, root)) } @@ -32,6 +39,6 @@ pub(crate) fn parse_binary_file(f: &Path) -> Result<Parsed, Error> { let mut buffer = Vec::new(); File::open(f)?.read_to_end(&mut buffer)?; let expr = binary::decode(&buffer)?; - let root = ImportRoot::LocalDir(f.parent().unwrap().to_owned()); + let root = ImportLocation::Local(f.to_owned()); Ok(Parsed(expr, root)) } diff --git a/dhall/src/semantics/resolve/env.rs b/dhall/src/semantics/resolve/env.rs index 43676cc..5a7f139 100644 --- a/dhall/src/semantics/resolve/env.rs +++ b/dhall/src/semantics/resolve/env.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use crate::error::{Error, ImportError}; -use crate::semantics::{AlphaVar, Import, TypedHir, VarEnv}; +use crate::semantics::{AlphaVar, ImportLocation, TypedHir, VarEnv}; use crate::syntax::{Label, V}; /// Environment for resolving names. @@ -10,8 +10,8 @@ pub(crate) struct NameEnv { names: Vec<Label>, } -pub(crate) type ImportCache = HashMap<Import, TypedHir>; -pub(crate) type ImportStack = Vec<Import>; +pub(crate) type ImportCache = HashMap<ImportLocation, TypedHir>; +pub(crate) type ImportStack = Vec<ImportLocation>; /// Environment for resolving imports #[derive(Debug, Clone)] @@ -74,28 +74,28 @@ impl ImportEnv { pub fn handle_import( &mut self, - import: Import, - mut do_resolve: impl FnMut(&mut Self, &Import) -> Result<TypedHir, Error>, + location: ImportLocation, + do_resolve: impl FnOnce(&mut Self) -> Result<TypedHir, Error>, ) -> Result<TypedHir, Error> { - if self.stack.contains(&import) { + if self.stack.contains(&location) { return Err( - ImportError::ImportCycle(self.stack.clone(), import).into() + ImportError::ImportCycle(self.stack.clone(), location).into() ); } - Ok(match self.cache.get(&import) { + Ok(match self.cache.get(&location) { Some(expr) => expr.clone(), None => { - // Push the current import on the stack - self.stack.push(import.clone()); + // Push the current location on the stack + self.stack.push(location); // Resolve the import recursively - let expr = do_resolve(self, &import)?; + let expr = do_resolve(self)?; - // Remove import from the stack. - self.stack.pop(); + // Remove location from the stack. + let location = self.stack.pop().unwrap(); - // Add the import to the cache - self.cache.insert(import, expr.clone()); + // Add the resolved import to the cache + self.cache.insert(location, expr.clone()); expr } diff --git a/dhall/src/semantics/resolve/hir.rs b/dhall/src/semantics/resolve/hir.rs index 2f3464a..317708a 100644 --- a/dhall/src/semantics/resolve/hir.rs +++ b/dhall/src/semantics/resolve/hir.rs @@ -72,6 +72,9 @@ impl Hir { ) -> Result<Tir<'hir>, TypeError> { type_with(env, self, None) } + pub fn typecheck_noenv<'hir>(&'hir self) -> Result<Tir<'hir>, TypeError> { + self.typecheck(&TyEnv::new()) + } /// Eval the Hir. It will actually get evaluated only as needed on demand. pub fn eval(&self, env: impl Into<NzEnv>) -> Nir { diff --git a/dhall/src/semantics/resolve/resolve.rs b/dhall/src/semantics/resolve/resolve.rs index 82800ec..d29271d 100644 --- a/dhall/src/semantics/resolve/resolve.rs +++ b/dhall/src/semantics/resolve/resolve.rs @@ -1,11 +1,18 @@ +use itertools::Itertools; use std::borrow::Cow; -use std::path::{Path, PathBuf}; +use std::env; +use std::path::PathBuf; +use url::Url; use crate::error::ErrorBuilder; use crate::error::{Error, ImportError}; use crate::semantics::{mkerr, Hir, HirKind, ImportEnv, NameEnv, Type}; use crate::syntax; -use crate::syntax::{BinOp, Expr, ExprKind, FilePath, ImportLocation, URL}; +use crate::syntax::map::DupTreeMap; +use crate::syntax::{ + BinOp, Builtin, Expr, ExprKind, FilePath, FilePrefix, ImportMode, + ImportTarget, Span, UnspannedExpr, URL, +}; use crate::{Parsed, ParsedExpr, Resolved}; // TODO: evaluate import headers @@ -14,42 +21,217 @@ pub(crate) type Import = syntax::Import<()>; /// Owned Hir with a type. Different from Tir because the Hir is owned. pub(crate) type TypedHir = (Hir, Type); -/// A root from which to resolve relative imports. -#[derive(Debug, Clone, PartialEq, Eq)] -pub(crate) enum ImportRoot { - LocalDir(PathBuf), +/// The location of some data, usually some dhall code. +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub(crate) enum ImportLocation { + /// Local file + Local(PathBuf), + /// Remote file + Remote(Url), + /// Environment variable + Env(String), + /// Data without a location + Missing, +} + +impl ImportLocation { + /// Given an import pointing to `target` found in the current location, compute the next + /// location, or error if not allowed. + /// `sanity_check` indicates whether to check if that location is allowed to be referenced, + /// for example to prevent a remote file from reading an environment variable. + fn chain( + &self, + target: &ImportTarget<()>, + sanity_check: bool, + ) -> Result<ImportLocation, Error> { + Ok(match target { + ImportTarget::Local(prefix, path) => { + self.chain_local(prefix, path)? + } + ImportTarget::Remote(remote) => { + if sanity_check { + if let ImportLocation::Remote(..) = self { + // TODO: allow if CORS check passes + Err(ImportError::SanityCheck)? + } + } + let mut url = Url::parse(&format!( + "{}://{}", + remote.scheme, remote.authority + ))?; + url.set_path(&remote.path.file_path.iter().join("/")); + url.set_query(remote.query.as_ref().map(String::as_ref)); + ImportLocation::Remote(url) + } + ImportTarget::Env(var_name) => { + if sanity_check { + if let ImportLocation::Remote(..) = self { + Err(ImportError::SanityCheck)? + } + } + ImportLocation::Env(var_name.clone()) + } + ImportTarget::Missing => ImportLocation::Missing, + }) + } + + fn chain_local( + &self, + prefix: &FilePrefix, + path: &FilePath, + ) -> Result<ImportLocation, Error> { + Ok(match self { + ImportLocation::Local(..) + | ImportLocation::Env(..) + | ImportLocation::Missing => { + let dir = match self { + ImportLocation::Local(path) => { + path.parent().unwrap().to_owned() + } + ImportLocation::Env(..) | ImportLocation::Missing => { + std::env::current_dir()? + } + _ => unreachable!(), + }; + let mut dir: Vec<String> = dir + .components() + .map(|component| { + component.as_os_str().to_string_lossy().into_owned() + }) + .collect(); + let root = match prefix { + FilePrefix::Here => dir, + FilePrefix::Parent => { + dir.push("..".to_string()); + dir + } + FilePrefix::Absolute => vec![], + FilePrefix::Home => vec![], + }; + let path: Vec<_> = root + .into_iter() + .chain(path.file_path.iter().cloned()) + .collect(); + let path = + (FilePath { file_path: path }).canonicalize().file_path; + let prefix = match prefix { + FilePrefix::Here | FilePrefix::Parent => ".", + FilePrefix::Absolute => "/", + FilePrefix::Home => "~", + }; + let path = + Some(prefix.to_string()).into_iter().chain(path).collect(); + ImportLocation::Local(path) + } + ImportLocation::Remote(url) => { + let mut url = url.clone(); + match prefix { + FilePrefix::Here => {} + FilePrefix::Parent => { + url = url.join("..")?; + } + FilePrefix::Absolute => panic!("error"), + FilePrefix::Home => panic!("error"), + } + url = url.join(&path.file_path.join("/"))?; + ImportLocation::Remote(url) + } + }) + } + + fn fetch_dhall(self) -> Result<Parsed, Error> { + Ok(match self { + ImportLocation::Local(path) => Parsed::parse_file(&path)?, + ImportLocation::Remote(url) => Parsed::parse_remote(url)?, + ImportLocation::Env(var_name) => { + let val = match env::var(var_name) { + Ok(val) => val, + Err(_) => Err(ImportError::MissingEnvVar)?, + }; + Parsed::parse_str(&val)? + } + ImportLocation::Missing => Err(ImportError::Missing)?, + }) + } + + fn fetch_text(self) -> Result<String, Error> { + Ok(match self { + ImportLocation::Local(path) => std::fs::read_to_string(&path)?, + ImportLocation::Remote(url) => { + reqwest::blocking::get(url).unwrap().text().unwrap() + } + ImportLocation::Env(var_name) => match env::var(var_name) { + Ok(val) => val, + Err(_) => Err(ImportError::MissingEnvVar)?, + }, + ImportLocation::Missing => Err(ImportError::Missing)?, + }) + } + + fn into_location(self) -> Expr { + let (field_name, arg) = match self { + ImportLocation::Local(path) => { + ("Local", Some(path.to_string_lossy().into_owned())) + } + ImportLocation::Remote(url) => ("Remote", Some(url.into_string())), + ImportLocation::Env(name) => ("Environment", Some(name)), + ImportLocation::Missing => ("Missing", None), + }; + + let asloc_ty = make_aslocation_uniontype(); + let expr = mkexpr(ExprKind::Field(asloc_ty, field_name.into())); + match arg { + Some(arg) => mkexpr(ExprKind::App( + expr, + mkexpr(ExprKind::TextLit(arg.into())), + )), + None => expr, + } + } +} + +fn mkexpr(kind: UnspannedExpr) -> Expr { + Expr::new(kind, Span::Artificial) +} + +fn make_aslocation_uniontype() -> Expr { + let text_type = mkexpr(ExprKind::Builtin(Builtin::Text)); + let mut union = DupTreeMap::default(); + union.insert("Local".into(), Some(text_type.clone())); + union.insert("Remote".into(), Some(text_type.clone())); + union.insert("Environment".into(), Some(text_type.clone())); + union.insert("Missing".into(), None); + mkexpr(ExprKind::UnionType(union)) } fn resolve_one_import( env: &mut ImportEnv, import: &Import, - root: &ImportRoot, + location: &ImportLocation, ) -> Result<TypedHir, Error> { - use self::ImportRoot::*; - use syntax::FilePrefix::*; - use syntax::ImportLocation::*; - let cwd = match root { - LocalDir(cwd) => cwd, - }; - match &import.location { - Local(prefix, path) => { - let path_buf: PathBuf = path.file_path.iter().collect(); - let path_buf = match prefix { - // TODO: fail gracefully - Parent => cwd.parent().unwrap().join(path_buf), - Here => cwd.join(path_buf), - _ => unimplemented!("{:?}", import), - }; - Ok(load_import(env, &path_buf)?) + let do_sanity_check = import.mode != ImportMode::Location; + let location = location.chain(&import.location, do_sanity_check)?; + env.handle_import(location.clone(), |env| match import.mode { + ImportMode::Code => { + let parsed = location.fetch_dhall()?; + let typed = resolve_with_env(env, parsed)?.typecheck()?; + Ok((typed.normalize().to_hir(), typed.ty().clone())) } - _ => unimplemented!("{:?}", import), - } -} - -fn load_import(env: &mut ImportEnv, f: &Path) -> Result<TypedHir, Error> { - let parsed = Parsed::parse_file(f)?; - let typed = resolve_with_env(env, parsed)?.typecheck()?; - Ok((typed.normalize().to_hir(), typed.ty().clone())) + ImportMode::RawText => { + let text = location.fetch_text()?; + let hir = Hir::new( + HirKind::Expr(ExprKind::TextLit(text.into())), + Span::Artificial, + ); + Ok((hir, Type::from_builtin(Builtin::Text))) + } + ImportMode::Location => { + let expr = location.into_location(); + let hir = skip_resolve(&expr)?; + let ty = hir.typecheck_noenv()?.ty().clone(); + Ok((hir, ty)) + } + }) } /// Desugar the first level of the expression. @@ -139,12 +321,10 @@ fn resolve_with_env( env: &mut ImportEnv, parsed: Parsed, ) -> Result<Resolved, Error> { - let Parsed(expr, root) = parsed; + let Parsed(expr, location) = parsed; let resolved = traverse_resolve_expr(&mut NameEnv::new(), &expr, &mut |import| { - env.handle_import(import, |env, import| { - resolve_one_import(env, import, &root) - }) + resolve_one_import(env, &import, &location) })?; Ok(Resolved(resolved)) } @@ -166,21 +346,15 @@ pub trait Canonicalize { impl Canonicalize for FilePath { fn canonicalize(&self) -> FilePath { let mut file_path = Vec::new(); - let mut file_path_components = self.file_path.clone().into_iter(); - - loop { - let component = file_path_components.next(); - match component.as_ref() { - // ─────────────────── - // canonicalize(ε) = ε - None => break, + for c in &self.file_path { + match c.as_ref() { // canonicalize(directory₀) = directory₁ // ─────────────────────────────────────── // canonicalize(directory₀/.) = directory₁ - Some(c) if c == "." => continue, + "." => continue, - Some(c) if c == ".." => match file_path_components.next() { + ".." => match file_path.last() { // canonicalize(directory₀) = ε // ──────────────────────────── // canonicalize(directory₀/..) = /.. @@ -189,21 +363,20 @@ impl Canonicalize for FilePath { // canonicalize(directory₀) = directory₁/.. // ────────────────────────────────────────────── // canonicalize(directory₀/..) = directory₁/../.. - Some(ref c) if c == ".." => { - file_path.push("..".to_string()); - file_path.push("..".to_string()); - } + Some(c) if c == ".." => file_path.push("..".to_string()), // canonicalize(directory₀) = directory₁/component // ─────────────────────────────────────────────── ; If "component" is not // canonicalize(directory₀/..) = directory₁ ; ".." - Some(_) => continue, + Some(_) => { + file_path.pop(); + } }, // canonicalize(directory₀) = directory₁ // ───────────────────────────────────────────────────────── ; If no other // canonicalize(directory₀/component) = directory₁/component ; rule matches - Some(c) => file_path.push(c.clone()), + _ => file_path.push(c.clone()), } } @@ -211,21 +384,21 @@ impl Canonicalize for FilePath { } } -impl<SE: Copy> Canonicalize for ImportLocation<SE> { - fn canonicalize(&self) -> ImportLocation<SE> { +impl<SE: Copy> Canonicalize for ImportTarget<SE> { + fn canonicalize(&self) -> ImportTarget<SE> { match self { - ImportLocation::Local(prefix, file) => { - ImportLocation::Local(*prefix, file.canonicalize()) + ImportTarget::Local(prefix, file) => { + ImportTarget::Local(*prefix, file.canonicalize()) } - ImportLocation::Remote(url) => ImportLocation::Remote(URL { + ImportTarget::Remote(url) => ImportTarget::Remote(URL { scheme: url.scheme, authority: url.authority.clone(), path: url.path.canonicalize(), query: url.query.clone(), headers: url.headers.clone(), }), - ImportLocation::Env(name) => ImportLocation::Env(name.to_string()), - ImportLocation::Missing => ImportLocation::Missing, + ImportTarget::Env(name) => ImportTarget::Env(name.to_string()), + ImportTarget::Missing => ImportTarget::Missing, } } } diff --git a/dhall/src/syntax/ast/expr.rs b/dhall/src/syntax/ast/expr.rs index bb1a5b3..ce0a3d2 100644 --- a/dhall/src/syntax/ast/expr.rs +++ b/dhall/src/syntax/ast/expr.rs @@ -178,7 +178,7 @@ pub enum ExprKind<SubExpr> { Field(SubExpr, Label), /// `e.{ x, y, z }` Projection(SubExpr, DupTreeSet<Label>), - /// `e.(s)` + /// `e.(t)` ProjectionByExpr(SubExpr, SubExpr), /// `x::y` Completion(SubExpr, SubExpr), diff --git a/dhall/src/syntax/ast/import.rs b/dhall/src/syntax/ast/import.rs index 7bde6e0..75d7946 100644 --- a/dhall/src/syntax/ast/import.rs +++ b/dhall/src/syntax/ast/import.rs @@ -18,7 +18,7 @@ pub struct FilePath { /// The location of import (i.e. local vs. remote vs. environment) #[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub enum ImportLocation<SubExpr> { +pub enum ImportTarget<SubExpr> { Local(FilePrefix, FilePath), Remote(URL<SubExpr>), Env(String), @@ -57,7 +57,7 @@ pub enum Hash { #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct Import<SubExpr> { pub mode: ImportMode, - pub location: ImportLocation<SubExpr>, + pub location: ImportTarget<SubExpr>, pub hash: Option<Hash>, } @@ -77,12 +77,12 @@ impl<SE> URL<SE> { } } -impl<SE> ImportLocation<SE> { +impl<SE> ImportTarget<SE> { pub fn traverse_ref<'a, Err, SE2>( &'a self, f: impl FnOnce(&'a SE) -> Result<SE2, Err>, - ) -> Result<ImportLocation<SE2>, Err> { - use ImportLocation::*; + ) -> Result<ImportTarget<SE2>, Err> { + use ImportTarget::*; Ok(match self { Local(prefix, path) => Local(*prefix, path.clone()), Remote(url) => Remote(url.traverse_ref(f)?), diff --git a/dhall/src/syntax/ast/text.rs b/dhall/src/syntax/ast/text.rs index 83aaf9a..c40f4a1 100644 --- a/dhall/src/syntax/ast/text.rs +++ b/dhall/src/syntax/ast/text.rs @@ -54,16 +54,6 @@ impl<SubExpr> InterpolatedTextContents<SubExpr> { Text(s) => Text(s.clone()), }) } - pub fn traverse_mut<'a, E, F>(&'a mut self, mut f: F) -> Result<(), E> - where - F: FnMut(&'a mut SubExpr) -> Result<(), E>, - { - use InterpolatedTextContents::Expr; - if let Expr(e) = self { - f(e)?; - } - Ok(()) - } pub fn map_ref<'a, SubExpr2, F>( &'a self, mut f: F, @@ -77,15 +67,6 @@ impl<SubExpr> InterpolatedTextContents<SubExpr> { Text(s) => Text(s.clone()), } } - pub fn map_mut<'a, F>(&'a mut self, mut f: F) - where - F: FnMut(&'a mut SubExpr), - { - use InterpolatedTextContents::Expr; - if let Expr(e) = self { - f(e); - } - } } impl<SubExpr> InterpolatedText<SubExpr> { @@ -126,16 +107,6 @@ impl<SubExpr> InterpolatedText<SubExpr> { }) } - pub fn traverse_mut<'a, E, F>(&'a mut self, mut f: F) -> Result<(), E> - where - F: FnMut(&'a mut SubExpr) -> Result<(), E>, - { - for (e, _) in &mut self.tail { - f(e)? - } - Ok(()) - } - pub fn iter<'a>( &'a self, ) -> impl Iterator<Item = InterpolatedTextContents<&'a SubExpr>> + 'a { diff --git a/dhall/src/syntax/binary/decode.rs b/dhall/src/syntax/binary/decode.rs index 2e50d61..bebc800 100644 --- a/dhall/src/syntax/binary/decode.rs +++ b/dhall/src/syntax/binary/decode.rs @@ -5,7 +5,7 @@ use std::iter::FromIterator; use crate::error::DecodeError; use crate::syntax; use crate::syntax::{ - Expr, ExprKind, FilePath, FilePrefix, Hash, ImportLocation, ImportMode, + Expr, ExprKind, FilePath, FilePrefix, Hash, ImportMode, ImportTarget, Integer, InterpolatedText, Label, LitKind, Natural, Scheme, Span, UnspannedExpr, URL, V, }; @@ -305,7 +305,7 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result<DecodedExpr, DecodeError> { }) .collect::<Result<_, _>>()?; let path = FilePath { file_path }; - ImportLocation::Remote(URL { + ImportTarget::Remote(URL { scheme, authority, path, @@ -332,7 +332,7 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result<DecodedExpr, DecodeError> { }) .collect::<Result<_, _>>()?; let path = FilePath { file_path }; - ImportLocation::Local(prefix, path) + ImportTarget::Local(prefix, path) } 6 => { let env = match rest.next() { @@ -341,9 +341,9 @@ fn cbor_value_to_dhall(data: &cbor::Value) -> Result<DecodedExpr, DecodeError> { "import/env".to_owned(), ))?, }; - ImportLocation::Env(env) + ImportTarget::Env(env) } - 7 => ImportLocation::Missing, + 7 => ImportTarget::Missing, _ => Err(DecodeError::WrongFormatError( "import/type".to_owned(), ))?, diff --git a/dhall/src/syntax/binary/encode.rs b/dhall/src/syntax/binary/encode.rs index d2aa240..2484d8d 100644 --- a/dhall/src/syntax/binary/encode.rs +++ b/dhall/src/syntax/binary/encode.rs @@ -6,8 +6,8 @@ use crate::error::EncodeError; use crate::syntax; use crate::syntax::map::DupTreeMap; use crate::syntax::{ - Expr, ExprKind, FilePrefix, Hash, Import, ImportLocation, ImportMode, - Label, Scheme, V, + Expr, ExprKind, FilePrefix, Hash, Import, ImportMode, ImportTarget, Label, + Scheme, V, }; pub(crate) fn encode(expr: &Expr) -> Result<Vec<u8>, EncodeError> { @@ -179,10 +179,10 @@ where use serde::ser::SerializeSeq; let count = 4 + match &import.location { - ImportLocation::Remote(url) => 3 + url.path.file_path.len(), - ImportLocation::Local(_, path) => path.file_path.len(), - ImportLocation::Env(_) => 1, - ImportLocation::Missing => 0, + ImportTarget::Remote(url) => 3 + url.path.file_path.len(), + ImportTarget::Local(_, path) => path.file_path.len(), + ImportTarget::Env(_) => 1, + ImportTarget::Missing => 0, }; let mut ser_seq = ser.serialize_seq(Some(count))?; @@ -206,23 +206,23 @@ where ser_seq.serialize_element(&U64(mode))?; let scheme = match &import.location { - ImportLocation::Remote(url) => match url.scheme { + ImportTarget::Remote(url) => match url.scheme { Scheme::HTTP => 0, Scheme::HTTPS => 1, }, - ImportLocation::Local(prefix, _) => match prefix { + ImportTarget::Local(prefix, _) => match prefix { FilePrefix::Absolute => 2, FilePrefix::Here => 3, FilePrefix::Parent => 4, FilePrefix::Home => 5, }, - ImportLocation::Env(_) => 6, - ImportLocation::Missing => 7, + ImportTarget::Env(_) => 6, + ImportTarget::Missing => 7, }; ser_seq.serialize_element(&U64(scheme))?; match &import.location { - ImportLocation::Remote(url) => { + ImportTarget::Remote(url) => { match &url.headers { None => ser_seq.serialize_element(&Null)?, Some(e) => { @@ -238,15 +238,15 @@ where Some(x) => ser_seq.serialize_element(x)?, }; } - ImportLocation::Local(_, path) => { + ImportTarget::Local(_, path) => { for p in path.file_path.iter() { ser_seq.serialize_element(&p)?; } } - ImportLocation::Env(env) => { + ImportTarget::Env(env) => { ser_seq.serialize_element(env)?; } - ImportLocation::Missing => {} + ImportTarget::Missing => {} } ser_seq.end() diff --git a/dhall/src/syntax/text/parser.rs b/dhall/src/syntax/text/parser.rs index ba64a75..7140332 100644 --- a/dhall/src/syntax/text/parser.rs +++ b/dhall/src/syntax/text/parser.rs @@ -10,7 +10,7 @@ use crate::syntax::map::{DupTreeMap, DupTreeSet}; use crate::syntax::ExprKind::*; use crate::syntax::LitKind::*; use crate::syntax::{ - Double, Expr, FilePath, FilePrefix, Hash, ImportLocation, ImportMode, + Double, Expr, FilePath, FilePrefix, Hash, ImportMode, ImportTarget, Integer, InterpolatedText, InterpolatedTextContents, Label, NaiveDouble, Natural, Scheme, Span, UnspannedExpr, URL, V, }; @@ -483,9 +483,9 @@ impl DhallParser { } #[alias(import_type)] - fn local(input: ParseInput) -> ParseResult<ImportLocation<Expr>> { + fn local(input: ParseInput) -> ParseResult<ImportTarget<Expr>> { Ok(match_nodes!(input.into_children(); - [local_path((prefix, p))] => ImportLocation::Local(prefix, p), + [local_path((prefix, p))] => ImportTarget::Local(prefix, p), )) } @@ -550,17 +550,17 @@ impl DhallParser { } #[alias(import_type)] - fn http(input: ParseInput) -> ParseResult<ImportLocation<Expr>> { - Ok(ImportLocation::Remote(match_nodes!(input.into_children(); + fn http(input: ParseInput) -> ParseResult<ImportTarget<Expr>> { + Ok(ImportTarget::Remote(match_nodes!(input.into_children(); [http_raw(url)] => url, [http_raw(url), expression(e)] => URL { headers: Some(e), ..url }, ))) } #[alias(import_type)] - fn env(input: ParseInput) -> ParseResult<ImportLocation<Expr>> { + fn env(input: ParseInput) -> ParseResult<ImportTarget<Expr>> { Ok(match_nodes!(input.into_children(); - [environment_variable(v)] => ImportLocation::Env(v), + [environment_variable(v)] => ImportTarget::Env(v), )) } #[alias(environment_variable)] @@ -593,8 +593,8 @@ impl DhallParser { } #[alias(import_type)] - fn missing(_input: ParseInput) -> ParseResult<ImportLocation<Expr>> { - Ok(ImportLocation::Missing) + fn missing(_input: ParseInput) -> ParseResult<ImportTarget<Expr>> { + Ok(ImportTarget::Missing) } fn hash(input: ParseInput) -> ParseResult<Hash> { diff --git a/dhall/src/syntax/text/printer.rs b/dhall/src/syntax/text/printer.rs index 8891d41..5bb987b 100644 --- a/dhall/src/syntax/text/printer.rs +++ b/dhall/src/syntax/text/printer.rs @@ -379,8 +379,8 @@ impl Display for Hash { impl<SubExpr: Display> Display for Import<SubExpr> { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { use FilePrefix::*; - use ImportLocation::*; use ImportMode::*; + use ImportTarget::*; let quote_if_needed = |s: &str| -> String { if s.chars().all(|c| c.is_ascii_alphanumeric()) { s.to_string() @@ -406,7 +406,7 @@ impl<SubExpr: Display> Display for Import<SubExpr> { f.write_str(&path)?; } Remote(url) => { - write!(f, "{}://{}/", url.scheme, url.authority,)?; + write!(f, "{}://{}/", url.scheme, url.authority)?; let path: String = url.path.file_path.iter().join("/"); f.write_str(&path)?; if let Some(q) = &url.query { diff --git a/dhall/src/tests.rs b/dhall/src/tests.rs index 482f9ae..369c6cc 100644 --- a/dhall/src/tests.rs +++ b/dhall/src/tests.rs @@ -80,7 +80,7 @@ impl TestFile { match self { TestFile::Source(path) | TestFile::Binary(path) - | TestFile::UI(path) => PathBuf::from(path), + | TestFile::UI(path) => PathBuf::from("dhall").join(path), } } @@ -243,6 +243,13 @@ fn run_test_stringy_error(test: Test) -> std::result::Result<(), String> { fn run_test(test: Test) -> Result<()> { use self::Test::*; + // Setup current directory to the root of the repository. Important for `as Location` tests. + env::set_current_dir( + PathBuf::from(env!("CARGO_MANIFEST_DIR")).parent().unwrap(), + )?; + // Set environment variable for import tests. + env::set_var("DHALL_TEST_VAR", "6 * 7"); + match test { ParserSuccess(expr, expected) => { let expr = expr.parse()?; @@ -302,6 +309,7 @@ fn run_test(test: Test) -> Result<()> { expected.compare(expr)?; } } + Ok(()) } diff --git a/dhall/tests/import/data/cycle.dhall b/dhall/tests/import/data/cycle.dhall new file mode 100644 index 0000000..c370a8d --- /dev/null +++ b/dhall/tests/import/data/cycle.dhall @@ -0,0 +1 @@ +../failure/cycle.dhall diff --git a/dhall/tests/import/data/doesNotTypecheck.dhall b/dhall/tests/import/data/doesNotTypecheck.dhall new file mode 100644 index 0000000..b748e2d --- /dev/null +++ b/dhall/tests/import/data/doesNotTypecheck.dhall @@ -0,0 +1 @@ +0 0 diff --git a/dhall/tests/import/data/example.txt b/dhall/tests/import/data/example.txt new file mode 100644 index 0000000..af5626b --- /dev/null +++ b/dhall/tests/import/data/example.txt @@ -0,0 +1 @@ +Hello, world! diff --git a/dhall/tests/import/data/fieldOrder/1.dhall b/dhall/tests/import/data/fieldOrder/1.dhall new file mode 100644 index 0000000..797e071 --- /dev/null +++ b/dhall/tests/import/data/fieldOrder/1.dhall @@ -0,0 +1 @@ +{ foo = 1, bar = True } diff --git a/dhall/tests/import/data/fieldOrder/2.dhall b/dhall/tests/import/data/fieldOrder/2.dhall new file mode 100644 index 0000000..c16b568 --- /dev/null +++ b/dhall/tests/import/data/fieldOrder/2.dhall @@ -0,0 +1 @@ +{ bar = True, foo = 1 } diff --git a/dhall/tests/import/data/importBoundary.dhall b/dhall/tests/import/data/importBoundary.dhall new file mode 100644 index 0000000..e6f1074 --- /dev/null +++ b/dhall/tests/import/data/importBoundary.dhall @@ -0,0 +1,3 @@ +-- This file contains a free variable. This should be a type error, even if the variable +-- is in scope in the importing expression +x diff --git a/dhall/tests/import/data/nested.dhall b/dhall/tests/import/data/nested.dhall new file mode 100644 index 0000000..bf88f65 --- /dev/null +++ b/dhall/tests/import/data/nested.dhall @@ -0,0 +1 @@ +{ x = ./simple.dhall sha256:15f52ecf91c94c1baac02d5a4964b2ed8fa401641a2c8a95e8306ec7c1e3b8d2 } diff --git a/dhall/tests/import/data/referentiallyOpaque.dhall b/dhall/tests/import/data/referentiallyOpaque.dhall new file mode 100644 index 0000000..ff33765 --- /dev/null +++ b/dhall/tests/import/data/referentiallyOpaque.dhall @@ -0,0 +1,18 @@ +{- This is a "referentially opaque" import (i.e. an import that is not + globally addressable), which cannot be imported by a "referentially + transparent" import (i.e. an import that is globally addressable). + + This test file is used in a failing test to verify that referentially + transparent imports cannot import referentially opaque imports. In the test + suite this file is actually imported via its GitHub URL (not its local file + path), so it plays the role of the referentially transparent import. Then, + this file attempts to import a referentially opaque import (an environment + variable in this case) to verify that the import fails. + + For this test file we need to select a referentially opaque import that + would succeed if imported on its own, so that a non-compliant implementation + doesn't fail this test for the wrong reason (i.e. due to the import not + being present). We thus use the `DHALL_TEST_VAR` environment variable, that + is expected to be set when running import tests. +-} +env:DHALL_TEST_VAR as Text diff --git a/dhall/tests/import/data/simple.dhall b/dhall/tests/import/data/simple.dhall new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/dhall/tests/import/data/simple.dhall @@ -0,0 +1 @@ +3 diff --git a/dhall/tests/import/data/simpleLocation.dhall b/dhall/tests/import/data/simpleLocation.dhall new file mode 100644 index 0000000..1d3e43b --- /dev/null +++ b/dhall/tests/import/data/simpleLocation.dhall @@ -0,0 +1 @@ +./simple.dhall as Location diff --git a/dhall/tests/import/failure/alternativeEnv.txt b/dhall/tests/import/failure/alternativeEnv.txt new file mode 100644 index 0000000..482b68c --- /dev/null +++ b/dhall/tests/import/failure/alternativeEnv.txt @@ -0,0 +1 @@ +MissingEnvVar diff --git a/dhall/tests/import/failure/alternativeEnvMissing.txt b/dhall/tests/import/failure/alternativeEnvMissing.txt new file mode 100644 index 0000000..4666330 --- /dev/null +++ b/dhall/tests/import/failure/alternativeEnvMissing.txt @@ -0,0 +1 @@ +Missing diff --git a/dhall/tests/import/failure/cycle.txt b/dhall/tests/import/failure/cycle.txt index 4e9488e..f5a1abf 100644 --- a/dhall/tests/import/failure/cycle.txt +++ b/dhall/tests/import/failure/cycle.txt @@ -1 +1 @@ -ImportCycle([Import { mode: Code, location: Local(Parent, FilePath { file_path: ["data", "cycle.dhall"] }), hash: None }, Import { mode: Code, location: Local(Parent, FilePath { file_path: ["failure", "cycle.dhall"] }), hash: None }], Import { mode: Code, location: Local(Parent, FilePath { file_path: ["data", "cycle.dhall"] }), hash: None }) +ImportCycle([Local("./dhall-lang/tests/import/data/cycle.dhall"), Local("./dhall-lang/tests/import/failure/cycle.dhall")], Local("./dhall-lang/tests/import/data/cycle.dhall")) diff --git a/dhall/tests/import/failure/missing.txt b/dhall/tests/import/failure/missing.txt new file mode 100644 index 0000000..4666330 --- /dev/null +++ b/dhall/tests/import/failure/missing.txt @@ -0,0 +1 @@ +Missing diff --git a/dhall/tests/import/failure/referentiallyInsane.txt b/dhall/tests/import/failure/referentiallyInsane.txt new file mode 100644 index 0000000..9b5fe91 --- /dev/null +++ b/dhall/tests/import/failure/referentiallyInsane.txt @@ -0,0 +1 @@ +SanityCheck diff --git a/dhall/tests/import/failure/unit/EnvUnset.dhall b/dhall/tests/import/failure/unit/EnvUnset.dhall new file mode 100644 index 0000000..af77cce --- /dev/null +++ b/dhall/tests/import/failure/unit/EnvUnset.dhall @@ -0,0 +1 @@ +env:DHALL_TEST_UNSET diff --git a/dhall/tests/import/failure/unit/EnvUnset.txt b/dhall/tests/import/failure/unit/EnvUnset.txt new file mode 100644 index 0000000..482b68c --- /dev/null +++ b/dhall/tests/import/failure/unit/EnvUnset.txt @@ -0,0 +1 @@ +MissingEnvVar diff --git a/dhall/tests/import/failure/unit/EnvUnsetAsText.dhall b/dhall/tests/import/failure/unit/EnvUnsetAsText.dhall new file mode 100644 index 0000000..9a9db6d --- /dev/null +++ b/dhall/tests/import/failure/unit/EnvUnsetAsText.dhall @@ -0,0 +1 @@ +env:DHALL_TEST_UNSET as Text diff --git a/dhall/tests/import/failure/unit/EnvUnsetAsText.txt b/dhall/tests/import/failure/unit/EnvUnsetAsText.txt new file mode 100644 index 0000000..482b68c --- /dev/null +++ b/dhall/tests/import/failure/unit/EnvUnsetAsText.txt @@ -0,0 +1 @@ +MissingEnvVar diff --git a/dhall/tests/import/success/unit/AlternativeChain1A.dhall b/dhall/tests/import/success/unit/AlternativeChain1A.dhall new file mode 100644 index 0000000..15fbf4b --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeChain1A.dhall @@ -0,0 +1 @@ +missing ? missing ? 42 diff --git a/dhall/tests/import/success/unit/AlternativeChain1B.dhall b/dhall/tests/import/success/unit/AlternativeChain1B.dhall new file mode 100644 index 0000000..d81cc07 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeChain1B.dhall @@ -0,0 +1 @@ +42 diff --git a/dhall/tests/import/success/unit/AlternativeChain2A.dhall b/dhall/tests/import/success/unit/AlternativeChain2A.dhall new file mode 100644 index 0000000..f3ba4b5 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeChain2A.dhall @@ -0,0 +1 @@ +missing ? 42 ? 10 diff --git a/dhall/tests/import/success/unit/AlternativeChain2B.dhall b/dhall/tests/import/success/unit/AlternativeChain2B.dhall new file mode 100644 index 0000000..d81cc07 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeChain2B.dhall @@ -0,0 +1 @@ +42 diff --git a/dhall/tests/import/success/unit/AlternativeEnvA.dhall b/dhall/tests/import/success/unit/AlternativeEnvA.dhall new file mode 100644 index 0000000..1807534 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeEnvA.dhall @@ -0,0 +1 @@ +env:DHALL_TEST_UNSET ? 42 diff --git a/dhall/tests/import/success/unit/AlternativeEnvB.dhall b/dhall/tests/import/success/unit/AlternativeEnvB.dhall new file mode 100644 index 0000000..d81cc07 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeEnvB.dhall @@ -0,0 +1 @@ +42 diff --git a/dhall/tests/import/success/unit/AlternativeHashMismatchA.dhall b/dhall/tests/import/success/unit/AlternativeHashMismatchA.dhall new file mode 100644 index 0000000..8f7fb02 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeHashMismatchA.dhall @@ -0,0 +1 @@ +../../data/simple.dhall sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? 42 diff --git a/dhall/tests/import/success/unit/AlternativeHashMismatchB.dhall b/dhall/tests/import/success/unit/AlternativeHashMismatchB.dhall new file mode 100644 index 0000000..d81cc07 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeHashMismatchB.dhall @@ -0,0 +1 @@ +42 diff --git a/dhall/tests/import/success/unit/AlternativeImportErrorA.dhall b/dhall/tests/import/success/unit/AlternativeImportErrorA.dhall new file mode 100644 index 0000000..9ecc640 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeImportErrorA.dhall @@ -0,0 +1 @@ +missing ? 42 diff --git a/dhall/tests/import/success/unit/AlternativeImportErrorB.dhall b/dhall/tests/import/success/unit/AlternativeImportErrorB.dhall new file mode 100644 index 0000000..d81cc07 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeImportErrorB.dhall @@ -0,0 +1 @@ +42 diff --git a/dhall/tests/import/success/unit/AlternativeNestedImportErrorA.dhall b/dhall/tests/import/success/unit/AlternativeNestedImportErrorA.dhall new file mode 100644 index 0000000..d681287 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeNestedImportErrorA.dhall @@ -0,0 +1 @@ +../../failure/missing.dhall ? 42 diff --git a/dhall/tests/import/success/unit/AlternativeNestedImportErrorB.dhall b/dhall/tests/import/success/unit/AlternativeNestedImportErrorB.dhall new file mode 100644 index 0000000..d81cc07 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeNestedImportErrorB.dhall @@ -0,0 +1 @@ +42 diff --git a/dhall/tests/import/success/unit/AlternativeNoError1A.dhall b/dhall/tests/import/success/unit/AlternativeNoError1A.dhall new file mode 100644 index 0000000..f7c9caf --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeNoError1A.dhall @@ -0,0 +1 @@ +42 ? 10 diff --git a/dhall/tests/import/success/unit/AlternativeNoError1B.dhall b/dhall/tests/import/success/unit/AlternativeNoError1B.dhall new file mode 100644 index 0000000..d81cc07 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeNoError1B.dhall @@ -0,0 +1 @@ +42 diff --git a/dhall/tests/import/success/unit/AlternativeNoError2A.dhall b/dhall/tests/import/success/unit/AlternativeNoError2A.dhall new file mode 100644 index 0000000..877afd2 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeNoError2A.dhall @@ -0,0 +1 @@ +42 ? missing diff --git a/dhall/tests/import/success/unit/AlternativeNoError2B.dhall b/dhall/tests/import/success/unit/AlternativeNoError2B.dhall new file mode 100644 index 0000000..d81cc07 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeNoError2B.dhall @@ -0,0 +1 @@ +42 diff --git a/dhall/tests/import/success/unit/AlternativeNoError3A.dhall b/dhall/tests/import/success/unit/AlternativeNoError3A.dhall new file mode 100644 index 0000000..91bcda2 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeNoError3A.dhall @@ -0,0 +1 @@ +env:DHALL_TEST_VAR ? 10 diff --git a/dhall/tests/import/success/unit/AlternativeNoError3B.dhall b/dhall/tests/import/success/unit/AlternativeNoError3B.dhall new file mode 100644 index 0000000..d81cc07 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeNoError3B.dhall @@ -0,0 +1 @@ +42 diff --git a/dhall/tests/import/success/unit/AlternativeParseErrorA.dhall b/dhall/tests/import/success/unit/AlternativeParseErrorA.dhall new file mode 100644 index 0000000..d427c5d --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeParseErrorA.dhall @@ -0,0 +1 @@ +../../data/example.txt ? 42 diff --git a/dhall/tests/import/success/unit/AlternativeParseErrorB.dhall b/dhall/tests/import/success/unit/AlternativeParseErrorB.dhall new file mode 100644 index 0000000..d81cc07 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeParseErrorB.dhall @@ -0,0 +1 @@ +42 diff --git a/dhall/tests/import/success/unit/AlternativeSubExprA.dhall b/dhall/tests/import/success/unit/AlternativeSubExprA.dhall new file mode 100644 index 0000000..2c13f4b --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeSubExprA.dhall @@ -0,0 +1 @@ +missing + 10 ? 42 diff --git a/dhall/tests/import/success/unit/AlternativeSubExprB.dhall b/dhall/tests/import/success/unit/AlternativeSubExprB.dhall new file mode 100644 index 0000000..d81cc07 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeSubExprB.dhall @@ -0,0 +1 @@ +42 diff --git a/dhall/tests/import/success/unit/AlternativeTypeErrorA.dhall b/dhall/tests/import/success/unit/AlternativeTypeErrorA.dhall new file mode 100644 index 0000000..24ae717 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeTypeErrorA.dhall @@ -0,0 +1 @@ +../../data/doesNotTypecheck.dhall ? 42 diff --git a/dhall/tests/import/success/unit/AlternativeTypeErrorB.dhall b/dhall/tests/import/success/unit/AlternativeTypeErrorB.dhall new file mode 100644 index 0000000..d81cc07 --- /dev/null +++ b/dhall/tests/import/success/unit/AlternativeTypeErrorB.dhall @@ -0,0 +1 @@ +42 diff --git a/dhall/tests/import/success/unit/AsTextA.dhall b/dhall/tests/import/success/unit/AsTextA.dhall new file mode 100644 index 0000000..9edb0ed --- /dev/null +++ b/dhall/tests/import/success/unit/AsTextA.dhall @@ -0,0 +1 @@ +../../data/example.txt as Text diff --git a/dhall/tests/import/success/unit/AsTextB.dhall b/dhall/tests/import/success/unit/AsTextB.dhall new file mode 100644 index 0000000..1997a89 --- /dev/null +++ b/dhall/tests/import/success/unit/AsTextB.dhall @@ -0,0 +1,3 @@ +'' +Hello, world! +'' diff --git a/dhall/tests/import/success/unit/EnvSetA.dhall b/dhall/tests/import/success/unit/EnvSetA.dhall new file mode 100644 index 0000000..f851f2a --- /dev/null +++ b/dhall/tests/import/success/unit/EnvSetA.dhall @@ -0,0 +1 @@ +env:DHALL_TEST_VAR diff --git a/dhall/tests/import/success/unit/EnvSetAsTextA.dhall b/dhall/tests/import/success/unit/EnvSetAsTextA.dhall new file mode 100644 index 0000000..139b241 --- /dev/null +++ b/dhall/tests/import/success/unit/EnvSetAsTextA.dhall @@ -0,0 +1 @@ +env:DHALL_TEST_VAR as Text diff --git a/dhall/tests/import/success/unit/EnvSetAsTextB.dhall b/dhall/tests/import/success/unit/EnvSetAsTextB.dhall new file mode 100644 index 0000000..a79bb82 --- /dev/null +++ b/dhall/tests/import/success/unit/EnvSetAsTextB.dhall @@ -0,0 +1 @@ +"6 * 7" diff --git a/dhall/tests/import/success/unit/EnvSetB.dhall b/dhall/tests/import/success/unit/EnvSetB.dhall new file mode 100644 index 0000000..d81cc07 --- /dev/null +++ b/dhall/tests/import/success/unit/EnvSetB.dhall @@ -0,0 +1 @@ +42 diff --git a/dhall/tests/import/success/unit/NormalizeA.dhall b/dhall/tests/import/success/unit/NormalizeA.dhall new file mode 100644 index 0000000..2f89d08 --- /dev/null +++ b/dhall/tests/import/success/unit/NormalizeA.dhall @@ -0,0 +1 @@ +../../../../../dhall-lang/tests/normalization/success/unit/OperatorPlusOneAndOneA.dhall diff --git a/dhall/tests/import/success/unit/NormalizeB.dhall b/dhall/tests/import/success/unit/NormalizeB.dhall new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/dhall/tests/import/success/unit/NormalizeB.dhall @@ -0,0 +1 @@ +2 diff --git a/dhall/tests/import/success/unit/RemoteAsTextA.dhall b/dhall/tests/import/success/unit/RemoteAsTextA.dhall new file mode 100644 index 0000000..472d041 --- /dev/null +++ b/dhall/tests/import/success/unit/RemoteAsTextA.dhall @@ -0,0 +1 @@ +https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/example.txt as Text diff --git a/dhall/tests/import/success/unit/RemoteAsTextB.dhall b/dhall/tests/import/success/unit/RemoteAsTextB.dhall new file mode 100644 index 0000000..1997a89 --- /dev/null +++ b/dhall/tests/import/success/unit/RemoteAsTextB.dhall @@ -0,0 +1,3 @@ +'' +Hello, world! +'' diff --git a/dhall/tests/import/success/unit/SimpleA.dhall b/dhall/tests/import/success/unit/SimpleA.dhall new file mode 100644 index 0000000..035ee8b --- /dev/null +++ b/dhall/tests/import/success/unit/SimpleA.dhall @@ -0,0 +1 @@ +../../data/simple.dhall diff --git a/dhall/tests/import/success/unit/SimpleB.dhall b/dhall/tests/import/success/unit/SimpleB.dhall new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/dhall/tests/import/success/unit/SimpleB.dhall @@ -0,0 +1 @@ +3 diff --git a/dhall/tests/import/success/unit/SimpleRemoteA.dhall b/dhall/tests/import/success/unit/SimpleRemoteA.dhall new file mode 100644 index 0000000..30e0a79 --- /dev/null +++ b/dhall/tests/import/success/unit/SimpleRemoteA.dhall @@ -0,0 +1 @@ +https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/simple.dhall diff --git a/dhall/tests/import/success/unit/SimpleRemoteB.dhall b/dhall/tests/import/success/unit/SimpleRemoteB.dhall new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/dhall/tests/import/success/unit/SimpleRemoteB.dhall @@ -0,0 +1 @@ +3 diff --git a/dhall/tests/import/success/unit/asLocation/AbsoluteA.dhall b/dhall/tests/import/success/unit/asLocation/AbsoluteA.dhall new file mode 100644 index 0000000..dcf45d1 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/AbsoluteA.dhall @@ -0,0 +1 @@ +/absolute/import as Location diff --git a/dhall/tests/import/success/unit/asLocation/AbsoluteB.dhall b/dhall/tests/import/success/unit/asLocation/AbsoluteB.dhall new file mode 100644 index 0000000..1c1add7 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/AbsoluteB.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Remote : Text | Local : Text | Missing >.Local + "/absolute/import" diff --git a/dhall/tests/import/success/unit/asLocation/Canonicalize1A.dhall b/dhall/tests/import/success/unit/asLocation/Canonicalize1A.dhall new file mode 100644 index 0000000..e636ed1 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Canonicalize1A.dhall @@ -0,0 +1 @@ +./foo/./bar/import.dhall as Location diff --git a/dhall/tests/import/success/unit/asLocation/Canonicalize1B.dhall b/dhall/tests/import/success/unit/asLocation/Canonicalize1B.dhall new file mode 100644 index 0000000..3a8a926 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Canonicalize1B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Remote : Text | Local : Text | Missing >.Local + "./dhall/tests/import/success/unit/asLocation/foo/bar/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/Canonicalize2A.dhall b/dhall/tests/import/success/unit/asLocation/Canonicalize2A.dhall new file mode 100644 index 0000000..c6ef89f --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Canonicalize2A.dhall @@ -0,0 +1 @@ +./foo/baz/../bar/import.dhall as Location diff --git a/dhall/tests/import/success/unit/asLocation/Canonicalize2B.dhall b/dhall/tests/import/success/unit/asLocation/Canonicalize2B.dhall new file mode 100644 index 0000000..3a8a926 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Canonicalize2B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Remote : Text | Local : Text | Missing >.Local + "./dhall/tests/import/success/unit/asLocation/foo/bar/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/Canonicalize3A.dhall b/dhall/tests/import/success/unit/asLocation/Canonicalize3A.dhall new file mode 100644 index 0000000..e6be780 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Canonicalize3A.dhall @@ -0,0 +1 @@ +./../bar/import.dhall as Location diff --git a/dhall/tests/import/success/unit/asLocation/Canonicalize3B.dhall b/dhall/tests/import/success/unit/asLocation/Canonicalize3B.dhall new file mode 100644 index 0000000..b223da6 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Canonicalize3B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Remote : Text | Local : Text | Missing >.Local + "./dhall/tests/import/success/unit/bar/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/Canonicalize4A.dhall b/dhall/tests/import/success/unit/asLocation/Canonicalize4A.dhall new file mode 100644 index 0000000..ffccd47 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Canonicalize4A.dhall @@ -0,0 +1 @@ +../../bar/import.dhall as Location diff --git a/dhall/tests/import/success/unit/asLocation/Canonicalize4B.dhall b/dhall/tests/import/success/unit/asLocation/Canonicalize4B.dhall new file mode 100644 index 0000000..b6301f8 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Canonicalize4B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Remote : Text | Local : Text | Missing >.Local + "./dhall/tests/import/success/bar/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/Canonicalize5A.dhall b/dhall/tests/import/success/unit/asLocation/Canonicalize5A.dhall new file mode 100644 index 0000000..7e58f0b --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Canonicalize5A.dhall @@ -0,0 +1 @@ +./foo/../../bar/import.dhall as Location diff --git a/dhall/tests/import/success/unit/asLocation/Canonicalize5B.dhall b/dhall/tests/import/success/unit/asLocation/Canonicalize5B.dhall new file mode 100644 index 0000000..b223da6 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Canonicalize5B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Remote : Text | Local : Text | Missing >.Local + "./dhall/tests/import/success/unit/bar/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/Chain1A.dhall b/dhall/tests/import/success/unit/asLocation/Chain1A.dhall new file mode 100644 index 0000000..cf633fe --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Chain1A.dhall @@ -0,0 +1 @@ +./Relative1A.dhall diff --git a/dhall/tests/import/success/unit/asLocation/Chain1B.dhall b/dhall/tests/import/success/unit/asLocation/Chain1B.dhall new file mode 100644 index 0000000..6aee0b5 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Chain1B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Local : Text | Missing | Remote : Text >.Local + "./dhall/tests/import/success/unit/asLocation/some/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/Chain2A.dhall b/dhall/tests/import/success/unit/asLocation/Chain2A.dhall new file mode 100644 index 0000000..cdbd10d --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Chain2A.dhall @@ -0,0 +1 @@ +./Canonicalize4A.dhall diff --git a/dhall/tests/import/success/unit/asLocation/Chain2B.dhall b/dhall/tests/import/success/unit/asLocation/Chain2B.dhall new file mode 100644 index 0000000..6aba54e --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Chain2B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Local : Text | Missing | Remote : Text >.Local + "./dhall/tests/import/success/bar/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/Chain3A.dhall b/dhall/tests/import/success/unit/asLocation/Chain3A.dhall new file mode 100644 index 0000000..57751f6 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Chain3A.dhall @@ -0,0 +1 @@ +../asLocation/Canonicalize4A.dhall diff --git a/dhall/tests/import/success/unit/asLocation/Chain3B.dhall b/dhall/tests/import/success/unit/asLocation/Chain3B.dhall new file mode 100644 index 0000000..6aba54e --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Chain3B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Local : Text | Missing | Remote : Text >.Local + "./dhall/tests/import/success/bar/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/DontTryResolvingA.dhall b/dhall/tests/import/success/unit/asLocation/DontTryResolvingA.dhall new file mode 100644 index 0000000..e70016c --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/DontTryResolvingA.dhall @@ -0,0 +1 @@ +(missing as Location) ? 42 -- `missing` fails as an import, but definitely resolves as Location diff --git a/dhall/tests/import/success/unit/asLocation/DontTryResolvingB.dhall b/dhall/tests/import/success/unit/asLocation/DontTryResolvingB.dhall new file mode 100644 index 0000000..dd5e798 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/DontTryResolvingB.dhall @@ -0,0 +1 @@ +< Environment : Text | Remote : Text | Local : Text | Missing >.Missing diff --git a/dhall/tests/import/success/unit/asLocation/EnvA.dhall b/dhall/tests/import/success/unit/asLocation/EnvA.dhall new file mode 100644 index 0000000..eb4b4a6 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/EnvA.dhall @@ -0,0 +1 @@ +env:HOME as Location diff --git a/dhall/tests/import/success/unit/asLocation/EnvB.dhall b/dhall/tests/import/success/unit/asLocation/EnvB.dhall new file mode 100644 index 0000000..4947caa --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/EnvB.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Remote : Text | Local : Text | Missing >.Environment + "HOME" diff --git a/dhall/tests/import/success/unit/asLocation/HashA.dhall b/dhall/tests/import/success/unit/asLocation/HashA.dhall new file mode 100644 index 0000000..79f4fda --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/HashA.dhall @@ -0,0 +1 @@ +./some/import.dhall sha256:f9340badf94a684e652e0a384f64363293d8b632d971f3453f7ee22f10ab6e75 as Location diff --git a/dhall/tests/import/success/unit/asLocation/HashB.dhall b/dhall/tests/import/success/unit/asLocation/HashB.dhall new file mode 100644 index 0000000..6aee0b5 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/HashB.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Local : Text | Missing | Remote : Text >.Local + "./dhall/tests/import/success/unit/asLocation/some/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/HomeA.dhall b/dhall/tests/import/success/unit/asLocation/HomeA.dhall new file mode 100644 index 0000000..18cc2cd --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/HomeA.dhall @@ -0,0 +1 @@ +~/some/import.dhall as Location diff --git a/dhall/tests/import/success/unit/asLocation/HomeB.dhall b/dhall/tests/import/success/unit/asLocation/HomeB.dhall new file mode 100644 index 0000000..8b4f0fd --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/HomeB.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Remote : Text | Local : Text | Missing >.Local + "~/some/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/MissingA.dhall b/dhall/tests/import/success/unit/asLocation/MissingA.dhall new file mode 100644 index 0000000..e06a30b --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/MissingA.dhall @@ -0,0 +1 @@ +missing as Location diff --git a/dhall/tests/import/success/unit/asLocation/MissingB.dhall b/dhall/tests/import/success/unit/asLocation/MissingB.dhall new file mode 100644 index 0000000..dd5e798 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/MissingB.dhall @@ -0,0 +1 @@ +< Environment : Text | Remote : Text | Local : Text | Missing >.Missing diff --git a/dhall/tests/import/success/unit/asLocation/Relative1A.dhall b/dhall/tests/import/success/unit/asLocation/Relative1A.dhall new file mode 100644 index 0000000..b514f79 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Relative1A.dhall @@ -0,0 +1 @@ +./some/import.dhall as Location diff --git a/dhall/tests/import/success/unit/asLocation/Relative1B.dhall b/dhall/tests/import/success/unit/asLocation/Relative1B.dhall new file mode 100644 index 0000000..6aee0b5 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Relative1B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Local : Text | Missing | Remote : Text >.Local + "./dhall/tests/import/success/unit/asLocation/some/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/Relative2A.dhall b/dhall/tests/import/success/unit/asLocation/Relative2A.dhall new file mode 100644 index 0000000..ec59586 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Relative2A.dhall @@ -0,0 +1 @@ +../some/import.dhall as Location diff --git a/dhall/tests/import/success/unit/asLocation/Relative2B.dhall b/dhall/tests/import/success/unit/asLocation/Relative2B.dhall new file mode 100644 index 0000000..9842f7c --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/Relative2B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Local : Text | Missing | Remote : Text >.Local + "./dhall/tests/import/success/unit/some/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/RemoteA.dhall b/dhall/tests/import/success/unit/asLocation/RemoteA.dhall new file mode 100644 index 0000000..54ea028 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/RemoteA.dhall @@ -0,0 +1 @@ +https://example.com/foo/import.dhall as Location diff --git a/dhall/tests/import/success/unit/asLocation/RemoteB.dhall b/dhall/tests/import/success/unit/asLocation/RemoteB.dhall new file mode 100644 index 0000000..e22cfac --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/RemoteB.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Local : Text | Missing | Remote : Text >.Remote + "https://example.com/foo/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize1A.dhall b/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize1A.dhall new file mode 100644 index 0000000..3e6378e --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize1A.dhall @@ -0,0 +1 @@ +https://example.com/foo/./bar/import.dhall as Location diff --git a/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize1B.dhall b/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize1B.dhall new file mode 100644 index 0000000..0064a13 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize1B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Local : Text | Missing | Remote : Text >.Remote + "https://example.com/foo/bar/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize2A.dhall b/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize2A.dhall new file mode 100644 index 0000000..d3fd11e --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize2A.dhall @@ -0,0 +1 @@ +https://example.com/foo/bar/../baz/import.dhall as Location diff --git a/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize2B.dhall b/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize2B.dhall new file mode 100644 index 0000000..d85236b --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize2B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Local : Text | Missing | Remote : Text >.Remote + "https://example.com/foo/baz/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize3A.dhall b/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize3A.dhall new file mode 100644 index 0000000..2074fbf --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize3A.dhall @@ -0,0 +1 @@ +https://example.com/foo/bar/../../baz/import.dhall as Location diff --git a/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize3B.dhall b/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize3B.dhall new file mode 100644 index 0000000..45a2857 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize3B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Local : Text | Missing | Remote : Text >.Remote + "https://example.com/baz/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize4A.dhall b/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize4A.dhall new file mode 100644 index 0000000..9358f44 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize4A.dhall @@ -0,0 +1 @@ +https://example.com/../bar/import.dhall as Location diff --git a/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize4B.dhall b/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize4B.dhall new file mode 100644 index 0000000..b5ccbcd --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/RemoteCanonicalize4B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Local : Text | Missing | Remote : Text >.Remote + "https://example.com/../bar/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/RemoteChain1A.dhall b/dhall/tests/import/success/unit/asLocation/RemoteChain1A.dhall new file mode 100644 index 0000000..7d081ab --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/RemoteChain1A.dhall @@ -0,0 +1 @@ +https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/simpleLocation.dhall diff --git a/dhall/tests/import/success/unit/asLocation/RemoteChain1B.dhall b/dhall/tests/import/success/unit/asLocation/RemoteChain1B.dhall new file mode 100644 index 0000000..8ac2c6b --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/RemoteChain1B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Local : Text | Missing | Remote : Text >.Remote + "https://raw.githubusercontent.com/dhall-lang/dhall-lang/0b983b92aa2222dc3e292c20550ee37dea3f41df/tests/import/data/simple.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/RemoteChain2A.dhall b/dhall/tests/import/success/unit/asLocation/RemoteChain2A.dhall new file mode 100644 index 0000000..9929517 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/RemoteChain2A.dhall @@ -0,0 +1 @@ +https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/Canonicalize3A.dhall diff --git a/dhall/tests/import/success/unit/asLocation/RemoteChain2B.dhall b/dhall/tests/import/success/unit/asLocation/RemoteChain2B.dhall new file mode 100644 index 0000000..685dc04 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/RemoteChain2B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Local : Text | Missing | Remote : Text >.Remote + "https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/bar/import.dhall" diff --git a/dhall/tests/import/success/unit/asLocation/RemoteChain3A.dhall b/dhall/tests/import/success/unit/asLocation/RemoteChain3A.dhall new file mode 100644 index 0000000..851108c --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/RemoteChain3A.dhall @@ -0,0 +1 @@ +https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/asLocation/Canonicalize5A.dhall diff --git a/dhall/tests/import/success/unit/asLocation/RemoteChain3B.dhall b/dhall/tests/import/success/unit/asLocation/RemoteChain3B.dhall new file mode 100644 index 0000000..685dc04 --- /dev/null +++ b/dhall/tests/import/success/unit/asLocation/RemoteChain3B.dhall @@ -0,0 +1,2 @@ +< Environment : Text | Local : Text | Missing | Remote : Text >.Remote + "https://raw.githubusercontent.com/Nadrieril/dhall-rust/f7d8c64a9799f139ad65427c2518376adb9e2e2f/dhall/tests/import/success/unit/bar/import.dhall" diff --git a/dhall/tests/normalization/success/regression/NaturalFoldExtraArgA.dhall b/dhall/tests/normalization/success/regression/NaturalFoldExtraArgA.dhall new file mode 100644 index 0000000..3a69d1e --- /dev/null +++ b/dhall/tests/normalization/success/regression/NaturalFoldExtraArgA.dhall @@ -0,0 +1 @@ +Natural/fold 0 (Bool -> Bool) (λ(_ : (Bool -> Bool)) → λ(_ : Bool) → True) (λ(_ : Bool) → False) True diff --git a/dhall/tests/normalization/success/regression/NaturalFoldExtraArgB.dhall b/dhall/tests/normalization/success/regression/NaturalFoldExtraArgB.dhall new file mode 100644 index 0000000..bc59c12 --- /dev/null +++ b/dhall/tests/normalization/success/regression/NaturalFoldExtraArgB.dhall @@ -0,0 +1 @@ +False diff --git a/dhall/tests/normalization/success/regression/TrickyBinderIdentityA.dhall b/dhall/tests/normalization/success/regression/TrickyBinderIdentityA.dhall new file mode 100644 index 0000000..5d72bbe --- /dev/null +++ b/dhall/tests/normalization/success/regression/TrickyBinderIdentityA.dhall @@ -0,0 +1 @@ +let T = Natural let ap = λ(f : T → List T) -> λ(x : T) -> f x in ap (λ(x : T) -> ap (λ(y : T) -> [x, y]) 1) 0 diff --git a/dhall/tests/normalization/success/regression/TrickyBinderIdentityB.dhall b/dhall/tests/normalization/success/regression/TrickyBinderIdentityB.dhall new file mode 100644 index 0000000..28233fb --- /dev/null +++ b/dhall/tests/normalization/success/regression/TrickyBinderIdentityB.dhall @@ -0,0 +1 @@ +[ 0, 1 ] diff --git a/dhall/tests/normalization/success/unit/TextLitNested1A.dhall b/dhall/tests/normalization/success/unit/TextLitNested1A.dhall new file mode 100644 index 0000000..104dc41 --- /dev/null +++ b/dhall/tests/normalization/success/unit/TextLitNested1A.dhall @@ -0,0 +1 @@ +λ(x: Text) → "${""}${x}" diff --git a/dhall/tests/normalization/success/unit/TextLitNested1B.dhall b/dhall/tests/normalization/success/unit/TextLitNested1B.dhall new file mode 100644 index 0000000..631a6cf --- /dev/null +++ b/dhall/tests/normalization/success/unit/TextLitNested1B.dhall @@ -0,0 +1 @@ +λ(x : Text) → x diff --git a/dhall/tests/normalization/success/unit/TextLitNested2A.dhall b/dhall/tests/normalization/success/unit/TextLitNested2A.dhall new file mode 100644 index 0000000..5b4ae6e --- /dev/null +++ b/dhall/tests/normalization/success/unit/TextLitNested2A.dhall @@ -0,0 +1 @@ +λ(x: Text) → "${"${x}"}" diff --git a/dhall/tests/normalization/success/unit/TextLitNested2B.dhall b/dhall/tests/normalization/success/unit/TextLitNested2B.dhall new file mode 100644 index 0000000..631a6cf --- /dev/null +++ b/dhall/tests/normalization/success/unit/TextLitNested2B.dhall @@ -0,0 +1 @@ +λ(x : Text) → x diff --git a/dhall/tests/normalization/success/unit/TextLitNested3A.dhall b/dhall/tests/normalization/success/unit/TextLitNested3A.dhall new file mode 100644 index 0000000..d57ac64 --- /dev/null +++ b/dhall/tests/normalization/success/unit/TextLitNested3A.dhall @@ -0,0 +1 @@ +λ(x: Text) → "${"${""}"}${x}" diff --git a/dhall/tests/normalization/success/unit/TextLitNested3B.dhall b/dhall/tests/normalization/success/unit/TextLitNested3B.dhall new file mode 100644 index 0000000..631a6cf --- /dev/null +++ b/dhall/tests/normalization/success/unit/TextLitNested3B.dhall @@ -0,0 +1 @@ +λ(x : Text) → x diff --git a/dhall/tests/normalization/success/unit/TextShowEmptyA.dhall b/dhall/tests/normalization/success/unit/TextShowEmptyA.dhall new file mode 100644 index 0000000..589f65d --- /dev/null +++ b/dhall/tests/normalization/success/unit/TextShowEmptyA.dhall @@ -0,0 +1 @@ +Text/show "" diff --git a/dhall/tests/normalization/success/unit/TextShowEmptyB.dhall b/dhall/tests/normalization/success/unit/TextShowEmptyB.dhall new file mode 100644 index 0000000..8fbbe76 --- /dev/null +++ b/dhall/tests/normalization/success/unit/TextShowEmptyB.dhall @@ -0,0 +1 @@ +"\"\"" diff --git a/dhall/tests/parser/failure/assertBinding.txt b/dhall/tests/parser/failure/assertBinding.txt new file mode 100644 index 0000000..4253a31 --- /dev/null +++ b/dhall/tests/parser/failure/assertBinding.txt @@ -0,0 +1,6 @@ + --> 1:5 + | +1 | let assert = 2 in 1␍␊ + | ^--- + | + = expected simple_label diff --git a/dhall/tests/parser/failure/spacing/AssertNoSpace.txt b/dhall/tests/parser/failure/spacing/AssertNoSpace.txt index 0e83988..a98c16a 100644 --- a/dhall/tests/parser/failure/spacing/AssertNoSpace.txt +++ b/dhall/tests/parser/failure/spacing/AssertNoSpace.txt @@ -1,6 +1,6 @@ - --> 1:8 + --> 1:1 | 1 | assert :T␊ - | ^--- + | ^--- | - = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, arrow, import_hashed, or primitive_expression + = expected expression diff --git a/dhall/tests/parser/failure/unit/AssertNoAnnotation.dhall b/dhall/tests/parser/failure/unit/AssertNoAnnotation.dhall new file mode 100644 index 0000000..6019020 --- /dev/null +++ b/dhall/tests/parser/failure/unit/AssertNoAnnotation.dhall @@ -0,0 +1 @@ +assert diff --git a/dhall/tests/parser/failure/unit/AssertNoAnnotation.txt b/dhall/tests/parser/failure/unit/AssertNoAnnotation.txt new file mode 100644 index 0000000..435e325 --- /dev/null +++ b/dhall/tests/parser/failure/unit/AssertNoAnnotation.txt @@ -0,0 +1,6 @@ + --> 1:1 + | +1 | assert␊ + | ^--- + | + = expected expression diff --git a/dhall/tests/parser/success/unit/EmptyRecordLiteralA.dhall b/dhall/tests/parser/success/unit/EmptyRecordLiteralA.dhall new file mode 100644 index 0000000..339130f --- /dev/null +++ b/dhall/tests/parser/success/unit/EmptyRecordLiteralA.dhall @@ -0,0 +1 @@ +{=} diff --git a/dhall/tests/parser/success/unit/EmptyRecordLiteralB.dhallb b/dhall/tests/parser/success/unit/EmptyRecordLiteralB.dhallb new file mode 100644 index 0000000..58e2e39 --- /dev/null +++ b/dhall/tests/parser/success/unit/EmptyRecordLiteralB.dhallb @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/dhall/tests/parser/success/unit/EmptyRecordLiteralB.diag b/dhall/tests/parser/success/unit/EmptyRecordLiteralB.diag new file mode 100644 index 0000000..8ead206 --- /dev/null +++ b/dhall/tests/parser/success/unit/EmptyRecordLiteralB.diag @@ -0,0 +1 @@ +[8, {}] diff --git a/dhall/tests/parser/success/unit/LetAnnotA.dhall b/dhall/tests/parser/success/unit/LetAnnotA.dhall new file mode 100644 index 0000000..c7d29f8 --- /dev/null +++ b/dhall/tests/parser/success/unit/LetAnnotA.dhall @@ -0,0 +1 @@ +let x: T = y in e diff --git a/dhall/tests/parser/success/unit/LetAnnotB.dhallb b/dhall/tests/parser/success/unit/LetAnnotB.dhallb Binary files differnew file mode 100644 index 0000000..4e3a7e4 --- /dev/null +++ b/dhall/tests/parser/success/unit/LetAnnotB.dhallb diff --git a/dhall/tests/parser/success/unit/LetAnnotB.diag b/dhall/tests/parser/success/unit/LetAnnotB.diag new file mode 100644 index 0000000..36791e0 --- /dev/null +++ b/dhall/tests/parser/success/unit/LetAnnotB.diag @@ -0,0 +1 @@ +[25, "x", ["T", 0], ["y", 0], ["e", 0]] diff --git a/dhall/tests/parser/success/unit/LetNoAnnotA.dhall b/dhall/tests/parser/success/unit/LetNoAnnotA.dhall new file mode 100644 index 0000000..64d30e6 --- /dev/null +++ b/dhall/tests/parser/success/unit/LetNoAnnotA.dhall @@ -0,0 +1 @@ +let x = y in e diff --git a/dhall/tests/parser/success/unit/LetNoAnnotB.dhallb b/dhall/tests/parser/success/unit/LetNoAnnotB.dhallb Binary files differnew file mode 100644 index 0000000..79a2384 --- /dev/null +++ b/dhall/tests/parser/success/unit/LetNoAnnotB.dhallb diff --git a/dhall/tests/parser/success/unit/LetNoAnnotB.diag b/dhall/tests/parser/success/unit/LetNoAnnotB.diag new file mode 100644 index 0000000..a23f605 --- /dev/null +++ b/dhall/tests/parser/success/unit/LetNoAnnotB.diag @@ -0,0 +1 @@ +[25, "x", null, ["y", 0], ["e", 0]] diff --git a/dhall/tests/parser/success/unit/ToMapA.dhall b/dhall/tests/parser/success/unit/ToMapA.dhall new file mode 100644 index 0000000..ea04391 --- /dev/null +++ b/dhall/tests/parser/success/unit/ToMapA.dhall @@ -0,0 +1 @@ +toMap x diff --git a/dhall/tests/parser/success/unit/ToMapAnnotA.dhall b/dhall/tests/parser/success/unit/ToMapAnnotA.dhall new file mode 100644 index 0000000..ad65b07 --- /dev/null +++ b/dhall/tests/parser/success/unit/ToMapAnnotA.dhall @@ -0,0 +1 @@ +toMap x : T diff --git a/dhall/tests/parser/success/unit/ToMapAnnotB.dhallb b/dhall/tests/parser/success/unit/ToMapAnnotB.dhallb Binary files differnew file mode 100644 index 0000000..4b53587 --- /dev/null +++ b/dhall/tests/parser/success/unit/ToMapAnnotB.dhallb diff --git a/dhall/tests/parser/success/unit/ToMapAnnotB.diag b/dhall/tests/parser/success/unit/ToMapAnnotB.diag new file mode 100644 index 0000000..8e511fb --- /dev/null +++ b/dhall/tests/parser/success/unit/ToMapAnnotB.diag @@ -0,0 +1 @@ +[27, ["x", 0], ["T", 0]] diff --git a/dhall/tests/parser/success/unit/ToMapB.dhallb b/dhall/tests/parser/success/unit/ToMapB.dhallb Binary files differnew file mode 100644 index 0000000..25ecd95 --- /dev/null +++ b/dhall/tests/parser/success/unit/ToMapB.dhallb diff --git a/dhall/tests/parser/success/unit/ToMapB.diag b/dhall/tests/parser/success/unit/ToMapB.diag new file mode 100644 index 0000000..5d25b39 --- /dev/null +++ b/dhall/tests/parser/success/unit/ToMapB.diag @@ -0,0 +1 @@ +[27, ["x", 0]] diff --git a/dhall/tests/parser/success/unit/VariableQuotedWithSpaceA.dhall b/dhall/tests/parser/success/unit/VariableQuotedWithSpaceA.dhall new file mode 100644 index 0000000..a1f4d02 --- /dev/null +++ b/dhall/tests/parser/success/unit/VariableQuotedWithSpaceA.dhall @@ -0,0 +1 @@ +` x ` diff --git a/dhall/tests/parser/success/unit/VariableQuotedWithSpaceB.dhallb b/dhall/tests/parser/success/unit/VariableQuotedWithSpaceB.dhallb Binary files differnew file mode 100644 index 0000000..56d9cd9 --- /dev/null +++ b/dhall/tests/parser/success/unit/VariableQuotedWithSpaceB.dhallb diff --git a/dhall/tests/parser/success/unit/VariableQuotedWithSpaceB.diag b/dhall/tests/parser/success/unit/VariableQuotedWithSpaceB.diag new file mode 100644 index 0000000..035d650 --- /dev/null +++ b/dhall/tests/parser/success/unit/VariableQuotedWithSpaceB.diag @@ -0,0 +1 @@ +[" x ", 0] diff --git a/dhall/tests/type-inference/failure/unit/FunctionTypeOutputTypeNotAType.dhall b/dhall/tests/type-inference/failure/unit/FunctionTypeOutputTypeNotAType.dhall new file mode 100644 index 0000000..94b32f9 --- /dev/null +++ b/dhall/tests/type-inference/failure/unit/FunctionTypeOutputTypeNotAType.dhall @@ -0,0 +1 @@ +Bool -> 1 diff --git a/dhall/tests/type-inference/failure/unit/FunctionTypeOutputTypeNotAType.txt b/dhall/tests/type-inference/failure/unit/FunctionTypeOutputTypeNotAType.txt new file mode 100644 index 0000000..bcc44a5 --- /dev/null +++ b/dhall/tests/type-inference/failure/unit/FunctionTypeOutputTypeNotAType.txt @@ -0,0 +1,7 @@ +Type error: error: Expected a type, found: `1` + --> <current file>:1:8 + | +1 | Bool -> 1 + | ^ this has type: `Natural` + | + = help: An expression in type position must have type `Type`, `Kind` or `Sort` diff --git a/dhall/tests/type-inference/failure/unit/LetInSort.dhall b/dhall/tests/type-inference/failure/unit/LetInSort.dhall new file mode 100644 index 0000000..125ab28 --- /dev/null +++ b/dhall/tests/type-inference/failure/unit/LetInSort.dhall @@ -0,0 +1 @@ +\(x: let x = 0 in Sort) -> 1 diff --git a/dhall/tests/type-inference/failure/unit/LetInSort.txt b/dhall/tests/type-inference/failure/unit/LetInSort.txt new file mode 100644 index 0000000..07be298 --- /dev/null +++ b/dhall/tests/type-inference/failure/unit/LetInSort.txt @@ -0,0 +1,6 @@ +Type error: error: Sort does not have a type + --> <current file>:1:18 + | +1 | \(x: let x = 0 in Sort) -> 1 + | ^^^^ Sort does not have a type + | diff --git a/dhall/tests/type-inference/failure/unit/MergeBool.dhall b/dhall/tests/type-inference/failure/unit/MergeBool.dhall new file mode 100644 index 0000000..01e7e3f --- /dev/null +++ b/dhall/tests/type-inference/failure/unit/MergeBool.dhall @@ -0,0 +1 @@ +\(x: { True: Natural, False: Natural }) -> merge x True diff --git a/dhall/tests/type-inference/failure/unit/MergeBool.txt b/dhall/tests/type-inference/failure/unit/MergeBool.txt new file mode 100644 index 0000000..209def1 --- /dev/null +++ b/dhall/tests/type-inference/failure/unit/MergeBool.txt @@ -0,0 +1,6 @@ +Type error: error: Merge2ArgMustBeUnionOrOptional + --> <current file>:1:43 + | +1 | \(x: { True: Natural, False: Natural }) -> merge x True + | ^^^^^^^^^^^^ Merge2ArgMustBeUnionOrOptional + | diff --git a/dhall/tests/type-inference/failure/unit/NestedAnnotInnerWrong.dhall b/dhall/tests/type-inference/failure/unit/NestedAnnotInnerWrong.dhall new file mode 100644 index 0000000..7e5c8ec --- /dev/null +++ b/dhall/tests/type-inference/failure/unit/NestedAnnotInnerWrong.dhall @@ -0,0 +1 @@ +(0 : Bool) : Natural diff --git a/dhall/tests/type-inference/failure/unit/NestedAnnotInnerWrong.txt b/dhall/tests/type-inference/failure/unit/NestedAnnotInnerWrong.txt new file mode 100644 index 0000000..b56db54 --- /dev/null +++ b/dhall/tests/type-inference/failure/unit/NestedAnnotInnerWrong.txt @@ -0,0 +1,6 @@ +Type error: error: annot mismatch: Natural != Bool + --> <current file>:1:1 + | +1 | (0 : Bool) : Natural + | ^ annot mismatch: Natural != Bool + | diff --git a/dhall/tests/type-inference/failure/unit/NestedAnnotOuterWrong.dhall b/dhall/tests/type-inference/failure/unit/NestedAnnotOuterWrong.dhall new file mode 100644 index 0000000..67a1526 --- /dev/null +++ b/dhall/tests/type-inference/failure/unit/NestedAnnotOuterWrong.dhall @@ -0,0 +1 @@ +(0 : Natural) : Bool diff --git a/dhall/tests/type-inference/failure/unit/NestedAnnotOuterWrong.txt b/dhall/tests/type-inference/failure/unit/NestedAnnotOuterWrong.txt new file mode 100644 index 0000000..2f07b8d --- /dev/null +++ b/dhall/tests/type-inference/failure/unit/NestedAnnotOuterWrong.txt @@ -0,0 +1,6 @@ +Type error: error: annot mismatch: Natural != Bool + --> <current file>:1:1 + | +1 | (0 : Natural) : Bool + | ^^^^^^^^^^^ annot mismatch: Natural != Bool + | diff --git a/dhall/tests/type-inference/success/CacheImportsA.dhall b/dhall/tests/type-inference/success/CacheImportsA.dhall new file mode 100644 index 0000000..7180b19 --- /dev/null +++ b/dhall/tests/type-inference/success/CacheImportsA.dhall @@ -0,0 +1,6 @@ +{- + This URL returns (probably) a different result for each request. This test + ensures that import results for a given URL are correctly cached within an + execution of dhall. +-} +let _ = assert : https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text === https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text in 0 diff --git a/dhall/tests/type-inference/success/CacheImportsB.dhall b/dhall/tests/type-inference/success/CacheImportsB.dhall new file mode 100644 index 0000000..2f184a4 --- /dev/null +++ b/dhall/tests/type-inference/success/CacheImportsB.dhall @@ -0,0 +1 @@ +Natural diff --git a/dhall/tests/type-inference/success/CacheImportsCanonicalizeA.dhall b/dhall/tests/type-inference/success/CacheImportsCanonicalizeA.dhall new file mode 100644 index 0000000..e7f4dcd --- /dev/null +++ b/dhall/tests/type-inference/success/CacheImportsCanonicalizeA.dhall @@ -0,0 +1,5 @@ +{- + This URL returns (probably) a different result for each request. This test + ensures that import locations are canonicalized before being cached. +-} +let _ = assert : https://csrng.net/csrng/csrng.php?min=0&max=1000 as Text === https://csrng.net/csrng/../csrng/csrng.php?min=0&max=1000 as Text in 0 diff --git a/dhall/tests/type-inference/success/CacheImportsCanonicalizeB.dhall b/dhall/tests/type-inference/success/CacheImportsCanonicalizeB.dhall new file mode 100644 index 0000000..2f184a4 --- /dev/null +++ b/dhall/tests/type-inference/success/CacheImportsCanonicalizeB.dhall @@ -0,0 +1 @@ +Natural diff --git a/dhall/tests/type-inference/success/regression/LambdaInLetScoping1A.dhall b/dhall/tests/type-inference/success/regression/LambdaInLetScoping1A.dhall new file mode 100644 index 0000000..72f866f --- /dev/null +++ b/dhall/tests/type-inference/success/regression/LambdaInLetScoping1A.dhall @@ -0,0 +1 @@ +let T = 0 in λ(T : Type) → λ(x : T) → 1 diff --git a/dhall/tests/type-inference/success/regression/LambdaInLetScoping1B.dhall b/dhall/tests/type-inference/success/regression/LambdaInLetScoping1B.dhall new file mode 100644 index 0000000..42bfeec --- /dev/null +++ b/dhall/tests/type-inference/success/regression/LambdaInLetScoping1B.dhall @@ -0,0 +1 @@ +∀(T : Type) → ∀(x : T) → Natural diff --git a/dhall/tests/type-inference/success/regression/LambdaInLetScoping2A.dhall b/dhall/tests/type-inference/success/regression/LambdaInLetScoping2A.dhall new file mode 100644 index 0000000..30fd03c --- /dev/null +++ b/dhall/tests/type-inference/success/regression/LambdaInLetScoping2A.dhall @@ -0,0 +1 @@ +(λ(T : Type) → let x = 0 in λ(x : T) → x) : ∀(T : Type) → ∀(x : T) → T diff --git a/dhall/tests/type-inference/success/regression/LambdaInLetScoping2B.dhall b/dhall/tests/type-inference/success/regression/LambdaInLetScoping2B.dhall new file mode 100644 index 0000000..20aa0d3 --- /dev/null +++ b/dhall/tests/type-inference/success/regression/LambdaInLetScoping2B.dhall @@ -0,0 +1 @@ +∀(T : Type) → ∀(x : T) → T diff --git a/dhall/tests/type-inference/success/regression/RecursiveRecordTypeMergeTripleCollisionA.dhall b/dhall/tests/type-inference/success/regression/RecursiveRecordTypeMergeTripleCollisionA.dhall new file mode 100644 index 0000000..c7b7fb4 --- /dev/null +++ b/dhall/tests/type-inference/success/regression/RecursiveRecordTypeMergeTripleCollisionA.dhall @@ -0,0 +1 @@ +{ x : { a : Bool } } ⩓ { x : { b : Bool } } ⩓ { x : { c : Bool } } diff --git a/dhall/tests/type-inference/success/regression/RecursiveRecordTypeMergeTripleCollisionB.dhall b/dhall/tests/type-inference/success/regression/RecursiveRecordTypeMergeTripleCollisionB.dhall new file mode 100644 index 0000000..245bc9d --- /dev/null +++ b/dhall/tests/type-inference/success/regression/RecursiveRecordTypeMergeTripleCollisionB.dhall @@ -0,0 +1 @@ +Type diff --git a/dhall/tests/type-inference/success/regression/TodoA.dhall b/dhall/tests/type-inference/success/regression/TodoA.dhall new file mode 100644 index 0000000..9d5ef34 --- /dev/null +++ b/dhall/tests/type-inference/success/regression/TodoA.dhall @@ -0,0 +1 @@ +λ(todo : ∀(a : Type) → a) → todo diff --git a/dhall/tests/type-inference/success/regression/TodoB.dhall b/dhall/tests/type-inference/success/regression/TodoB.dhall new file mode 100644 index 0000000..e0091f2 --- /dev/null +++ b/dhall/tests/type-inference/success/regression/TodoB.dhall @@ -0,0 +1 @@ +∀(todo : ∀(a : Type) → a) → ∀(a : Type) → a diff --git a/tests_buffer b/tests_buffer index db63cde..478edbb 100644 --- a/tests_buffer +++ b/tests_buffer @@ -5,18 +5,6 @@ text interpolation and escapes projection by expression unit tests fix fakeurlencode test s/QuotedVariable/VariableQuoted/ -success/ - operators/ - PrecedenceAll1 a ? b || c + d ++ e # f && g ∧ h ⫽ i ⩓ j * k == l != m n.o - PrecedenceAll2 a b != c == d * e ⩓ f ⫽ g ∧ h && i # j ++ k + l || m ? n - LetNoAnnot let x = y in e - LetAnnot let x: T = y in e - EmptyRecordLiteral {=} - ToMap toMap x - ToMapAnnot toMap x : T - VariableQuotedWithSpace ` x ` -failure/ - AssertNoAnnotation assert binary decoding: decode old-style optional literals ? @@ -27,40 +15,25 @@ success/ recover recursive import error failure/ don't recover cycle + don't resolve symlinks in canonicalizing normalization: variables across import boundaries - Text/show "" - TextLitNested1 "${""}${x}" - TextLitNested2 "${"${x}"}" - TextLitNested3 "${"${""}"}${x}" - regression/ - NaturalFoldExtraArg Natural/fold 0 (Bool -> Bool) (λ(_ : (Bool -> Bool)) → λ(_ : Bool) → True) (λ(_ : Bool) → False) True - let T = Natural let ap = λ(f : T → List T) -> λ(x : T) -> f x in ap (λ(x : T) -> ap (λ(y : T) -> [x, y]) 1) 0 -typecheck: +type-inference: something that involves destructuring a recordtype after merge add some of the more complicated Prelude tests back, like List/enumerate success/ regression/ - RecursiveRecordTypeMergeTripleCollision { x : { a : Bool } } ⩓ { x : { b : Bool } } ⩓ { x : { c : Bool } } somehow test that ({ x = { z = 1 } } ∧ { x = { y = 2 } }).x has a type somehow test that the recordtype from List/indexed has a type in both empty and nonempty cases somehow test types added to the Foo/build closures - λ(todo : ∀(a : Type) → a) → todo - let T = 0 in λ(T : Type) → λ(x : T) → 1 - (λ(T : Type) → let x = 0 in λ(x : T) → x) : ∀(T : Type) → ∀(x : T) → T failure/ \(_: Bool) -> assert : (\(_: Bool) -> _) === (\(x: Bool) -> _) - unit/FunctionTypeOutputTypeNotAType Bool -> 1 - unit/NestedAnnotInnerWrong (0 : Bool) : Natural - unit/NestedAnnotOuterWrong (0 : Natural) : Bool merge { x = λ(x : Bool) → x } (< x: Bool | y: Natural >.x True) merge { x = λ(_ : Bool) → _, y = 1 } < x = True | y > merge { x = True, y = 1 } < x | y >.x merge {x=...,y=...} <x>.x merge {x=...,y=...} <x:T>.x - MergeBool merge x True - LetInSort \(x: let x = 0 in Sort) -> 1 equivalence: diff --git a/update-tests.sh b/update-tests.sh new file mode 100755 index 0000000..7be40c4 --- /dev/null +++ b/update-tests.sh @@ -0,0 +1,126 @@ +#!/usr/bin/env bash +# This script generates the missing "...B.dhall" files in tests. +# It needs to have a valid `dhall` executable in the PATH. +# It also uses the `fd` command (https://github.com/sharkdp/fd), until +# someone comes up with the correct equivalent `find` invocation. +# +# Usage: +# $ ./update-tests.sh + +usage_text=$(cat <<-END +Usage: update-tests.sh [missing | add] +END +) + +cd "$(dirname "$0")" || exit 1 +export DHALL_TEST_VAR="6 * 7" + +if [ ! -x "$(which dhall)" ] ; then + echo "Error: 'dhall' executable not found in PATH" +fi +if [ ! -x "$(which fd)" ] ; then + echo "Error: 'fd' executable not found in PATH" +fi +if [ ! -x "$(which cbor2diag.rb)" ] ; then + echo "Error: 'cbor2diag.rb' executable not found in PATH" +fi + +function parser_input_file() { echo "$1A.dhall"; } +function parser_output_file() { echo "$1B.dhallb"; } +function parser_process() { + dhall encode --file "$1" +} + +function binary-decode_input_file() { echo "$1A.dhallb"; } +function binary-decode_output_file() { echo "$1B.dhall"; } +function binary-decode_process() { + dhall decode --file "$1" +} + +function semantic-hash_input_file() { echo "$1A.dhall"; } +function semantic-hash_output_file() { echo "$1B.hash"; } +function semantic-hash_process() { + dhall hash --file "$1" +} + +function import_input_file() { echo "$1A.dhall"; } +function import_output_file() { echo "$1B.dhall"; } +function import_process() { + dhall --file "$1" +} + +function type-inference_input_file() { echo "$1A.dhall"; } +function type-inference_output_file() { echo "$1B.dhall"; } +function type-inference_process() { + dhall resolve --file "$1" | dhall type +} + +function normalization_input_file() { echo "$1A.dhall"; } +function normalization_output_file() { echo "$1B.dhall"; } +function normalization_process() { + dhall --file "$1" +} + +function alpha-normalization_input_file() { echo "$1A.dhall"; } +function alpha-normalization_output_file() { echo "$1B.dhall"; } +function alpha-normalization_process() { + dhall normalize --alpha --file "$1" +} + +tmpfile=$(mktemp -t update-tests.XXXXXX) +trap "{ rm -f $tmpfile; }" EXIT + +function generate_output_file() { + folder="$1" + file="$2" + INPUT_FILE="$(${folder}_input_file "$file")" + OUTPUT_FILE="$(${folder}_output_file "$file")" + if [ ! -f "$OUTPUT_FILE" ]; then + echo "$OUTPUT_FILE" + ${folder}_process "$INPUT_FILE" > "$tmpfile" + if [ $? -eq 0 ]; then + mv "$tmpfile" "$OUTPUT_FILE" + if [ "$folder" = "parser" ]; then + cat "$OUTPUT_FILE" | cbor2diag.rb > "${file}B.diag" + fi + fi + fi +} + +if [ "$1" = "missing" ]; then + echo "Generating missing output files..." + for folder in parser binary-decode semantic-hash import type-inference normalization alpha-normalization; do + for root in "dhall-lang/tests" "dhall/tests"; do + # This is not robust to spaces in filenames, but hopefully there should be none + fd 'A\.dhallb?$' "$root/$folder/success" \ + | sed 's/A.dhallb\?$//' \ + | while read file; do + generate_output_file "$folder" "$file" + done + done + done + +elif [ "$1" = "add" ]; then + # Takes in stdin lists of a path and file contents, like: + # normalization/unit/TextShowEmpty Text/show "" + # This will add a test to the local tests folder for each such line, and generate + # the output using the `dhall` command in the PATH. + while read file contents; do + folder="$(echo "$file" | cut -d/ -f1)" + is_success="$(echo "$file" | cut -d/ -f2)" + file="./dhall/tests/$file" + mkdir -p "$(dirname "$file")" + + if [ "$is_success" = "success" ]; then + INPUT_FILE="${file}A.dhall" + echo "$contents" > $INPUT_FILE + generate_output_file "$folder" "$file" + else + INPUT_FILE="${file}.dhall" + echo "$contents" > $INPUT_FILE + fi + done + +else + echo "$usage_text" +fi |