about summary refs log tree commit diff
path: root/tvix/eval/Cargo.lock
AgeCommit message (Collapse)AuthorFilesLines
2022-09-17 r/4891 chore(tvix/eval): Add deps on proptest+test_strategyGriffin Smith1-1/+145
It's proptest time! Add deps on the proptest and test_strategy crates, gated behind a new (default-enabled) "arbitrary" feature flag so that they don't affect dependencies of things like tvixbolt that depend on tvix. These are going in dependencies, not dev-dependencies, so that we can impl Arbitrary for stuff outside of test modules (which will be important for integration suites which want to run proptests) Change-Id: I1613bd3ea9a835e22986ad4e59700e8736007963 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6624 Autosubmit: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-09-17 r/4886 test(tvix/eval): Add the start of a nix oracle test suiteGriffin Smith1-30/+93
Add the start of a test suite that compares tvix eval results against nix, using the string repr of the value as the comparison. This shells out to a nix-instantiate binary, which is configurable as an environment variable, to eval - there's some extra machinery there to setup a new nix store as a tempdir to allow running this test inside the nix build for tvix-eval itself. Currently this has a macro that'll allow writing lots and lots of hardcoded tests, but going forward I'm also going to be looking into adding proptest-based generation of expressions to compare. Change-Id: I9f4895fab1e668ed2b7dfd6f92f8c80de1bbb16b Reviewed-on: https://cl.tvl.fyi/c/depot/+/6307 Autosubmit: grfn <grfn@gws.fyi> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-09-13 r/4827 chore(tvix/eval): add dependency on codemap-diagnosticVincent Ambo1-0/+21
This is a crate for source-span based error reporting. Since all of our spans are already codemap spans, it is a good starting point. We have to figure out quite a bit of logic for neat error printing; later on if we want fancier presentation we might want to look at one of the other libraries in this space like miette. Change-Id: I4e28886af1ed199b7112d9dbf063c9f29b612bf1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6531 Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: grfn <grfn@gws.fyi>
2022-09-07 r/4708 chore(tvix/eval): bump all dependenciesVincent Ambo1-7/+7
Updated the rnix hash manually, and ran `cargo update` for the rest. Change-Id: I457262625d648e25d745efa4d33ae44cb8f21326 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6375 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-09-07 r/4707 chore(tvix/eval): add codemap dependencyVincent Ambo1-0/+7
This will be used to track source spans when emitting bytecode. The codemap is a data structure which tracks *all* the source files visited by an evaluation, and makes it possible to represent locations across all of the files using a simple span (i.e. pair of offsets). When reporting errors, this even contains enough information to reconstruct the rnix AST to create fancier reporting in certain cases if desired. Change-Id: I4ae98620b9b150fb5a389bd7f1e12670e3192c62 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6374 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-09-03 r/4615 test(tvix/eval): Add attr merge benchmarksGriffin Smith1-0/+1
Add a quick couple of benchmarks for merging attribute sets, large and small. Change-Id: I26940a9cf4e0d30e3d9eb07a7b8c366ca4072ca3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6286 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: grfn <grfn@gws.fyi>
2022-09-01 r/4569 chore(tvix/eval): bump rnix-parser to latest masterVincent Ambo1-1/+1
In this commit, the string interpolation parsing is identical to nixpkgs which makes some of the upstream Nix tests for interpolation-related weirdness pass. Change-Id: I3a295cfdc404c32228a54846e6efd3c0dcee5842 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6233 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-09-01 r/4567 refactor(tvix/eval): Upgrade to latest rnix-parserVincent Ambo1-26/+15
Since the latest published version of rnix-parser on crates.io, the crate has undergone major changes which are only available in the git repository at the moment. This commit updates the compiler to this newer version of rnix. Most notably, the entire AST provided by rnix is now wrapped in the AST type system. As a result of this traversal is much nicer in many places, especially for things like nested attribute selection. There are a handful of smaller features missing for full feature parity with the previous version, especially handling of path literals, but PRs for these already exist in rnix-parser. Change-Id: Icde6d393067976549492b7d89c4cc49e5e575fc7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6231 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-09-01 r/4563 refactor(tvix/eval): use pretty_assertions for testsVincent Ambo1-0/+44
This makes for much more readable output especially when long strings are involved. Change-Id: I43dd73a0480535d7181a760788c42883a9b083f8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6229 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-08-30 r/4533 feat(tvix/eval): implement optional runtime tracingVincent Ambo1-0/+10
This adds a `disassembler` feature to the crate configuration that traces the operations executed and the state of the stack at runtime. This can be enabled by compiling with `--feature disassembler`. This will also gain a more sensible layout of code slices eventually. Change-Id: I34c15e1cd346ecc4362b5afba6bf82dd49359d20 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6193 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-08-28 r/4520 fix(tvix/eval): use path_clean instead of fs::canonicalize for pathsVincent Ambo1-0/+7
Canonicalisation performs much more functionality than what C++ Nix implements for paths, and causes some undesirable behaviour (e.g. handling non-existant files becomes difficult, but should be possible in literals). Instead, the path_clean crate provides a pure normalisation method. There is an intention to add this to Rust itself: https://github.com/rust-lang/rfcs/issues/2208 Change-Id: I775d238136db0a52cf6b12a68985833c8fb32882 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6186 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-08-26 r/4504 chore(tvix/cargo): add dirs dependencyVincent Ambo1-0/+21
This crate provides sensible default locations for directories on different platforms. Change-Id: I0b61cc7f626dc6c8df903ba0f873be24e07d69b5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6170 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2022-08-26 r/4503 chore(tvix/cargo): add rustyline dependencyVincent Ambo1-0/+290
There's a few options for this, but this one seems fine in terms of features and doesn't have an insane amount of dependencies. Change-Id: Ief99e66bfee0ba0ba1cfdd09568b002121b7325b Reviewed-on: https://cl.tvl.fyi/c/depot/+/6169 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2022-08-26 r/4498 refactor(tvix/value): replace static representation with SmolStrVincent Ambo1-0/+1
The only uses of the static variant were for `"name"` and `"value"`, which are both small enough to fit into a SmolStr. The size of NixString accomodates `String` anyways, so we may as well inline them. Additionally smol_str is already in the dependency graph because rnix uses it, and using it for representations of identifiers is sensible. Change-Id: I9969312256d1657d69128e54c47dc7294a18ce58 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6165 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: grfn <grfn@gws.fyi>
2022-08-25 r/4489 feat(tvix/eval): Add initial benchmarking infrastructureGriffin Smith1-6/+560
Bootstrap some (initially very simple, mostly proof-of-concept) benchmarking infrastructure using Criterion, using the newly-exposed lib from tvix-eval. Change-Id: I4bb93c142ba8d018d7e67e58ac8907a0429398a5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6156 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: grfn <grfn@gws.fyi>
2022-08-24 r/4460 chore(tvix/eval): add 'test-generator' as dev-dependencyVincent Ambo1-0/+54
This crate makes it easy to generate test cases from files on disk, which is used for running the Nix test suite against Tvix. Change-Id: I60ef26484d05e723982679dd42958adf52735916 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6125 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2022-08-12 r/4402 chore(tvix/eval): add rnix-parser dependencyVincent Ambo1-0/+99
Change-Id: I81bd8416b3837a728ecd7911fe1ca06e89b9e90e Reviewed-on: https://cl.tvl.fyi/c/depot/+/6065 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2022-08-12 r/4398 feat(tvix/eval): check in generated project skeletonVincent Ambo1-0/+7
Change-Id: Iecc8283abb289de71f22076fd88892f6ded99cb3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6062 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>