)]}'
{"tvix/glue/src/builtins/fetchers.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"ebd4f03573ecd9308dcdcfe7adac9761b4e084bf","unresolved":true,"context_lines":[{"line_number":19,"context_line":"async fn extract_fetch_args("},{"line_number":20,"context_line":"    co: \u0026GenCo,"},{"line_number":21,"context_line":"    args: Value,"},{"line_number":22,"context_line":") -\u003e Result\u003cResult\u003c(String, Option\u003cString\u003e, Option\u003c[u8; 32]\u003e), CatchableErrorKind\u003e, ErrorKind\u003e {"},{"line_number":23,"context_line":"    if let Ok(url) \u003d args.to_str() {"},{"line_number":24,"context_line":"        // Get the raw bytes, not the ToString repr."},{"line_number":25,"context_line":"        let url_string \u003d String::from_utf8(url.as_bytes().to_vec()).map_err(|_| ErrorKind::Utf8)?;"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"7bf383fc_be979a8f","line":22,"updated":"2024-04-22 20:57:17.000000000","message":"semi-nit: given the ambient complexity, please add a type alias here","commit_id":"549ec3758e72adf73ec8632fc5a5fb8c3879635e"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"c4a45fc11b1129ae3e6ee8be670e5119c58fc059","unresolved":true,"context_lines":[{"line_number":19,"context_line":"async fn extract_fetch_args("},{"line_number":20,"context_line":"    co: \u0026GenCo,"},{"line_number":21,"context_line":"    args: Value,"},{"line_number":22,"context_line":") -\u003e Result\u003cResult\u003c(String, Option\u003cString\u003e, Option\u003c[u8; 32]\u003e), CatchableErrorKind\u003e, ErrorKind\u003e {"},{"line_number":23,"context_line":"    if let Ok(url) \u003d args.to_str() {"},{"line_number":24,"context_line":"        // Get the raw bytes, not the ToString repr."},{"line_number":25,"context_line":"        let url_string \u003d String::from_utf8(url.as_bytes().to_vec()).map_err(|_| ErrorKind::Utf8)?;"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"d82d6382_38155dd6","line":22,"in_reply_to":"7bf383fc_be979a8f","updated":"2024-04-23 12:20:11.000000000","message":"I even made it a struct, so we can name these arguments. PTAL.","commit_id":"549ec3758e72adf73ec8632fc5a5fb8c3879635e"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"f343bfd6288042775331ab7346a5dd25dfc4446a","unresolved":false,"context_lines":[{"line_number":19,"context_line":"async fn extract_fetch_args("},{"line_number":20,"context_line":"    co: \u0026GenCo,"},{"line_number":21,"context_line":"    args: Value,"},{"line_number":22,"context_line":") -\u003e Result\u003cResult\u003c(String, Option\u003cString\u003e, Option\u003c[u8; 32]\u003e), CatchableErrorKind\u003e, ErrorKind\u003e {"},{"line_number":23,"context_line":"    if let Ok(url) \u003d args.to_str() {"},{"line_number":24,"context_line":"        // Get the raw bytes, not the ToString repr."},{"line_number":25,"context_line":"        let url_string \u003d String::from_utf8(url.as_bytes().to_vec()).map_err(|_| ErrorKind::Utf8)?;"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"dd9ab75f_cbc44c68","line":22,"in_reply_to":"d82d6382_38155dd6","updated":"2024-04-23 12:30:30.000000000","message":"Acknowledged","commit_id":"549ec3758e72adf73ec8632fc5a5fb8c3879635e"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"ebd4f03573ecd9308dcdcfe7adac9761b4e084bf","unresolved":true,"context_lines":[{"line_number":27,"context_line":"    }"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    let attrs \u003d args.to_attrs().map_err(|_| ErrorKind::TypeError {"},{"line_number":30,"context_line":"        expected: \"attribute set or string\","},{"line_number":31,"context_line":"        actual: args.type_of(),"},{"line_number":32,"context_line":"    })?;"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"08f17e61_609ae3f5","line":30,"updated":"2024-04-22 20:57:17.000000000","message":"contextless string, not contextful ones","commit_id":"549ec3758e72adf73ec8632fc5a5fb8c3879635e"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"506787088ce29d507a74691dfabd1bf26ab70264","unresolved":true,"context_lines":[{"line_number":27,"context_line":"    }"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    let attrs \u003d args.to_attrs().map_err(|_| ErrorKind::TypeError {"},{"line_number":30,"context_line":"        expected: \"attribute set or string\","},{"line_number":31,"context_line":"        actual: args.type_of(),"},{"line_number":32,"context_line":"    })?;"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"9e748795_f459d597","line":30,"in_reply_to":"08f17e61_609ae3f5","updated":"2024-04-22 21:00:23.000000000","message":"I don\u0027t understand. Can you clarify / propose a change?","commit_id":"549ec3758e72adf73ec8632fc5a5fb8c3879635e"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"4b6df5f0e545a65953036536fd67e34a775312f7","unresolved":true,"context_lines":[{"line_number":27,"context_line":"    }"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    let attrs \u003d args.to_attrs().map_err(|_| ErrorKind::TypeError {"},{"line_number":30,"context_line":"        expected: \"attribute set or string\","},{"line_number":31,"context_line":"        actual: args.type_of(),"},{"line_number":32,"context_line":"    })?;"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"bc1ccaa7_51d582bb","line":30,"in_reply_to":"9e748795_f459d597","updated":"2024-04-22 21:14:01.000000000","message":"`attribute set or contextless string`","commit_id":"549ec3758e72adf73ec8632fc5a5fb8c3879635e"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"c4a45fc11b1129ae3e6ee8be670e5119c58fc059","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    }"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    let attrs \u003d args.to_attrs().map_err(|_| ErrorKind::TypeError {"},{"line_number":30,"context_line":"        expected: \"attribute set or string\","},{"line_number":31,"context_line":"        actual: args.type_of(),"},{"line_number":32,"context_line":"    })?;"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"84d75436_139ae3de","line":30,"in_reply_to":"bc1ccaa7_51d582bb","updated":"2024-04-23 12:20:11.000000000","message":"Done","commit_id":"549ec3758e72adf73ec8632fc5a5fb8c3879635e"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"ebd4f03573ecd9308dcdcfe7adac9761b4e084bf","unresolved":true,"context_lines":[{"line_number":130,"context_line":"        };"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        // Name defaults to \"source\" if not set explicitly."},{"line_number":133,"context_line":"        let name \u003d name.unwrap_or_else(|| \"source\".to_owned());"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        fetch_lazy(state, name, Fetch::Tarball(url, exp_sha256))"},{"line_number":136,"context_line":"    }"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"9ec655ef_81981cf8","line":133,"updated":"2024-04-22 20:57:17.000000000","message":"extract this to a constant","commit_id":"549ec3758e72adf73ec8632fc5a5fb8c3879635e"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"c4a45fc11b1129ae3e6ee8be670e5119c58fc059","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        };"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        // Name defaults to \"source\" if not set explicitly."},{"line_number":133,"context_line":"        let name \u003d name.unwrap_or_else(|| \"source\".to_owned());"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        fetch_lazy(state, name, Fetch::Tarball(url, exp_sha256))"},{"line_number":136,"context_line":"    }"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"fafdb749_62e8bd21","line":133,"in_reply_to":"9ec655ef_81981cf8","updated":"2024-04-23 12:20:11.000000000","message":"A bit silly as it\u0027s really local to there, but done.","commit_id":"549ec3758e72adf73ec8632fc5a5fb8c3879635e"}],"tvix/glue/src/fetchers.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"ebd4f03573ecd9308dcdcfe7adac9761b4e084bf","unresolved":true,"context_lines":[{"line_number":117,"context_line":"                let (blob_size, actual_nixhash) \u003d match exp_nixhash {"},{"line_number":118,"context_line":"                    None \u003d\u003e {"},{"line_number":119,"context_line":"                        let mut hash \u003d Sha256::new();"},{"line_number":120,"context_line":"                        let blob_size \u003d tokio::io::copy("},{"line_number":121,"context_line":"                            \u0026mut InspectReader::new(\u0026mut r, |d| hash.write_all(d).unwrap()),"},{"line_number":122,"context_line":"                            \u0026mut blob_writer,"},{"line_number":123,"context_line":"                        )"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"7c918e71_8e7c6c44","line":120,"updated":"2024-04-22 20:57:17.000000000","message":"all this is repeated and i don\u0027t see a fundamental reason for why\nyou could have a generic helper in the hash and promote it into a NixHash automatically","commit_id":"549ec3758e72adf73ec8632fc5a5fb8c3879635e"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"e65bb9a4a7675d3422e57dd37ccec9d40ba1f956","unresolved":true,"context_lines":[{"line_number":117,"context_line":"                let (blob_size, actual_nixhash) \u003d match exp_nixhash {"},{"line_number":118,"context_line":"                    None \u003d\u003e {"},{"line_number":119,"context_line":"                        let mut hash \u003d Sha256::new();"},{"line_number":120,"context_line":"                        let blob_size \u003d tokio::io::copy("},{"line_number":121,"context_line":"                            \u0026mut InspectReader::new(\u0026mut r, |d| hash.write_all(d).unwrap()),"},{"line_number":122,"context_line":"                            \u0026mut blob_writer,"},{"line_number":123,"context_line":"                        )"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"ec72d12c_10ae055b","line":120,"in_reply_to":"677b1dac_c1a3613b","updated":"2024-04-22 21:02:47.000000000","message":"ah, the function doesn\u0027t need to return [u8; Digest::output_size()] anymore it can return NixHash now. This should work, yes.","commit_id":"549ec3758e72adf73ec8632fc5a5fb8c3879635e"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"a49f591e32041e0046df7c178240ce85321087b2","unresolved":true,"context_lines":[{"line_number":117,"context_line":"                let (blob_size, actual_nixhash) \u003d match exp_nixhash {"},{"line_number":118,"context_line":"                    None \u003d\u003e {"},{"line_number":119,"context_line":"                        let mut hash \u003d Sha256::new();"},{"line_number":120,"context_line":"                        let blob_size \u003d tokio::io::copy("},{"line_number":121,"context_line":"                            \u0026mut InspectReader::new(\u0026mut r, |d| hash.write_all(d).unwrap()),"},{"line_number":122,"context_line":"                            \u0026mut blob_writer,"},{"line_number":123,"context_line":"                        )"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"677b1dac_c1a3613b","line":120,"in_reply_to":"7c918e71_8e7c6c44","updated":"2024-04-22 20:59:15.000000000","message":"I wasn\u0027t able to access Digest::Size in a generic function signature over all possible digests.\n\nI\u0027d be more than happy to be proven wrong ;-)","commit_id":"549ec3758e72adf73ec8632fc5a5fb8c3879635e"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"c4a45fc11b1129ae3e6ee8be670e5119c58fc059","unresolved":true,"context_lines":[{"line_number":117,"context_line":"                let (blob_size, actual_nixhash) \u003d match exp_nixhash {"},{"line_number":118,"context_line":"                    None \u003d\u003e {"},{"line_number":119,"context_line":"                        let mut hash \u003d Sha256::new();"},{"line_number":120,"context_line":"                        let blob_size \u003d tokio::io::copy("},{"line_number":121,"context_line":"                            \u0026mut InspectReader::new(\u0026mut r, |d| hash.write_all(d).unwrap()),"},{"line_number":122,"context_line":"                            \u0026mut blob_writer,"},{"line_number":123,"context_line":"                        )"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"ec93f286_42535edd","line":120,"in_reply_to":"ec72d12c_10ae055b","updated":"2024-04-23 12:20:11.000000000","message":"I added a private `hash` function to this file, and changed this match to be over the `NixHash::algo` from the `exp_nixhash`. PTAL.","commit_id":"549ec3758e72adf73ec8632fc5a5fb8c3879635e"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"f343bfd6288042775331ab7346a5dd25dfc4446a","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                let (blob_size, actual_nixhash) \u003d match exp_nixhash {"},{"line_number":118,"context_line":"                    None \u003d\u003e {"},{"line_number":119,"context_line":"                        let mut hash \u003d Sha256::new();"},{"line_number":120,"context_line":"                        let blob_size \u003d tokio::io::copy("},{"line_number":121,"context_line":"                            \u0026mut InspectReader::new(\u0026mut r, |d| hash.write_all(d).unwrap()),"},{"line_number":122,"context_line":"                            \u0026mut blob_writer,"},{"line_number":123,"context_line":"                        )"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"2f00f25c_0bc885ad","line":120,"in_reply_to":"ec93f286_42535edd","updated":"2024-04-23 12:30:30.000000000","message":"That\u0027s much better IMHO, I doubt we can do better.","commit_id":"549ec3758e72adf73ec8632fc5a5fb8c3879635e"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"ebd4f03573ecd9308dcdcfe7adac9761b4e084bf","unresolved":true,"context_lines":[{"line_number":246,"context_line":"    pub async fn fetch_and_persist\u003c\u0027a\u003e("},{"line_number":247,"context_line":"        \u0026self,"},{"line_number":248,"context_line":"        name: \u0026\u0027a str,"},{"line_number":249,"context_line":"        fetch: Fetch,"},{"line_number":250,"context_line":"    ) -\u003e Result\u003c(StorePathRef\u003c\u0027a\u003e, Node), FetcherError\u003e {"},{"line_number":251,"context_line":"        // Fetch file, return the (unnamed) (File)Node of its contents, ca hash and filesize."},{"line_number":252,"context_line":"        let (mut node, ca_hash, size) \u003d self.fetch(fetch).await?;"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"4cde91f1_0e39eb39","line":249,"updated":"2024-04-22 20:57:17.000000000","message":"I think it should be renamed to a better suited name, `self.fetch(fetch)` is really weird","commit_id":"549ec3758e72adf73ec8632fc5a5fb8c3879635e"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"c4a45fc11b1129ae3e6ee8be670e5119c58fc059","unresolved":false,"context_lines":[{"line_number":246,"context_line":"    pub async fn fetch_and_persist\u003c\u0027a\u003e("},{"line_number":247,"context_line":"        \u0026self,"},{"line_number":248,"context_line":"        name: \u0026\u0027a str,"},{"line_number":249,"context_line":"        fetch: Fetch,"},{"line_number":250,"context_line":"    ) -\u003e Result\u003c(StorePathRef\u003c\u0027a\u003e, Node), FetcherError\u003e {"},{"line_number":251,"context_line":"        // Fetch file, return the (unnamed) (File)Node of its contents, ca hash and filesize."},{"line_number":252,"context_line":"        let (mut node, ca_hash, size) \u003d self.fetch(fetch).await?;"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"c1b3ba9f_6ec34dad","line":249,"in_reply_to":"4cde91f1_0e39eb39","updated":"2024-04-23 12:20:11.000000000","message":"I renamed `fetch` to `ingest`, and `fetch_and_persist` to `ingest_and_persist`.\n\n`ingest` is similar to the naming scheme in `tvix-castore`, and `ingest` is only dealing with the castore parts, while `ingest_and_persist` does also deal with the `PathInfoService` bits. I think that\u0027s as good as it can get for now.\n\nOnce we can come up with an even  better naming scheme we can revisit this.","commit_id":"549ec3758e72adf73ec8632fc5a5fb8c3879635e"}]}
