)]}'
{"tvix/glue/src/builtins/fetchers.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"ca65f8ea836a516ce1b1008b32f7f03d494c2503","unresolved":true,"context_lines":[{"line_number":189,"context_line":"        .get(\u0026args.url)"},{"line_number":190,"context_line":"        .send()"},{"line_number":191,"context_line":"        .expect(\"TODO error types\");"},{"line_number":192,"context_line":"    let data \u003d resp.bytes().expect(\"TODO error types\");"},{"line_number":193,"context_line":"    state"},{"line_number":194,"context_line":"        .import_bytes_to_file(args.store_path()?.expect(\"TODO\"), data, args.ca_hash())"},{"line_number":195,"context_line":"        .await?;"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"599e33ea_bc187ac5","line":192,"updated":"2024-02-20 08:30:42.000000000","message":"See comment on import_bytes_to_file - I don\u0027t think we should block and receive everything here, but instead do the streaming later.","commit_id":"06b5c0e6e47948be9ea1dfebb293a6ee214a999a"}],"tvix/glue/src/builtins/utils.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"ca65f8ea836a516ce1b1008b32f7f03d494c2503","unresolved":true,"context_lines":[{"line_number":4,"context_line":"    CatchableErrorKind, CoercionKind, ErrorKind, NixAttrs, NixString, Value,"},{"line_number":5,"context_line":"};"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"pub(super) async fn strong_importing_coerce_to_string("},{"line_number":8,"context_line":"    co: \u0026GenCo,"},{"line_number":9,"context_line":"    val: Value,"},{"line_number":10,"context_line":") -\u003e Result\u003cNixString, CatchableErrorKind\u003e {"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"1d4bf67a_bc1108e5","line":7,"updated":"2024-02-20 08:30:42.000000000","message":"Can this be a separate CL?","commit_id":"06b5c0e6e47948be9ea1dfebb293a6ee214a999a"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"9d847b3608ba880fa585d5bd5a60f953c523986e","unresolved":true,"context_lines":[{"line_number":4,"context_line":"    CatchableErrorKind, CoercionKind, ErrorKind, NixAttrs, NixString, Value,"},{"line_number":5,"context_line":"};"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"pub(super) async fn strong_importing_coerce_to_string("},{"line_number":8,"context_line":"    co: \u0026GenCo,"},{"line_number":9,"context_line":"    val: Value,"},{"line_number":10,"context_line":") -\u003e Result\u003cNixString, CatchableErrorKind\u003e {"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"4f944058_e02fb886","line":7,"in_reply_to":"1d4bf67a_bc1108e5","updated":"2024-02-21 21:04:05.000000000","message":"it\u0027s a WIP","commit_id":"06b5c0e6e47948be9ea1dfebb293a6ee214a999a"}],"tvix/glue/src/tvix_store_io.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"ca65f8ea836a516ce1b1008b32f7f03d494c2503","unresolved":true,"context_lines":[{"line_number":77,"context_line":"        }"},{"line_number":78,"context_line":"    }"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    pub fn http(\u0026self) -\u003e \u0026reqwest::blocking::Client {"},{"line_number":81,"context_line":"        \u0026self.http_client"},{"line_number":82,"context_line":"    }"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"aca25a8e_5fc9a16c","line":80,"updated":"2024-02-20 08:30:42.000000000","message":"All async functions in TvixStoreIO actually use tokio async, and sync functions are not expected to take significant amounts of time. The non-blocking version in reqwest is probably more suitable.","commit_id":"06b5c0e6e47948be9ea1dfebb293a6ee214a999a"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e81a35ffed0d7d151a87f4bbb1d5d3086de26bd7","unresolved":true,"context_lines":[{"line_number":77,"context_line":"        }"},{"line_number":78,"context_line":"    }"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    pub fn http(\u0026self) -\u003e \u0026reqwest::blocking::Client {"},{"line_number":81,"context_line":"        \u0026self.http_client"},{"line_number":82,"context_line":"    }"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"8c82981c_e6305835","line":80,"in_reply_to":"1547e1ef_9e4fd71d","updated":"2024-02-21 20:52:39.000000000","message":"```\ntvix-repl\u003e builtins.readFile (builtins.fetchurl {url \u003d \"http://example.com/test\"; sha256 \u003d \"1nf895jf7dbrxarvdp3q6hj9p7jgyx8m43snac6rnn7vcmyar3zc\";})\nthread \u0027main\u0027 panicked at /home/grfn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.28/src/client/connect/dns.rs:121:24:\nthere is no reactor running, must be called from the context of a Tokio 1.x runtime\nnote: run with `RUST_BACKTRACE\u003d1` environment variable to display a backtrace\n```","commit_id":"06b5c0e6e47948be9ea1dfebb293a6ee214a999a"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"5f5c3242dd7a6f3a39e9d10a182b2f8bffac9cb9","unresolved":true,"context_lines":[{"line_number":77,"context_line":"        }"},{"line_number":78,"context_line":"    }"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    pub fn http(\u0026self) -\u003e \u0026reqwest::blocking::Client {"},{"line_number":81,"context_line":"        \u0026self.http_client"},{"line_number":82,"context_line":"    }"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"1547e1ef_9e4fd71d","line":80,"in_reply_to":"aca25a8e_5fc9a16c","updated":"2024-02-21 20:49:56.000000000","message":"using reqwest async fails:","commit_id":"06b5c0e6e47948be9ea1dfebb293a6ee214a999a"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"2ba7dcb39354f21c6800ce8b20b714d07c740838","unresolved":true,"context_lines":[{"line_number":289,"context_line":"            .block_on(async { self.store_path_to_node(store_path, sub_path).await })"},{"line_number":290,"context_line":"    }"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    pub async fn store_path_exists(\u0026self, store_path: StorePathRef\u003c\u0027_\u003e) -\u003e io::Result\u003cbool\u003e {"},{"line_number":293,"context_line":"        Ok(self"},{"line_number":294,"context_line":"            .path_info_service"},{"line_number":295,"context_line":"            .as_ref()"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"65bdc49e_8f6b0134","line":292,"updated":"2024-02-20 14:37:30.000000000","message":"what about using `store_path_to_node(...)?.is_some()` on the call site?","commit_id":"06b5c0e6e47948be9ea1dfebb293a6ee214a999a"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"ca65f8ea836a516ce1b1008b32f7f03d494c2503","unresolved":true,"context_lines":[{"line_number":301,"context_line":"    pub async fn import_bytes_to_file("},{"line_number":302,"context_line":"        \u0026self,"},{"line_number":303,"context_line":"        path: StorePathRef\u003c\u0027_\u003e,"},{"line_number":304,"context_line":"        data: Bytes,"},{"line_number":305,"context_line":"        hash: Option\u003cCAHash\u003e,"},{"line_number":306,"context_line":"    ) -\u003e io::Result\u003c()\u003e {"},{"line_number":307,"context_line":"        let mut blob \u003d self.blob_service.open_write().await;"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"dd66f33f_71a5a47d","line":304,"updated":"2024-02-20 08:30:42.000000000","message":"Having the Bytes here is pretty heavy on memory usage.\n\nCan you instead have it accept an impl AsyncRead, and use io::copy to copy from it?\n\nYou can massage the request body to that, see https://cs.tvl.fyi/depot@db26cb21322b59d6d205360fb8e654605dd5fdcb/-/blob/tvix/store/src/pathinfoservice/nix_http.rs?L173-178 for an example.","commit_id":"06b5c0e6e47948be9ea1dfebb293a6ee214a999a"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"5f5c3242dd7a6f3a39e9d10a182b2f8bffac9cb9","unresolved":true,"context_lines":[{"line_number":301,"context_line":"    pub async fn import_bytes_to_file("},{"line_number":302,"context_line":"        \u0026self,"},{"line_number":303,"context_line":"        path: StorePathRef\u003c\u0027_\u003e,"},{"line_number":304,"context_line":"        data: Bytes,"},{"line_number":305,"context_line":"        hash: Option\u003cCAHash\u003e,"},{"line_number":306,"context_line":"    ) -\u003e io::Result\u003c()\u003e {"},{"line_number":307,"context_line":"        let mut blob \u003d self.blob_service.open_write().await;"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"c2a4967f_5432b78e","line":304,"in_reply_to":"dd66f33f_71a5a47d","updated":"2024-02-21 20:49:56.000000000","message":"it\u0027s a WIP, lol","commit_id":"06b5c0e6e47948be9ea1dfebb293a6ee214a999a"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"ca65f8ea836a516ce1b1008b32f7f03d494c2503","unresolved":true,"context_lines":[{"line_number":315,"context_line":"            executable: false,"},{"line_number":316,"context_line":"        });"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"        let (nar_size, nar_sha256) \u003d self.path_info_service.calculate_nar(\u0026node).await?;"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        let path_info \u003d PathInfo {"},{"line_number":321,"context_line":"            node: Some(tvix_castore::proto::Node {"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"f56bb6e5_d6a21c30","line":318,"updated":"2024-02-20 08:30:42.000000000","message":"Please add a comment explaining we need to still calculate the NAR hash and size for the PathInfo only, even though this does a plain import.","commit_id":"06b5c0e6e47948be9ea1dfebb293a6ee214a999a"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"9d847b3608ba880fa585d5bd5a60f953c523986e","unresolved":true,"context_lines":[{"line_number":315,"context_line":"            executable: false,"},{"line_number":316,"context_line":"        });"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"        let (nar_size, nar_sha256) \u003d self.path_info_service.calculate_nar(\u0026node).await?;"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        let path_info \u003d PathInfo {"},{"line_number":321,"context_line":"            node: Some(tvix_castore::proto::Node {"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"c167430a_d6ecd979","line":318,"in_reply_to":"44283254_6666a1d8","updated":"2024-02-21 21:04:05.000000000","message":"\u003e With cl/10976 in, you can use node_to_path_info now (see https://cs.tvl.fyi/depot/-/blob/tvix/glue/src/tvix_store_io.rs).\n\nthat doesn\u0027t work, since the path doesn\u0027t exist","commit_id":"06b5c0e6e47948be9ea1dfebb293a6ee214a999a"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"2ba7dcb39354f21c6800ce8b20b714d07c740838","unresolved":true,"context_lines":[{"line_number":315,"context_line":"            executable: false,"},{"line_number":316,"context_line":"        });"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"        let (nar_size, nar_sha256) \u003d self.path_info_service.calculate_nar(\u0026node).await?;"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        let path_info \u003d PathInfo {"},{"line_number":321,"context_line":"            node: Some(tvix_castore::proto::Node {"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"44283254_6666a1d8","line":318,"in_reply_to":"f56bb6e5_d6a21c30","updated":"2024-02-20 14:37:30.000000000","message":"With cl/10976 in, you can use node_to_path_info now (see https://cs.tvl.fyi/depot/-/blob/tvix/glue/src/tvix_store_io.rs).","commit_id":"06b5c0e6e47948be9ea1dfebb293a6ee214a999a"}]}
