)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"292920844e5b5abcdc1097d5fa69762d83571996","unresolved":true,"context_lines":[{"line_number":15,"context_line":"`std::io::Reader`."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This also moves the hashers into their own module so that `tvix/eval`"},{"line_number":18,"context_line":"does not pick up a dependency on `nix_compat` which is where the hasher"},{"line_number":19,"context_line":"utilies live."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Fixes b/380"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"443e226e_3e24c954","line":18,"updated":"2024-04-08 17:03:22.000000000","message":"We don\u0027t need to mention nix-compat here (anymore), it\u0027s not touched.","commit_id":"48a00cba3a8f0c0dec919a059138a79f2603a547"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"c8b5bc9ba4a6faa3c2d93677b86e9c9c709a5571","unresolved":false,"context_lines":[{"line_number":15,"context_line":"`std::io::Reader`."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This also moves the hashers into their own module so that `tvix/eval`"},{"line_number":18,"context_line":"does not pick up a dependency on `nix_compat` which is where the hasher"},{"line_number":19,"context_line":"utilies live."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Fixes b/380"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"fddd2708_b9222405","line":18,"in_reply_to":"443e226e_3e24c954","updated":"2024-04-09 15:24:55.000000000","message":"Done","commit_id":"48a00cba3a8f0c0dec919a059138a79f2603a547"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"c11ca5aee0f57a8a92a7f4f27cebc62cfc382adf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"097cf03a_165bbb14","updated":"2024-03-31 12:44:40.000000000","message":"Nothing to say more than @flokli@flokli.de on this.","commit_id":"5385b396f2f2a565007433ab9437523f140ecc4e"}],"tvix/eval/Cargo.toml":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"cda4ab997257f26c97e582c0657768611a28a8e2","unresolved":true,"context_lines":[{"line_number":37,"context_line":"sha1 \u003d \"0.10.6\""},{"line_number":38,"context_line":"md-5 \u003d \"0.10.6\""},{"line_number":39,"context_line":"data-encoding \u003d \"2.5.0\""},{"line_number":40,"context_line":"nix-compat \u003d { path \u003d \"../nix-compat\" }"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"[dev-dependencies]"},{"line_number":43,"context_line":"criterion \u003d \"0.5\""}],"source_content_type":"text/x-toml","patch_set":5,"id":"4c5eb8ab_be11aed7","line":40,"updated":"2024-03-26 16:17:08.000000000","message":"we don\u0027t want to link nix-compat into tvix-eval.\n\nI assume this is due to hashFile / hashString now using HashAlgo from there. Let\u0027s move the builtin to tvix-glue.","commit_id":"e791b3d4ae00766b6d1e5eb3da38248670aff670"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"f8a79e40b7e653dbbea460bb965246c084f4568d","unresolved":false,"context_lines":[{"line_number":37,"context_line":"sha1 \u003d \"0.10.6\""},{"line_number":38,"context_line":"md-5 \u003d \"0.10.6\""},{"line_number":39,"context_line":"data-encoding \u003d \"2.5.0\""},{"line_number":40,"context_line":"nix-compat \u003d { path \u003d \"../nix-compat\" }"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"[dev-dependencies]"},{"line_number":43,"context_line":"criterion \u003d \"0.5\""}],"source_content_type":"text/x-toml","patch_set":5,"id":"1a56e801_75a2b0c2","line":40,"in_reply_to":"4c5eb8ab_be11aed7","updated":"2024-04-05 23:09:46.000000000","message":"Done","commit_id":"e791b3d4ae00766b6d1e5eb3da38248670aff670"}],"tvix/eval/src/builtins/hash.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"e8f03da6e28458964696ee166b1f9c4d725d8eed","unresolved":false,"context_lines":[{"line_number":1,"context_line":"use std::io;"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"use bstr::ByteSlice;"},{"line_number":4,"context_line":"use data_encoding::HEXLOWER;"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"cd4630f6_5f94c5fc","line":1,"updated":"2024-03-24 08:30:09.000000000","message":"Nit, feel free to ignore: I\u0027d personally prefer to not import this, but use std::io everywhere, to make it more clear this is the sync variant.","commit_id":"08e71941a849b088f39937bdf743fd40a06cf0f1"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"e8f03da6e28458964696ee166b1f9c4d725d8eed","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"use crate::ErrorKind;"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"fn hash\u003cD: Digest + io::Write\u003e(mut r: impl io::Read) -\u003e Result\u003cOutput\u003cD\u003e, ErrorKind\u003e {"},{"line_number":12,"context_line":"    let mut hasher \u003d D::new();"},{"line_number":13,"context_line":"    io::copy(\u0026mut r, \u0026mut hasher)?;"},{"line_number":14,"context_line":"    Ok(hasher.finalize())"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"099d2e78_f52ef172","line":11,"updated":"2024-03-24 08:30:09.000000000","message":"Can we move this somewhere to `tvix/nix-compat/src/nixhash/algos.rs`?","commit_id":"08e71941a849b088f39937bdf743fd40a06cf0f1"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"b236142e03e3f1fbc23bf30f054ff32581c9719a","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"use crate::ErrorKind;"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"fn hash\u003cD: Digest + io::Write\u003e(mut r: impl io::Read) -\u003e Result\u003cOutput\u003cD\u003e, ErrorKind\u003e {"},{"line_number":12,"context_line":"    let mut hasher \u003d D::new();"},{"line_number":13,"context_line":"    io::copy(\u0026mut r, \u0026mut hasher)?;"},{"line_number":14,"context_line":"    Ok(hasher.finalize())"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"e29db688_7b2df4c6","line":11,"in_reply_to":"099d2e78_f52ef172","updated":"2024-03-26 16:04:24.000000000","message":"Done","commit_id":"08e71941a849b088f39937bdf743fd40a06cf0f1"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"e8f03da6e28458964696ee166b1f9c4d725d8eed","unresolved":true,"context_lines":[{"line_number":14,"context_line":"    Ok(hasher.finalize())"},{"line_number":15,"context_line":"}"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"pub fn hash_nix(algo: impl AsRef\u003c[u8]\u003e, r: impl io::Read) -\u003e Result\u003cString, ErrorKind\u003e {"},{"line_number":18,"context_line":"    match algo.as_ref() {"},{"line_number":19,"context_line":"        b\"md5\" \u003d\u003e Ok(HEXLOWER.encode(hash::\u003cMd5\u003e(r)?.as_bstr())),"},{"line_number":20,"context_line":"        b\"sha1\" \u003d\u003e Ok(HEXLOWER.encode(hash::\u003cSha1\u003e(r)?.as_bstr())),"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"3eefde0c_bf380e6b","line":17,"updated":"2024-03-24 08:30:09.000000000","message":"… and maybe either have a `HashAlgo::new_hasher()` returning you the hash function, or a `hash_bytes(r: impl std::io::Read) -\u003e Vec\u003cu8\u003e` function does accept a reader.\n\nThis should get rid of some of the algo-specific reflection here.","commit_id":"08e71941a849b088f39937bdf743fd40a06cf0f1"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"b236142e03e3f1fbc23bf30f054ff32581c9719a","unresolved":false,"context_lines":[{"line_number":14,"context_line":"    Ok(hasher.finalize())"},{"line_number":15,"context_line":"}"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"pub fn hash_nix(algo: impl AsRef\u003c[u8]\u003e, r: impl io::Read) -\u003e Result\u003cString, ErrorKind\u003e {"},{"line_number":18,"context_line":"    match algo.as_ref() {"},{"line_number":19,"context_line":"        b\"md5\" \u003d\u003e Ok(HEXLOWER.encode(hash::\u003cMd5\u003e(r)?.as_bstr())),"},{"line_number":20,"context_line":"        b\"sha1\" \u003d\u003e Ok(HEXLOWER.encode(hash::\u003cSha1\u003e(r)?.as_bstr())),"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"2bcf523c_4bc4e465","line":17,"in_reply_to":"3eefde0c_bf380e6b","updated":"2024-03-26 16:04:24.000000000","message":"Went with the latter, it\u0027s challenging to do `new_hasher` because we\u0027d need to return like a `Box\u003cdyn Digest\u003e` but Digest needs to define its output size which is different between the algos.","commit_id":"08e71941a849b088f39937bdf743fd40a06cf0f1"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"292920844e5b5abcdc1097d5fa69762d83571996","unresolved":true,"context_lines":[{"line_number":5,"context_line":"use sha2::{digest::Output, Digest, Sha256, Sha512};"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"use crate::ErrorKind;"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"fn hash\u003cD: Digest + std::io::Write\u003e(mut r: impl std::io::Read) -\u003e Result\u003cOutput\u003cD\u003e, ErrorKind\u003e {"},{"line_number":10,"context_line":"    let mut hasher \u003d D::new();"},{"line_number":11,"context_line":"    std::io::copy(\u0026mut r, \u0026mut hasher)?;"}],"source_content_type":"text/x-rustsrc","patch_set":10,"id":"9bf23917_3e0d0428","line":8,"updated":"2024-04-08 17:03:22.000000000","message":"/// Reads through all data from the passed reader, and returns the resulting Digest.\n/// The exact hash function used is left generic over all `Digest`.","commit_id":"48a00cba3a8f0c0dec919a059138a79f2603a547"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"c8b5bc9ba4a6faa3c2d93677b86e9c9c709a5571","unresolved":false,"context_lines":[{"line_number":5,"context_line":"use sha2::{digest::Output, Digest, Sha256, Sha512};"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"use crate::ErrorKind;"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"fn hash\u003cD: Digest + std::io::Write\u003e(mut r: impl std::io::Read) -\u003e Result\u003cOutput\u003cD\u003e, ErrorKind\u003e {"},{"line_number":10,"context_line":"    let mut hasher \u003d D::new();"},{"line_number":11,"context_line":"    std::io::copy(\u0026mut r, \u0026mut hasher)?;"}],"source_content_type":"text/x-rustsrc","patch_set":10,"id":"5dcea1aa_fe527bf7","line":8,"in_reply_to":"9bf23917_3e0d0428","updated":"2024-04-09 15:24:55.000000000","message":"Done","commit_id":"48a00cba3a8f0c0dec919a059138a79f2603a547"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"292920844e5b5abcdc1097d5fa69762d83571996","unresolved":true,"context_lines":[{"line_number":12,"context_line":"    Ok(hasher.finalize())"},{"line_number":13,"context_line":"}"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"pub fn hash_nix_string(algo: impl AsRef\u003c[u8]\u003e, s: impl std::io::Read) -\u003e Result\u003cString, ErrorKind\u003e {"},{"line_number":16,"context_line":"    match algo.as_ref() {"},{"line_number":17,"context_line":"        b\"md5\" \u003d\u003e Ok(HEXLOWER.encode(hash::\u003cMd5\u003e(s)?.as_bstr())),"},{"line_number":18,"context_line":"        b\"sha1\" \u003d\u003e Ok(HEXLOWER.encode(hash::\u003cSha1\u003e(s)?.as_bstr())),"}],"source_content_type":"text/x-rustsrc","patch_set":10,"id":"b25bd445_50f80fed","line":15,"updated":"2024-04-08 17:03:22.000000000","message":"/// For a given algo \"string\" and reader for data, calculate the digest\n/// and return it as a hexlower encoded String.","commit_id":"48a00cba3a8f0c0dec919a059138a79f2603a547"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"c8b5bc9ba4a6faa3c2d93677b86e9c9c709a5571","unresolved":false,"context_lines":[{"line_number":12,"context_line":"    Ok(hasher.finalize())"},{"line_number":13,"context_line":"}"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"pub fn hash_nix_string(algo: impl AsRef\u003c[u8]\u003e, s: impl std::io::Read) -\u003e Result\u003cString, ErrorKind\u003e {"},{"line_number":16,"context_line":"    match algo.as_ref() {"},{"line_number":17,"context_line":"        b\"md5\" \u003d\u003e Ok(HEXLOWER.encode(hash::\u003cMd5\u003e(s)?.as_bstr())),"},{"line_number":18,"context_line":"        b\"sha1\" \u003d\u003e Ok(HEXLOWER.encode(hash::\u003cSha1\u003e(s)?.as_bstr())),"}],"source_content_type":"text/x-rustsrc","patch_set":10,"id":"ff262f9a_78ff3a76","line":15,"in_reply_to":"b25bd445_50f80fed","updated":"2024-04-09 15:24:55.000000000","message":"Done","commit_id":"48a00cba3a8f0c0dec919a059138a79f2603a547"}],"tvix/eval/src/builtins/impure.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"e8f03da6e28458964696ee166b1f9c4d725d8eed","unresolved":true,"context_lines":[{"line_number":38,"context_line":"            Ok(p) \u003d\u003e p,"},{"line_number":39,"context_line":"        };"},{"line_number":40,"context_line":"        let r \u003d generators::request_open_file(\u0026co, path).await;"},{"line_number":41,"context_line":"        hash_nix(algo.to_str()?, r).map(Value::from)"},{"line_number":42,"context_line":"    }"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    #[builtin(\"pathExists\")]"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"76ebe73c_f148d99a","line":41,"updated":"2024-03-24 08:30:09.000000000","message":"… we cold parse to HashAlgo here.","commit_id":"08e71941a849b088f39937bdf743fd40a06cf0f1"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"b236142e03e3f1fbc23bf30f054ff32581c9719a","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            Ok(p) \u003d\u003e p,"},{"line_number":39,"context_line":"        };"},{"line_number":40,"context_line":"        let r \u003d generators::request_open_file(\u0026co, path).await;"},{"line_number":41,"context_line":"        hash_nix(algo.to_str()?, r).map(Value::from)"},{"line_number":42,"context_line":"    }"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    #[builtin(\"pathExists\")]"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"cb52422c_7d42393e","line":41,"in_reply_to":"76ebe73c_f148d99a","updated":"2024-03-26 16:04:24.000000000","message":"Done","commit_id":"08e71941a849b088f39937bdf743fd40a06cf0f1"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"cda4ab997257f26c97e582c0657768611a28a8e2","unresolved":true,"context_lines":[{"line_number":91,"context_line":"                let mut buf \u003d String::new();"},{"line_number":92,"context_line":"                generators::request_open_file(\u0026co, path)"},{"line_number":93,"context_line":"                    .await"},{"line_number":94,"context_line":"                    .read_to_string(\u0026mut buf)?;"},{"line_number":95,"context_line":"                Ok(Value::from(buf))"},{"line_number":96,"context_line":"            }"},{"line_number":97,"context_line":"        }"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"ba3b7467_75db57c5","line":94,"updated":"2024-03-26 16:17:08.000000000","message":"read_to_end, it\u0027s perfectly fine to read files that are not valid utf8.\n\n(and let\u0027s add a test for this)","commit_id":"e791b3d4ae00766b6d1e5eb3da38248670aff670"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"f8a79e40b7e653dbbea460bb965246c084f4568d","unresolved":true,"context_lines":[{"line_number":91,"context_line":"                let mut buf \u003d String::new();"},{"line_number":92,"context_line":"                generators::request_open_file(\u0026co, path)"},{"line_number":93,"context_line":"                    .await"},{"line_number":94,"context_line":"                    .read_to_string(\u0026mut buf)?;"},{"line_number":95,"context_line":"                Ok(Value::from(buf))"},{"line_number":96,"context_line":"            }"},{"line_number":97,"context_line":"        }"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"ccee455d_2c910b7e","line":94,"in_reply_to":"ba3b7467_75db57c5","updated":"2024-04-05 23:09:46.000000000","message":"Looks like we don\u0027t have a test mod for builtins in tvix-eval like we do for glue. Should we add a similar thing here?","commit_id":"e791b3d4ae00766b6d1e5eb3da38248670aff670"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"25654568fc4fcc2dc5012c557b91b550131dae73","unresolved":true,"context_lines":[{"line_number":91,"context_line":"                let mut buf \u003d String::new();"},{"line_number":92,"context_line":"                generators::request_open_file(\u0026co, path)"},{"line_number":93,"context_line":"                    .await"},{"line_number":94,"context_line":"                    .read_to_string(\u0026mut buf)?;"},{"line_number":95,"context_line":"                Ok(Value::from(buf))"},{"line_number":96,"context_line":"            }"},{"line_number":97,"context_line":"        }"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"eb24bdf4_d5e52b81","line":94,"in_reply_to":"ccee455d_2c910b7e","updated":"2024-04-05 23:35:08.000000000","message":"Ah right, in eval we only have these .nix / .exp-based tests, and didn\u0027t really deal with fixture files. mhhm, yeah, let\u0027s do something similar as glue. But this can be a followup CL, we currently also only support strings.","commit_id":"e791b3d4ae00766b6d1e5eb3da38248670aff670"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"3ff941e5bc1260161555814112ba7587a7f05d29","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                let mut buf \u003d String::new();"},{"line_number":92,"context_line":"                generators::request_open_file(\u0026co, path)"},{"line_number":93,"context_line":"                    .await"},{"line_number":94,"context_line":"                    .read_to_string(\u0026mut buf)?;"},{"line_number":95,"context_line":"                Ok(Value::from(buf))"},{"line_number":96,"context_line":"            }"},{"line_number":97,"context_line":"        }"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"da4089be_00921172","line":94,"in_reply_to":"eb24bdf4_d5e52b81","updated":"2024-04-08 15:47:38.000000000","message":"Done","commit_id":"e791b3d4ae00766b6d1e5eb3da38248670aff670"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"292920844e5b5abcdc1097d5fa69762d83571996","unresolved":true,"context_lines":[{"line_number":79,"context_line":"        match coerce_value_to_path(\u0026co, path).await? {"},{"line_number":80,"context_line":"            Err(cek) \u003d\u003e Ok(Value::from(cek)),"},{"line_number":81,"context_line":"            Ok(path) \u003d\u003e {"},{"line_number":82,"context_line":"                let mut buf \u003d String::new();"},{"line_number":83,"context_line":"                generators::request_open_file(\u0026co, path)"},{"line_number":84,"context_line":"                    .await"},{"line_number":85,"context_line":"                    .read_to_string(\u0026mut buf)?;"}],"source_content_type":"text/x-rustsrc","patch_set":10,"id":"73296dc1_11821c3e","line":82,"updated":"2024-04-08 17:03:22.000000000","message":"I recall we had a discussion on why this still needs to be a String, and can\u0027t be a `Vec\u003cu8\u003e` yet, but I don\u0027t remember anymore. Can you add a TODO for this, providing some breadcrumbs?","commit_id":"48a00cba3a8f0c0dec919a059138a79f2603a547"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"c8b5bc9ba4a6faa3c2d93677b86e9c9c709a5571","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        match coerce_value_to_path(\u0026co, path).await? {"},{"line_number":80,"context_line":"            Err(cek) \u003d\u003e Ok(Value::from(cek)),"},{"line_number":81,"context_line":"            Ok(path) \u003d\u003e {"},{"line_number":82,"context_line":"                let mut buf \u003d String::new();"},{"line_number":83,"context_line":"                generators::request_open_file(\u0026co, path)"},{"line_number":84,"context_line":"                    .await"},{"line_number":85,"context_line":"                    .read_to_string(\u0026mut buf)?;"}],"source_content_type":"text/x-rustsrc","patch_set":10,"id":"febbac53_f18f67bd","line":82,"in_reply_to":"73296dc1_11821c3e","updated":"2024-04-09 15:24:55.000000000","message":"Oops, this can be a `Vec\u003cu8\u003e` with `read_to_end`, might\u0027ve lost this change along the way.","commit_id":"48a00cba3a8f0c0dec919a059138a79f2603a547"}],"tvix/eval/src/compiler/import.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"cda4ab997257f26c97e582c0657768611a28a8e2","unresolved":true,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    let mut reader \u003d generators::request_open_file(\u0026co, path.clone()).await;"},{"line_number":42,"context_line":"    let mut contents \u003d String::new();"},{"line_number":43,"context_line":"    reader.read_to_string(\u0026mut contents)?;"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    let parsed \u003d rnix::ast::Root::parse(\u0026contents);"},{"line_number":46,"context_line":"    let errors \u003d parsed.errors();"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"79af33a5_9df94ac1","line":43,"updated":"2024-03-26 16:17:08.000000000","message":"read_to_end. or does rnix only support strings?","commit_id":"e791b3d4ae00766b6d1e5eb3da38248670aff670"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"c534e4f65fbcce9e716409df75c1568c3d1e8e1c","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    let mut reader \u003d generators::request_open_file(\u0026co, path.clone()).await;"},{"line_number":42,"context_line":"    let mut contents \u003d String::new();"},{"line_number":43,"context_line":"    reader.read_to_string(\u0026mut contents)?;"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    let parsed \u003d rnix::ast::Root::parse(\u0026contents);"},{"line_number":46,"context_line":"    let errors \u003d parsed.errors();"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"c2095138_7f35efa1","line":43,"in_reply_to":"79af33a5_9df94ac1","updated":"2024-03-26 17:12:26.000000000","message":"`SourceCode::add_file` only takes a `String` for the contents","commit_id":"e791b3d4ae00766b6d1e5eb3da38248670aff670"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"bf21207dbe4e5f947aefa8fe10a03c8fd89573c3","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    let mut reader \u003d generators::request_open_file(\u0026co, path.clone()).await;"},{"line_number":42,"context_line":"    let mut contents \u003d String::new();"},{"line_number":43,"context_line":"    reader.read_to_string(\u0026mut contents)?;"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    let parsed \u003d rnix::ast::Root::parse(\u0026contents);"},{"line_number":46,"context_line":"    let errors \u003d parsed.errors();"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"b59d2e98_bca7c418","line":43,"in_reply_to":"c2095138_7f35efa1","updated":"2024-03-29 15:15:05.000000000","message":"Huh, interesting.","commit_id":"e791b3d4ae00766b6d1e5eb3da38248670aff670"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"292920844e5b5abcdc1097d5fa69762d83571996","unresolved":true,"context_lines":[{"line_number":38,"context_line":"        return Ok(cached);"},{"line_number":39,"context_line":"    }"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    let mut reader \u003d generators::request_open_file(\u0026co, path.clone()).await;"},{"line_number":42,"context_line":"    let mut contents \u003d String::new();"},{"line_number":43,"context_line":"    reader.read_to_string(\u0026mut contents)?;"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":10,"id":"2500e6b7_21d834d0","line":41,"updated":"2024-04-08 17:03:22.000000000","message":"same as above, why is this still a String","commit_id":"48a00cba3a8f0c0dec919a059138a79f2603a547"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"c8b5bc9ba4a6faa3c2d93677b86e9c9c709a5571","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        return Ok(cached);"},{"line_number":39,"context_line":"    }"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    let mut reader \u003d generators::request_open_file(\u0026co, path.clone()).await;"},{"line_number":42,"context_line":"    let mut contents \u003d String::new();"},{"line_number":43,"context_line":"    reader.read_to_string(\u0026mut contents)?;"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":10,"id":"4529d91a_43682846","line":41,"in_reply_to":"2500e6b7_21d834d0","updated":"2024-04-09 15:24:55.000000000","message":"Added comment, rnix only supports string sources","commit_id":"48a00cba3a8f0c0dec919a059138a79f2603a547"}],"tvix/eval/src/io.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"784bb431b8c5fda91970da3d1d1e9f17f25127f1","unresolved":true,"context_lines":[{"line_number":101,"context_line":"    }"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    fn open(\u0026self, path: \u0026Path) -\u003e io::Result\u003cBox\u003cdyn io::Read\u003e\u003e {"},{"line_number":104,"context_line":"        eprintln!(\"[std] open({:?})\", path);"},{"line_number":105,"context_line":"        Ok(Box::new(File::open(path)?))"},{"line_number":106,"context_line":"    }"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"f6858257_aa559d33","line":104,"updated":"2024-03-24 18:00:02.000000000","message":"should be removed","commit_id":"08e71941a849b088f39937bdf743fd40a06cf0f1"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"b236142e03e3f1fbc23bf30f054ff32581c9719a","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    }"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    fn open(\u0026self, path: \u0026Path) -\u003e io::Result\u003cBox\u003cdyn io::Read\u003e\u003e {"},{"line_number":104,"context_line":"        eprintln!(\"[std] open({:?})\", path);"},{"line_number":105,"context_line":"        Ok(Box::new(File::open(path)?))"},{"line_number":106,"context_line":"    }"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"f22db533_1b0ad53c","line":104,"in_reply_to":"f6858257_aa559d33","updated":"2024-03-26 16:04:24.000000000","message":"Done","commit_id":"08e71941a849b088f39937bdf743fd40a06cf0f1"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"cda4ab997257f26c97e582c0657768611a28a8e2","unresolved":true,"context_lines":[{"line_number":54,"context_line":"    /// This is used for the following language evaluation cases:"},{"line_number":55,"context_line":"    ///"},{"line_number":56,"context_line":"    /// * `builtins.readFile :: path -\u003e string`"},{"line_number":57,"context_line":"    /// * `builtins.import :: path -\u003e any`"},{"line_number":58,"context_line":"    fn open(\u0026self, path: \u0026Path) -\u003e io::Result\u003cBox\u003cdyn io::Read\u003e\u003e;"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    /// Read the directory at the specified path and return the names"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"a3b6d0bc_e6bb3193","line":57,"updated":"2024-03-26 16:17:08.000000000","message":"Hnmh, there\u0027s hashFile now too, maybe more. wonder if this list still makes sense.","commit_id":"e791b3d4ae00766b6d1e5eb3da38248670aff670"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"f8a79e40b7e653dbbea460bb965246c084f4568d","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    /// This is used for the following language evaluation cases:"},{"line_number":55,"context_line":"    ///"},{"line_number":56,"context_line":"    /// * `builtins.readFile :: path -\u003e string`"},{"line_number":57,"context_line":"    /// * `builtins.import :: path -\u003e any`"},{"line_number":58,"context_line":"    fn open(\u0026self, path: \u0026Path) -\u003e io::Result\u003cBox\u003cdyn io::Read\u003e\u003e;"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    /// Read the directory at the specified path and return the names"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"6eb9f5b2_e6b48c48","line":57,"in_reply_to":"a3b6d0bc_e6bb3193","updated":"2024-04-05 23:09:46.000000000","message":"Done","commit_id":"e791b3d4ae00766b6d1e5eb3da38248670aff670"}],"tvix/eval/src/vm/generators.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"e8f03da6e28458964696ee166b1f9c4d725d8eed","unresolved":true,"context_lines":[{"line_number":201,"context_line":"    /// VM response with a span to use at the current point."},{"line_number":202,"context_line":"    Span(LightSpan),"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    /// Reader produced by the VM in response to some IO operation."},{"line_number":205,"context_line":"    Reader(Box\u003cdyn io::Read\u003e),"},{"line_number":206,"context_line":"}"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"ef20d841_63e5a42b","line":204,"updated":"2024-03-24 08:30:09.000000000","message":"/// `std::io::Read` produced …","commit_id":"08e71941a849b088f39937bdf743fd40a06cf0f1"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"b236142e03e3f1fbc23bf30f054ff32581c9719a","unresolved":false,"context_lines":[{"line_number":201,"context_line":"    /// VM response with a span to use at the current point."},{"line_number":202,"context_line":"    Span(LightSpan),"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    /// Reader produced by the VM in response to some IO operation."},{"line_number":205,"context_line":"    Reader(Box\u003cdyn io::Read\u003e),"},{"line_number":206,"context_line":"}"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"13047539_d27369b6","line":204,"in_reply_to":"ef20d841_63e5a42b","updated":"2024-03-26 16:04:24.000000000","message":"Done","commit_id":"08e71941a849b088f39937bdf743fd40a06cf0f1"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"4a9a049b287d23ad757f2bc22055734ff87603c1","unresolved":true,"context_lines":[{"line_number":102,"context_line":"    /// Request that the VM imports the given path through its I/O interface."},{"line_number":103,"context_line":"    PathImport(PathBuf),"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    /// Request that the VM opens the speicified file and provides a reader."},{"line_number":106,"context_line":"    OpenFile(PathBuf),"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    /// Request that the VM checks whether the given path exists."}],"source_content_type":"text/x-rustsrc","patch_set":7,"id":"8233134c_34e94566","line":105,"updated":"2024-03-31 12:44:26.000000000","message":"specified","commit_id":"5385b396f2f2a565007433ab9437523f140ecc4e"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"f8a79e40b7e653dbbea460bb965246c084f4568d","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    /// Request that the VM imports the given path through its I/O interface."},{"line_number":103,"context_line":"    PathImport(PathBuf),"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    /// Request that the VM opens the speicified file and provides a reader."},{"line_number":106,"context_line":"    OpenFile(PathBuf),"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    /// Request that the VM checks whether the given path exists."}],"source_content_type":"text/x-rustsrc","patch_set":7,"id":"af09a340_64d1d1f5","line":105,"in_reply_to":"8233134c_34e94566","updated":"2024-04-05 23:09:46.000000000","message":"Done","commit_id":"5385b396f2f2a565007433ab9437523f140ecc4e"}],"tvix/glue/src/tvix_store_io.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"e8f03da6e28458964696ee166b1f9c4d725d8eed","unresolved":true,"context_lines":[{"line_number":471,"context_line":""},{"line_number":472,"context_line":"    #[instrument(skip(self), err)]"},{"line_number":473,"context_line":"    fn open(\u0026self, path: \u0026Path) -\u003e io::Result\u003cBox\u003cdyn io::Read\u003e\u003e {"},{"line_number":474,"context_line":"        eprintln!(\"[tvix] open({:?})\", path);"},{"line_number":475,"context_line":"        if let Ok((store_path, sub_path)) \u003d"},{"line_number":476,"context_line":"            StorePath::from_absolute_path_full(\u0026path.to_string_lossy())"},{"line_number":477,"context_line":"        {"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"7958c30d_86716530","line":474,"updated":"2024-03-24 08:30:09.000000000","message":"stray debug leftover","commit_id":"08e71941a849b088f39937bdf743fd40a06cf0f1"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"b236142e03e3f1fbc23bf30f054ff32581c9719a","unresolved":false,"context_lines":[{"line_number":471,"context_line":""},{"line_number":472,"context_line":"    #[instrument(skip(self), err)]"},{"line_number":473,"context_line":"    fn open(\u0026self, path: \u0026Path) -\u003e io::Result\u003cBox\u003cdyn io::Read\u003e\u003e {"},{"line_number":474,"context_line":"        eprintln!(\"[tvix] open({:?})\", path);"},{"line_number":475,"context_line":"        if let Ok((store_path, sub_path)) \u003d"},{"line_number":476,"context_line":"            StorePath::from_absolute_path_full(\u0026path.to_string_lossy())"},{"line_number":477,"context_line":"        {"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"67c108d9_f323faa1","line":474,"in_reply_to":"7958c30d_86716530","updated":"2024-03-26 16:04:24.000000000","message":"Done","commit_id":"08e71941a849b088f39937bdf743fd40a06cf0f1"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"e8f03da6e28458964696ee166b1f9c4d725d8eed","unresolved":true,"context_lines":[{"line_number":501,"context_line":"                        self.tokio_handle.block_on(async {"},{"line_number":502,"context_line":"                            let resp \u003d self.blob_service.as_ref().open_read(\u0026digest).await?;"},{"line_number":503,"context_line":"                            match resp {"},{"line_number":504,"context_line":"                                Some(blob_reader) \u003d\u003e {"},{"line_number":505,"context_line":"                                    Ok(Box::new(SyncIoBridge::new(blob_reader))"},{"line_number":506,"context_line":"                                        as Box\u003cdyn io::Read\u003e)"},{"line_number":507,"context_line":"                                }"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"2c11ee06_e2d9b9d1","line":504,"updated":"2024-03-24 08:30:09.000000000","message":"maybe add a comment that the VMResponse wants a sync reader here","commit_id":"08e71941a849b088f39937bdf743fd40a06cf0f1"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"b236142e03e3f1fbc23bf30f054ff32581c9719a","unresolved":false,"context_lines":[{"line_number":501,"context_line":"                        self.tokio_handle.block_on(async {"},{"line_number":502,"context_line":"                            let resp \u003d self.blob_service.as_ref().open_read(\u0026digest).await?;"},{"line_number":503,"context_line":"                            match resp {"},{"line_number":504,"context_line":"                                Some(blob_reader) \u003d\u003e {"},{"line_number":505,"context_line":"                                    Ok(Box::new(SyncIoBridge::new(blob_reader))"},{"line_number":506,"context_line":"                                        as Box\u003cdyn io::Read\u003e)"},{"line_number":507,"context_line":"                                }"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"21a8000d_97e5ec34","line":504,"in_reply_to":"2c11ee06_e2d9b9d1","updated":"2024-03-26 16:04:24.000000000","message":"Done","commit_id":"08e71941a849b088f39937bdf743fd40a06cf0f1"}],"tvix/nix-compat/src/nixhash/algos.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"25654568fc4fcc2dc5012c557b91b550131dae73","unresolved":true,"context_lines":[{"line_number":28,"context_line":"            HashAlgo::Md5 \u003d\u003e 16,"},{"line_number":29,"context_line":"        }"},{"line_number":30,"context_line":"    }"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    pub fn hash_bytes\u003cR: std::io::Read\u003e(\u0026self, reader: R) -\u003e std::io::Result\u003cNixHash\u003e {"},{"line_number":33,"context_line":"        Ok(match self {"},{"line_number":34,"context_line":"            HashAlgo::Md5 \u003d\u003e NixHash::Md5(hash::\u003cMd5\u003e(reader)?.into()),"}],"source_content_type":"text/x-rustsrc","patch_set":9,"id":"ea9ee939_a6f21b84","line":31,"updated":"2024-04-05 23:35:08.000000000","message":"Hmmh, I was thinking more about a helper function returning some Box\u003cdyn Digest\u003e for a given HashAlgo, rather than a method I pass in a reader. But let\u0027s move this out of this CL.","commit_id":"270fca31f0803a38b177c7be9f246c1791c79286"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"3ff941e5bc1260161555814112ba7587a7f05d29","unresolved":false,"context_lines":[{"line_number":28,"context_line":"            HashAlgo::Md5 \u003d\u003e 16,"},{"line_number":29,"context_line":"        }"},{"line_number":30,"context_line":"    }"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    pub fn hash_bytes\u003cR: std::io::Read\u003e(\u0026self, reader: R) -\u003e std::io::Result\u003cNixHash\u003e {"},{"line_number":33,"context_line":"        Ok(match self {"},{"line_number":34,"context_line":"            HashAlgo::Md5 \u003d\u003e NixHash::Md5(hash::\u003cMd5\u003e(reader)?.into()),"}],"source_content_type":"text/x-rustsrc","patch_set":9,"id":"1940dac7_e2189b5e","line":31,"in_reply_to":"ea9ee939_a6f21b84","updated":"2024-04-08 15:47:38.000000000","message":"I\u0027m not sure this will work because Box\u003cdyn Digest\u003e has an associated constant for `OutputSize` which is different depending on the algo. Going to revert the nix-compat changes anyways since they aren\u0027t actually used anymore since we don\u0027t want to bring nix-compat into `eval`","commit_id":"270fca31f0803a38b177c7be9f246c1791c79286"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"25654568fc4fcc2dc5012c557b91b550131dae73","unresolved":true,"context_lines":[{"line_number":94,"context_line":"    }"},{"line_number":95,"context_line":"}"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"impl TryFrom\u003c\u0026[u8]\u003e for HashAlgo {"},{"line_number":98,"context_line":"    type Error \u003d Error;"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    fn try_from(algo: \u0026[u8]) -\u003e Result\u003cSelf, Self::Error\u003e {"}],"source_content_type":"text/x-rustsrc","patch_set":9,"id":"0279778a_4b30cb87","line":97,"updated":"2024-04-05 23:35:08.000000000","message":"This is probably independent from the hash / hash_bytes stuff introduced above, let\u0027s move that into a separate CL and get it in.","commit_id":"270fca31f0803a38b177c7be9f246c1791c79286"},{"author":{"_account_id":1000085,"name":"Connor Brewster","display_name":"cbrewster","email":"cbrewster@hey.com","username":"cbrewster"},"change_message_id":"3ff941e5bc1260161555814112ba7587a7f05d29","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    }"},{"line_number":95,"context_line":"}"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"impl TryFrom\u003c\u0026[u8]\u003e for HashAlgo {"},{"line_number":98,"context_line":"    type Error \u003d Error;"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    fn try_from(algo: \u0026[u8]) -\u003e Result\u003cSelf, Self::Error\u003e {"}],"source_content_type":"text/x-rustsrc","patch_set":9,"id":"6f0b3ee6_bd3831b6","line":97,"in_reply_to":"0279778a_4b30cb87","updated":"2024-04-08 15:47:38.000000000","message":"Done","commit_id":"270fca31f0803a38b177c7be9f246c1791c79286"}]}
