)]}'
{"snix/glue/src/fetchers/mod.rs":[{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"c500484251265d192fe83d6f973f1487730a110a","unresolved":true,"context_lines":[{"line_number":272,"context_line":"    async fn download("},{"line_number":273,"context_line":"        \u0026self,"},{"line_number":274,"context_line":"        url: Url,"},{"line_number":275,"context_line":"        hash: Option\u003c\u0026NixHash\u003e,"},{"line_number":276,"context_line":"    ) -\u003e Result\u003cBox\u003cdyn AsyncBufRead + Unpin + Send\u003e, FetcherError\u003e {"},{"line_number":277,"context_line":"        let span \u003d Span::current();"},{"line_number":278,"context_line":"        span.pb_set_message(\u0026format!("}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"fb5df781_c8fbdd3d","line":275,"updated":"2025-06-11 15:20:36.000000000","message":"This is a flat hash, or a hash of the literal contents. We should make this more explicit. I propose renaming it to exp_hash (similar to how we use exp_[nar_]sha256 elsewhere), and extend the docstring to clarify it\u0027s the hash of the literal file contents.","commit_id":"3474fdb97238aa42161708ef591035c52b3247fc"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"cc89899f273aecb2929367e0a20fc3a5188ae62b","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    async fn download("},{"line_number":273,"context_line":"        \u0026self,"},{"line_number":274,"context_line":"        url: Url,"},{"line_number":275,"context_line":"        hash: Option\u003c\u0026NixHash\u003e,"},{"line_number":276,"context_line":"    ) -\u003e Result\u003cBox\u003cdyn AsyncBufRead + Unpin + Send\u003e, FetcherError\u003e {"},{"line_number":277,"context_line":"        let span \u003d Span::current();"},{"line_number":278,"context_line":"        span.pb_set_message(\u0026format!("}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"d6f8b1dd_afb719cc","line":275,"in_reply_to":"fb5df781_c8fbdd3d","updated":"2025-06-11 17:12:54.000000000","message":"Done","commit_id":"3474fdb97238aa42161708ef591035c52b3247fc"},{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"c500484251265d192fe83d6f973f1487730a110a","unresolved":true,"context_lines":[{"line_number":387,"context_line":"            } \u003d\u003e {"},{"line_number":388,"context_line":"                // Construct a AsyncRead reading from the data as its downloaded."},{"line_number":389,"context_line":"                // Note: we don\u0027t pass in the hash into download as fetchTarball does not use hashed_mirrors in nix-cpp."},{"line_number":390,"context_line":"                // Likely explanation is that the tarball\u0027s hash is a recursive hash of its contents, not of the tarball"},{"line_number":391,"context_line":"                // itself."},{"line_number":392,"context_line":"                let r \u003d self.download(url.clone(), None).await?;"},{"line_number":393,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"b2cad43b_b996e7d8","line":390,"updated":"2025-06-11 15:20:36.000000000","message":"It\u0027s visible from the destructed args, exp_nar_sha256.\n\nSo I\u0027d rewrite this to:\n\nNOTE: For Fetch::Tarball, the expected NAR SHA256 is specified, so we cannot use the hashed_mirrors mechanism.","commit_id":"3474fdb97238aa42161708ef591035c52b3247fc"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"cc89899f273aecb2929367e0a20fc3a5188ae62b","unresolved":false,"context_lines":[{"line_number":387,"context_line":"            } \u003d\u003e {"},{"line_number":388,"context_line":"                // Construct a AsyncRead reading from the data as its downloaded."},{"line_number":389,"context_line":"                // Note: we don\u0027t pass in the hash into download as fetchTarball does not use hashed_mirrors in nix-cpp."},{"line_number":390,"context_line":"                // Likely explanation is that the tarball\u0027s hash is a recursive hash of its contents, not of the tarball"},{"line_number":391,"context_line":"                // itself."},{"line_number":392,"context_line":"                let r \u003d self.download(url.clone(), None).await?;"},{"line_number":393,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"cc2aaab0_860b6272","line":390,"in_reply_to":"b2cad43b_b996e7d8","updated":"2025-06-11 17:12:54.000000000","message":"Done","commit_id":"3474fdb97238aa42161708ef591035c52b3247fc"},{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"513b7551fcb536f08fbf2926c54b258fa653172a","unresolved":true,"context_lines":[{"line_number":214,"context_line":"                let f \u003d tokio::fs::File::open(url.to_file_path().map_err(|_| {"},{"line_number":215,"context_line":"                    // \"Returns Err if the host is neither empty nor \"localhost\""},{"line_number":216,"context_line":"                    // (except on Windows, where file: URLs may have a non-local host)\""},{"line_number":217,"context_line":"                    FetcherError::Io(std::io::Error::new("},{"line_number":218,"context_line":"                        std::io::ErrorKind::Other,"},{"line_number":219,"context_line":"                        \"invalid host for file:// scheme\","},{"line_number":220,"context_line":"                    ))"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"9268c499_e8cf49ce","line":217,"updated":"2025-06-29 18:34:49.000000000","message":"This should probably be a `Error::new(ErrorKind::InvalidData, \"invalid host for file:// scheme\")`","commit_id":"86c0d98bd584ece0a772390c68576d208d85ea90"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"e83739d0749b38f153548c344eb7f194f4368f1a","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                let f \u003d tokio::fs::File::open(url.to_file_path().map_err(|_| {"},{"line_number":215,"context_line":"                    // \"Returns Err if the host is neither empty nor \"localhost\""},{"line_number":216,"context_line":"                    // (except on Windows, where file: URLs may have a non-local host)\""},{"line_number":217,"context_line":"                    FetcherError::Io(std::io::Error::new("},{"line_number":218,"context_line":"                        std::io::ErrorKind::Other,"},{"line_number":219,"context_line":"                        \"invalid host for file:// scheme\","},{"line_number":220,"context_line":"                    ))"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"e45fa238_73b7ca08","line":217,"in_reply_to":"9268c499_e8cf49ce","updated":"2025-06-30 13:45:19.000000000","message":"Done","commit_id":"86c0d98bd584ece0a772390c68576d208d85ea90"},{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"513b7551fcb536f08fbf2926c54b258fa653172a","unresolved":true,"context_lines":[{"line_number":234,"context_line":"            _ \u003d\u003e {"},{"line_number":235,"context_line":"                let resp \u003d self.http_client.get(url).send().await?;"},{"line_number":236,"context_line":"                if !resp.status().is_success() {"},{"line_number":237,"context_line":"                    return Err(FetcherError::Io(std::io::Error::other(format!("},{"line_number":238,"context_line":"                        \"{}\","},{"line_number":239,"context_line":"                        resp.status()"},{"line_number":240,"context_line":"                    ))));"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"7b6f8b0d_cb863fdf","line":237,"updated":"2025-06-29 18:34:49.000000000","message":"Can we distinguish a bit more here? There\u0027s `ErrorKind::NotFound`, `ErrorKind::InvalidData` and `ErrorKind::PermissionDenied`, and we could probably include some info about this error existing due to a non-successful status code from the server.","commit_id":"86c0d98bd584ece0a772390c68576d208d85ea90"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"e83739d0749b38f153548c344eb7f194f4368f1a","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            _ \u003d\u003e {"},{"line_number":235,"context_line":"                let resp \u003d self.http_client.get(url).send().await?;"},{"line_number":236,"context_line":"                if !resp.status().is_success() {"},{"line_number":237,"context_line":"                    return Err(FetcherError::Io(std::io::Error::other(format!("},{"line_number":238,"context_line":"                        \"{}\","},{"line_number":239,"context_line":"                        resp.status()"},{"line_number":240,"context_line":"                    ))));"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"2adefc4e_fe46b490","line":237,"in_reply_to":"7b6f8b0d_cb863fdf","updated":"2025-06-30 13:45:19.000000000","message":"Updated error kinds and also made errors more like nix, i.e. \"unable to download \u0027url\u0027: 404 Not Found\"","commit_id":"86c0d98bd584ece0a772390c68576d208d85ea90"},{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"513b7551fcb536f08fbf2926c54b258fa653172a","unresolved":true,"context_lines":[{"line_number":288,"context_line":"                    hash.algo(),"},{"line_number":289,"context_line":"                    HEXLOWER.encode(hash.digest_as_bytes())"},{"line_number":290,"context_line":"                ))"},{"line_number":291,"context_line":"                .expect(\"Snix bug!\")"},{"line_number":292,"context_line":"            });"},{"line_number":293,"context_line":"            for url in urls {"},{"line_number":294,"context_line":"                if let Ok(result) \u003d self.do_download(url).await {"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"8cbba59f_a3755a97","line":291,"updated":"2025-06-29 18:34:49.000000000","message":"Is this always a Snix bug? Which Url can be in that list where joining fails?\n\nIf joining fails, shouldn\u0027t we log a `warn!` and skip that one instead of panicking?","commit_id":"86c0d98bd584ece0a772390c68576d208d85ea90"},{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"1f72b1e2f6f62f53248f7d09495112009c0f36d5","unresolved":false,"context_lines":[{"line_number":288,"context_line":"                    hash.algo(),"},{"line_number":289,"context_line":"                    HEXLOWER.encode(hash.digest_as_bytes())"},{"line_number":290,"context_line":"                ))"},{"line_number":291,"context_line":"                .expect(\"Snix bug!\")"},{"line_number":292,"context_line":"            });"},{"line_number":293,"context_line":"            for url in urls {"},{"line_number":294,"context_line":"                if let Ok(result) \u003d self.do_download(url).await {"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"9d530e7e_18837589","line":291,"in_reply_to":"5b51d5dd_3c364c16","updated":"2025-06-30 13:50:19.000000000","message":"Ok","commit_id":"86c0d98bd584ece0a772390c68576d208d85ea90"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"e83739d0749b38f153548c344eb7f194f4368f1a","unresolved":true,"context_lines":[{"line_number":288,"context_line":"                    hash.algo(),"},{"line_number":289,"context_line":"                    HEXLOWER.encode(hash.digest_as_bytes())"},{"line_number":290,"context_line":"                ))"},{"line_number":291,"context_line":"                .expect(\"Snix bug!\")"},{"line_number":292,"context_line":"            });"},{"line_number":293,"context_line":"            for url in urls {"},{"line_number":294,"context_line":"                if let Ok(result) \u003d self.do_download(url).await {"}],"source_content_type":"text/x-rustsrc","patch_set":4,"id":"5b51d5dd_3c364c16","line":291,"in_reply_to":"8cbba59f_a3755a97","updated":"2025-06-30 13:45:19.000000000","message":"notice that we already have a list of \"valid\" urls coming from clap, so those cannot contribute to the failure.\n\nAccording to join docs, the only reason this can fail is if our path like \"sha256/AAA\" cannot parse, which is not possible, hence the expect().","commit_id":"86c0d98bd584ece0a772390c68576d208d85ea90"}]}
