diff options
author | Vincent Ambo <mail@tazj.in> | 2023-01-07T12·23+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2023-01-17T10·20+0000 |
commit | 940251b87f9d73087e2f51411fff9eba84a7108e (patch) | |
tree | 381815a37cabe3fe24b51d4d64bb213907eb3b0e /tvix/Cargo.nix | |
parent | f27f5ef0c990c3cab9182437bb76593be9b0a0fd (diff) |
refactor(tvix/value): use proptest strategies from imbl crate r/5670
Instead of going through Vec/BTreeMap for generating our internal types, use the proptest strategies from imbl. The one thing I couldn't figure out in the previous implementation is where the ranges/sizes of generated collections came from. The strategies in proptest use different types (Range, with an unknown default value, and SizeRange with 0..100). I've opted to specify 0..100 directly, but we can probably make it configurable. Change-Id: I749bc4c703fe424099240cab822b1642e5216361 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7791 Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/Cargo.nix')
-rw-r--r-- | tvix/Cargo.nix | 130 |
1 files changed, 125 insertions, 5 deletions
diff --git a/tvix/Cargo.nix b/tvix/Cargo.nix index a27fe822f200..ca3165c1afab 100644 --- a/tvix/Cargo.nix +++ b/tvix/Cargo.nix @@ -649,6 +649,43 @@ rec { }; resolvedDefaultFeatures = [ "default" "std" ]; }; + "bit-set" = rec { + crateName = "bit-set"; + version = "0.5.3"; + edition = "2015"; + sha256 = "1wcm9vxi00ma4rcxkl3pzzjli6ihrpn9cfdi0c5b4cvga2mxs007"; + authors = [ + "Alexis Beingessner <a.beingessner@gmail.com>" + ]; + dependencies = [ + { + name = "bit-vec"; + packageId = "bit-vec"; + usesDefaultFeatures = false; + } + ]; + features = { + "default" = [ "std" ]; + "std" = [ "bit-vec/std" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; + "bit-vec" = rec { + crateName = "bit-vec"; + version = "0.6.3"; + edition = "2015"; + sha256 = "1ywqjnv60cdh1slhz67psnp422md6jdliji6alq0gmly2xm9p7rl"; + authors = [ + "Alexis Beingessner <a.beingessner@gmail.com>" + ]; + features = { + "default" = [ "std" ]; + "serde" = [ "dep:serde" ]; + "serde_no_std" = [ "serde/alloc" ]; + "serde_std" = [ "std" "serde/std" ]; + }; + resolvedDefaultFeatures = [ "std" ]; + }; "bitflags" = rec { crateName = "bitflags"; version = "1.3.2"; @@ -2514,6 +2551,11 @@ rec { packageId = "imbl-sized-chunks"; } { + name = "proptest"; + packageId = "proptest"; + optional = true; + } + { name = "rand_core"; packageId = "rand_core 0.6.4"; } @@ -2535,6 +2577,10 @@ rec { ]; devDependencies = [ { + name = "proptest"; + packageId = "proptest"; + } + { name = "serde"; packageId = "serde"; } @@ -2547,7 +2593,7 @@ rec { "refpool" = [ "dep:refpool" ]; "serde" = [ "dep:serde" ]; }; - resolvedDefaultFeatures = [ "serde" ]; + resolvedDefaultFeatures = [ "proptest" "serde" ]; }; "imbl-sized-chunks" = rec { crateName = "imbl-sized-chunks"; @@ -3790,6 +3836,11 @@ rec { ]; dependencies = [ { + name = "bit-set"; + packageId = "bit-set"; + optional = true; + } + { name = "bitflags"; packageId = "bitflags"; } @@ -3810,7 +3861,7 @@ rec { } { name = "quick-error"; - packageId = "quick-error"; + packageId = "quick-error 2.0.1"; optional = true; } { @@ -3834,6 +3885,12 @@ rec { optional = true; } { + name = "rusty-fork"; + packageId = "rusty-fork"; + optional = true; + usesDefaultFeatures = false; + } + { name = "tempfile"; packageId = "tempfile"; optional = true; @@ -3854,7 +3911,7 @@ rec { "timeout" = [ "fork" "rusty-fork/timeout" ]; "x86" = [ "dep:x86" ]; }; - resolvedDefaultFeatures = [ "alloc" "break-dead-code" "lazy_static" "quick-error" "regex-syntax" "std" "tempfile" ]; + resolvedDefaultFeatures = [ "alloc" "bit-set" "break-dead-code" "default" "fork" "lazy_static" "quick-error" "regex-syntax" "rusty-fork" "std" "tempfile" "timeout" ]; }; "prost" = rec { crateName = "prost"; @@ -4038,7 +4095,18 @@ rec { }; resolvedDefaultFeatures = [ "default" "std" ]; }; - "quick-error" = rec { + "quick-error 1.2.3" = rec { + crateName = "quick-error"; + version = "1.2.3"; + edition = "2015"; + sha256 = "1q6za3v78hsspisc197bg3g7rpc989qycy8ypr8ap8igv10ikl51"; + authors = [ + "Paul Colomiets <paul@colomiets.name>" + "Colin Kiegel <kiegel@gmx.de>" + ]; + + }; + "quick-error 2.0.1" = rec { crateName = "quick-error"; version = "2.0.1"; edition = "2018"; @@ -4738,6 +4806,40 @@ rec { ]; }; + "rusty-fork" = rec { + crateName = "rusty-fork"; + version = "0.3.0"; + edition = "2018"; + sha256 = "0kxwq5c480gg6q0j3bg4zzyfh2kwmc3v2ba94jw8ncjc8mpcqgfb"; + authors = [ + "Jason Lingle" + ]; + dependencies = [ + { + name = "fnv"; + packageId = "fnv"; + } + { + name = "quick-error"; + packageId = "quick-error 1.2.3"; + } + { + name = "tempfile"; + packageId = "tempfile"; + } + { + name = "wait-timeout"; + packageId = "wait-timeout"; + optional = true; + } + ]; + features = { + "default" = [ "timeout" ]; + "timeout" = [ "wait-timeout" ]; + "wait-timeout" = [ "dep:wait-timeout" ]; + }; + resolvedDefaultFeatures = [ "timeout" "wait-timeout" ]; + }; "rustyline" = rec { crateName = "rustyline"; version = "10.0.0"; @@ -6927,7 +7029,7 @@ rec { } ]; features = { - "arbitrary" = [ "proptest" "test-strategy" ]; + "arbitrary" = [ "proptest" "test-strategy" "imbl/proptest" ]; "backtrace-on-stack-overflow" = [ "dep:backtrace-on-stack-overflow" ]; "backtrace_overflow" = [ "backtrace-on-stack-overflow" ]; "default" = [ "impure" "arbitrary" "nix_tests" "backtrace_overflow" ]; @@ -7216,6 +7318,24 @@ rec { ]; }; + "wait-timeout" = rec { + crateName = "wait-timeout"; + version = "0.2.0"; + edition = "2015"; + crateBin = [ ]; + sha256 = "1xpkk0j5l9pfmjfh1pi0i89invlavfrd9av5xp0zhxgb29dhy84z"; + authors = [ + "Alex Crichton <alex@alexcrichton.com>" + ]; + dependencies = [ + { + name = "libc"; + packageId = "libc"; + target = { target, features }: (target."unix" or false); + } + ]; + + }; "walkdir" = rec { crateName = "walkdir"; version = "2.3.2"; |