)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"5248ca4d979c4874e3735031ccb5bc2654261622","unresolved":true,"context_lines":[{"line_number":7,"context_line":"refactor(tvix/nix-compat/nixhash): validate digest lengths"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There was a NixHash::new() before, which didn\u0027t perform any validation"},{"line_number":10,"context_line":"of the digest lenght. We had some length validation when parsing nix"},{"line_number":11,"context_line":"hashes or SRI hashes, but some places didn\u0027t perform validation and/or"},{"line_number":12,"context_line":"constructed the struct directly."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"209adaed_4531a0d4","line":10,"updated":"2023-08-20 22:12:59.000000000","message":"typo: lenght → length","commit_id":"34c881999f86ca967ac787d5ddaa0afd0f9754a8"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"7bd2caac7fb416b2ecafff08d35b8bafbc1a5b19","unresolved":false,"context_lines":[{"line_number":7,"context_line":"refactor(tvix/nix-compat/nixhash): validate digest lengths"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"There was a NixHash::new() before, which didn\u0027t perform any validation"},{"line_number":10,"context_line":"of the digest lenght. We had some length validation when parsing nix"},{"line_number":11,"context_line":"hashes or SRI hashes, but some places didn\u0027t perform validation and/or"},{"line_number":12,"context_line":"constructed the struct directly."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"8d912037_5d6c0482","line":10,"in_reply_to":"209adaed_4531a0d4","updated":"2023-08-20 22:19:14.000000000","message":"Done","commit_id":"34c881999f86ca967ac787d5ddaa0afd0f9754a8"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"5248ca4d979c4874e3735031ccb5bc2654261622","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"fd08b54e_f5ca0f38","updated":"2023-08-20 22:12:59.000000000","message":"I wonder if we should not make the constructor of `NixHash`, `pub(crate)`, but heh.","commit_id":"34c881999f86ca967ac787d5ddaa0afd0f9754a8"}],"tvix/nix-compat/src/nixhash/mod.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"1f9d9de34d6b51b786c5c3e7ff84298e7408db51","unresolved":true,"context_lines":[{"line_number":21,"context_line":"    /// Constructs a new [NixHash] by specifying [HashAlgo] and digest."},{"line_number":22,"context_line":"    /// It can return an error if the passed digest doesn\u0027t match what\u0027s"},{"line_number":23,"context_line":"    // expected for the passed algo."},{"line_number":24,"context_line":"    pub fn from_algo_and_digest(algo: HashAlgo, digest: Vec\u003cu8\u003e) -\u003e Result\u003cSelf, Error\u003e {"},{"line_number":25,"context_line":"        if digest.len() !\u003d hash_algo_length(\u0026algo) {"},{"line_number":26,"context_line":"            return Err(Error::InvalidEncodedDigestLength(digest.len(), algo));"},{"line_number":27,"context_line":"        }"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"40ed0754_88e5c6ac","line":24,"updated":"2023-08-20 11:49:13.000000000","message":"This should probably also be a module-level function, rather than part of the impl, like all the other from_* functions in here.","commit_id":"c45399c37af9dda70c64a0c98bb78da6e1130649"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"0e92689c428aa79521219a035e1034f80687acdf","unresolved":true,"context_lines":[{"line_number":21,"context_line":"    /// Constructs a new [NixHash] by specifying [HashAlgo] and digest."},{"line_number":22,"context_line":"    /// It can return an error if the passed digest doesn\u0027t match what\u0027s"},{"line_number":23,"context_line":"    // expected for the passed algo."},{"line_number":24,"context_line":"    pub fn from_algo_and_digest(algo: HashAlgo, digest: Vec\u003cu8\u003e) -\u003e Result\u003cSelf, Error\u003e {"},{"line_number":25,"context_line":"        if digest.len() !\u003d hash_algo_length(\u0026algo) {"},{"line_number":26,"context_line":"            return Err(Error::InvalidEncodedDigestLength(digest.len(), algo));"},{"line_number":27,"context_line":"        }"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"47ebd652_fa6c2bfa","line":24,"in_reply_to":"156fa3bd_87a91253","updated":"2023-08-20 18:28:46.000000000","message":"Ack","commit_id":"c45399c37af9dda70c64a0c98bb78da6e1130649"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"8d91ad77e681d49e28977895b54481cdaf17ee82","unresolved":true,"context_lines":[{"line_number":21,"context_line":"    /// Constructs a new [NixHash] by specifying [HashAlgo] and digest."},{"line_number":22,"context_line":"    /// It can return an error if the passed digest doesn\u0027t match what\u0027s"},{"line_number":23,"context_line":"    // expected for the passed algo."},{"line_number":24,"context_line":"    pub fn from_algo_and_digest(algo: HashAlgo, digest: Vec\u003cu8\u003e) -\u003e Result\u003cSelf, Error\u003e {"},{"line_number":25,"context_line":"        if digest.len() !\u003d hash_algo_length(\u0026algo) {"},{"line_number":26,"context_line":"            return Err(Error::InvalidEncodedDigestLength(digest.len(), algo));"},{"line_number":27,"context_line":"        }"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"156fa3bd_87a91253","line":24,"in_reply_to":"40ed0754_88e5c6ac","updated":"2023-08-20 18:02:52.000000000","message":"OK, I will go further: this should be `impl TryFrom\u003c(HashAlgo, Vec\u003cu8\u003e)\u003e for NixHash` should be the right thing to do and we don\u0027t need any \"public function\" IMHO.","commit_id":"c45399c37af9dda70c64a0c98bb78da6e1130649"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"876a918411a2c44f9b88aa7b2185978c463a5069","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    /// Constructs a new [NixHash] by specifying [HashAlgo] and digest."},{"line_number":22,"context_line":"    /// It can return an error if the passed digest doesn\u0027t match what\u0027s"},{"line_number":23,"context_line":"    // expected for the passed algo."},{"line_number":24,"context_line":"    pub fn from_algo_and_digest(algo: HashAlgo, digest: Vec\u003cu8\u003e) -\u003e Result\u003cSelf, Error\u003e {"},{"line_number":25,"context_line":"        if digest.len() !\u003d hash_algo_length(\u0026algo) {"},{"line_number":26,"context_line":"            return Err(Error::InvalidEncodedDigestLength(digest.len(), algo));"},{"line_number":27,"context_line":"        }"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"45b73c6e_9fc555a2","line":24,"in_reply_to":"47ebd652_fa6c2bfa","updated":"2023-08-20 21:19:11.000000000","message":"Done","commit_id":"c45399c37af9dda70c64a0c98bb78da6e1130649"}],"tvix/nix-compat/src/nixhash/with_mode.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"b2a30fc3b4fada19940f8e9c7fd3eac30123853b","unresolved":true,"context_lines":[{"line_number":116,"context_line":"                            digest,"},{"line_number":117,"context_line":"                        )"},{"line_number":118,"context_line":"                        .map_err(|e| {"},{"line_number":119,"context_line":"                            serde::de::Error::custom(format!(\"unable to construct nixhash: {}\", e))"},{"line_number":120,"context_line":"                        })?,"},{"line_number":121,"context_line":"                    ))),"},{"line_number":122,"context_line":"                    None \u003d\u003e Ok(Some(Self::Flat("}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"9e7f7462_4a421755","line":119,"updated":"2023-08-19 23:05:33.000000000","message":"Please use invalid value, this has better semantics.","commit_id":"6b5498a88f3c5b65a7dea30409dd70f36e085cff"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"876a918411a2c44f9b88aa7b2185978c463a5069","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                            digest,"},{"line_number":117,"context_line":"                        )"},{"line_number":118,"context_line":"                        .map_err(|e| {"},{"line_number":119,"context_line":"                            serde::de::Error::custom(format!(\"unable to construct nixhash: {}\", e))"},{"line_number":120,"context_line":"                        })?,"},{"line_number":121,"context_line":"                    ))),"},{"line_number":122,"context_line":"                    None \u003d\u003e Ok(Some(Self::Flat("}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"17d79413_02943485","line":119,"in_reply_to":"9e7f7462_4a421755","updated":"2023-08-20 21:19:11.000000000","message":"Done","commit_id":"6b5498a88f3c5b65a7dea30409dd70f36e085cff"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"b2a30fc3b4fada19940f8e9c7fd3eac30123853b","unresolved":true,"context_lines":[{"line_number":130,"context_line":"                            digest,"},{"line_number":131,"context_line":"                        )"},{"line_number":132,"context_line":"                        .map_err(|e| {"},{"line_number":133,"context_line":"                            serde::de::Error::custom(format!(\"unable to construct nixhash: {}\", e))"},{"line_number":134,"context_line":"                        })?,"},{"line_number":135,"context_line":"                    ))),"},{"line_number":136,"context_line":"                }"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"13c3d62f_cffd0dda","line":133,"updated":"2023-08-19 23:05:33.000000000","message":"See above, same.","commit_id":"6b5498a88f3c5b65a7dea30409dd70f36e085cff"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"876a918411a2c44f9b88aa7b2185978c463a5069","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                            digest,"},{"line_number":131,"context_line":"                        )"},{"line_number":132,"context_line":"                        .map_err(|e| {"},{"line_number":133,"context_line":"                            serde::de::Error::custom(format!(\"unable to construct nixhash: {}\", e))"},{"line_number":134,"context_line":"                        })?,"},{"line_number":135,"context_line":"                    ))),"},{"line_number":136,"context_line":"                }"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"4957c891_ef654b74","line":133,"in_reply_to":"13c3d62f_cffd0dda","updated":"2023-08-20 21:19:11.000000000","message":"Done","commit_id":"6b5498a88f3c5b65a7dea30409dd70f36e085cff"}],"tvix/store/src/store_io.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"b2a30fc3b4fada19940f8e9c7fd3eac30123853b","unresolved":true,"context_lines":[{"line_number":115,"context_line":"        .expect(\"error during nar calculation\"); // TODO: handle error"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        // For given NAR sha256 digest and name, return the new [StorePath] this would have."},{"line_number":118,"context_line":"        // We populate the struct directoy, as the digest size is known at"},{"line_number":119,"context_line":"        // compile time and correct."},{"line_number":120,"context_line":"        let nar_hash_with_mode \u003d NixHashWithMode::Recursive(NixHash {"},{"line_number":121,"context_line":"            algo: HashAlgo::Sha256,"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"83941722_708cd92e","line":118,"updated":"2023-08-19 23:05:33.000000000","message":"directly","commit_id":"6b5498a88f3c5b65a7dea30409dd70f36e085cff"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"43c9576e2e3d2fd4518e1dfc77026329166af02d","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        .expect(\"error during nar calculation\"); // TODO: handle error"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        // For given NAR sha256 digest and name, return the new [StorePath] this would have."},{"line_number":118,"context_line":"        // We populate the struct directoy, as the digest size is known at"},{"line_number":119,"context_line":"        // compile time and correct."},{"line_number":120,"context_line":"        let nar_hash_with_mode \u003d NixHashWithMode::Recursive(NixHash {"},{"line_number":121,"context_line":"            algo: HashAlgo::Sha256,"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"8b9b9160_0907ed00","line":118,"in_reply_to":"83941722_708cd92e","updated":"2023-08-20 21:19:23.000000000","message":"Done","commit_id":"6b5498a88f3c5b65a7dea30409dd70f36e085cff"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"b2a30fc3b4fada19940f8e9c7fd3eac30123853b","unresolved":true,"context_lines":[{"line_number":176,"context_line":"/// For given NAR sha256 digest and name, return the new [StorePath] this would have."},{"line_number":177,"context_line":"#[instrument(skip(nar_sha256_digest), ret, fields(nar_sha256_digest\u003dBASE64.encode(nar_sha256_digest)))]"},{"line_number":178,"context_line":"fn calculate_nar_based_store_path(nar_sha256_digest: \u0026[u8; 32], name: \u0026str) -\u003e StorePath {"},{"line_number":179,"context_line":"    // We populate the struct directoy, as the digest size is known at"},{"line_number":180,"context_line":"    // compile time and correct."},{"line_number":181,"context_line":"    let nar_hash_with_mode \u003d NixHashWithMode::Recursive(NixHash {"},{"line_number":182,"context_line":"        algo: HashAlgo::Sha256,"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"3948fd4f_092a2db7","line":179,"updated":"2023-08-19 23:05:33.000000000","message":"directly","commit_id":"6b5498a88f3c5b65a7dea30409dd70f36e085cff"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"43c9576e2e3d2fd4518e1dfc77026329166af02d","unresolved":false,"context_lines":[{"line_number":176,"context_line":"/// For given NAR sha256 digest and name, return the new [StorePath] this would have."},{"line_number":177,"context_line":"#[instrument(skip(nar_sha256_digest), ret, fields(nar_sha256_digest\u003dBASE64.encode(nar_sha256_digest)))]"},{"line_number":178,"context_line":"fn calculate_nar_based_store_path(nar_sha256_digest: \u0026[u8; 32], name: \u0026str) -\u003e StorePath {"},{"line_number":179,"context_line":"    // We populate the struct directoy, as the digest size is known at"},{"line_number":180,"context_line":"    // compile time and correct."},{"line_number":181,"context_line":"    let nar_hash_with_mode \u003d NixHashWithMode::Recursive(NixHash {"},{"line_number":182,"context_line":"        algo: HashAlgo::Sha256,"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"b0e1e838_757db6ed","line":179,"in_reply_to":"3948fd4f_092a2db7","updated":"2023-08-20 21:19:23.000000000","message":"Done","commit_id":"6b5498a88f3c5b65a7dea30409dd70f36e085cff"}]}
