)]}'
{"tvix/eval/src/eval.rs":[{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"4abea023e9fd851abbe2bf57aead084e3ce956b1","unresolved":true,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"use crate::{errors::EvalResult, value::Value};"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"pub fn interpret(code: \u0026str) -\u003e EvalResult\u003cValue\u003e {"},{"line_number":6,"context_line":"    let ast \u003d rnix::parse(code);"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"    let errors \u003d ast.errors();"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"94cf3aa4_79c3dc17","line":5,"range":{"start_line":5,"start_character":23,"end_line":5,"end_character":27},"updated":"2022-08-24 21:05:26.000000000","message":"maybe just an `impl AsRef\u003cstr\u003e` here?","commit_id":"86a3ad2b6990dca4de88e20a2f651b622812bf34"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"ed087857ba61d56dd2b8a1182432e2ed882d9b98","unresolved":false,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"use crate::{errors::EvalResult, value::Value};"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"pub fn interpret(code: \u0026str) -\u003e EvalResult\u003cValue\u003e {"},{"line_number":6,"context_line":"    let ast \u003d rnix::parse(code);"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"    let errors \u003d ast.errors();"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"3d8043d1_c89d2678","line":5,"range":{"start_line":5,"start_character":23,"end_line":5,"end_character":27},"in_reply_to":"94cf3aa4_79c3dc17","updated":"2022-08-24 21:21:48.000000000","message":"Fixing downstream!","commit_id":"86a3ad2b6990dca4de88e20a2f651b622812bf34"}],"tvix/eval/src/main.rs":[{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"4abea023e9fd851abbe2bf57aead084e3ce956b1","unresolved":true,"context_lines":[{"line_number":13,"context_line":"mod vm;"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"#[cfg(test)]"},{"line_number":16,"context_line":"mod tests;"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"fn main() {"},{"line_number":19,"context_line":"    let mut args \u003d env::args();"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"55e8d179_6a122c7f","line":16,"updated":"2022-08-24 21:05:26.000000000","message":"the traditional way of doing integration tests in rust ime is to put them in `tests/` as a neighbor to `src/`; this has a number of advantages including providing for more selective compilation (eg I can run `cargo test --test nix-eval` or whatever to only actually compile the lib and that test suite) and clearer organization, without having to sprinkle `#[cfg(test)]` everywhere.","commit_id":"86a3ad2b6990dca4de88e20a2f651b622812bf34"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"ed087857ba61d56dd2b8a1182432e2ed882d9b98","unresolved":false,"context_lines":[{"line_number":13,"context_line":"mod vm;"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"#[cfg(test)]"},{"line_number":16,"context_line":"mod tests;"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"fn main() {"},{"line_number":19,"context_line":"    let mut args \u003d env::args();"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"41f91678_fcb718e0","line":16,"in_reply_to":"55e8d179_6a122c7f","updated":"2022-08-24 21:21:48.000000000","message":"We need to refactor this into lib-mode first, which it currently isn\u0027t, but I\u0027ll put it on the list.","commit_id":"86a3ad2b6990dca4de88e20a2f651b622812bf34"}],"tvix/eval/src/tests/mod.rs":[{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"4abea023e9fd851abbe2bf57aead084e3ce956b1","unresolved":true,"context_lines":[{"line_number":12,"context_line":"    let base \u003d code_path"},{"line_number":13,"context_line":"        .strip_suffix(\"nix\")"},{"line_number":14,"context_line":"        .expect(\"test files always end in .nix\");"},{"line_number":15,"context_line":"    let exp_path \u003d format!(\"{}exp\", base);"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    let code \u003d std::fs::read_to_string(code_path).expect(\"should be able to read test code\");"},{"line_number":18,"context_line":"    let exp \u003d std::fs::read_to_string(exp_path).expect(\"should be able to read test expectation\");"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"e7c592fc_24bc0da4","line":15,"range":{"start_line":15,"start_character":19,"end_line":15,"end_character":42},"updated":"2022-08-24 21:05:26.000000000","message":"nit: this can be `format!(\"{base}exp\")` now","commit_id":"86a3ad2b6990dca4de88e20a2f651b622812bf34"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"ed087857ba61d56dd2b8a1182432e2ed882d9b98","unresolved":false,"context_lines":[{"line_number":12,"context_line":"    let base \u003d code_path"},{"line_number":13,"context_line":"        .strip_suffix(\"nix\")"},{"line_number":14,"context_line":"        .expect(\"test files always end in .nix\");"},{"line_number":15,"context_line":"    let exp_path \u003d format!(\"{}exp\", base);"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    let code \u003d std::fs::read_to_string(code_path).expect(\"should be able to read test code\");"},{"line_number":18,"context_line":"    let exp \u003d std::fs::read_to_string(exp_path).expect(\"should be able to read test expectation\");"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"4ca79f38_bec0d7cb","line":15,"range":{"start_line":15,"start_character":19,"end_line":15,"end_character":42},"in_reply_to":"e7c592fc_24bc0da4","updated":"2022-08-24 21:21:48.000000000","message":"huh, TIL, will need to try that.","commit_id":"86a3ad2b6990dca4de88e20a2f651b622812bf34"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"4abea023e9fd851abbe2bf57aead084e3ce956b1","unresolved":true,"context_lines":[{"line_number":18,"context_line":"    let exp \u003d std::fs::read_to_string(exp_path).expect(\"should be able to read test expectation\");"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"    let result \u003d interpret(\u0026code).expect(\"evaluation of eval-okay test should succeed\");"},{"line_number":21,"context_line":"    let result_str \u003d format!(\"{}\", result);"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    assert_eq!("},{"line_number":24,"context_line":"        exp.trim(),"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"a96dab8e_cc38fb21","line":21,"range":{"start_line":21,"start_character":20,"end_line":21,"end_character":43},"updated":"2022-08-24 21:05:26.000000000","message":"same nit here","commit_id":"86a3ad2b6990dca4de88e20a2f651b622812bf34"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"ed087857ba61d56dd2b8a1182432e2ed882d9b98","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    let exp \u003d std::fs::read_to_string(exp_path).expect(\"should be able to read test expectation\");"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"    let result \u003d interpret(\u0026code).expect(\"evaluation of eval-okay test should succeed\");"},{"line_number":21,"context_line":"    let result_str \u003d format!(\"{}\", result);"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    assert_eq!("},{"line_number":24,"context_line":"        exp.trim(),"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"327671e5_35bc5fe7","line":21,"range":{"start_line":21,"start_character":20,"end_line":21,"end_character":43},"in_reply_to":"a96dab8e_cc38fb21","updated":"2022-08-24 21:21:48.000000000","message":"Ack","commit_id":"86a3ad2b6990dca4de88e20a2f651b622812bf34"}]}
