)]}'
{"tvix/Cargo.nix":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"32afed7484657b65fec9259af07147a70d05d518","unresolved":true,"context_lines":[{"line_number":14061,"context_line":"        ];"},{"line_number":14062,"context_line":""},{"line_number":14063,"context_line":"      };"},{"line_number":14064,"context_line":"      \"tvix-shell\" \u003d rec {"},{"line_number":14065,"context_line":"        crateName \u003d \"tvix-shell\";"},{"line_number":14066,"context_line":"        version \u003d \"0.1.0\";"},{"line_number":14067,"context_line":"        edition \u003d \"2021\";"}],"source_content_type":"text/x-nix","patch_set":2,"id":"bd752601_516e6661","line":14064,"updated":"2024-06-17 05:14:32.000000000","message":"Unrelated","commit_id":"e49fa1d6093e03c499ce7d03e633d470187e04c0"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"fdef7e60bfed7b42b989db2fda0869b44e5fbecc","unresolved":false,"context_lines":[{"line_number":14061,"context_line":"        ];"},{"line_number":14062,"context_line":""},{"line_number":14063,"context_line":"      };"},{"line_number":14064,"context_line":"      \"tvix-shell\" \u003d rec {"},{"line_number":14065,"context_line":"        crateName \u003d \"tvix-shell\";"},{"line_number":14066,"context_line":"        version \u003d \"0.1.0\";"},{"line_number":14067,"context_line":"        edition \u003d \"2021\";"}],"source_content_type":"text/x-nix","patch_set":2,"id":"45d4a600_644665d6","line":14064,"in_reply_to":"bd752601_516e6661","updated":"2024-06-17 07:18:03.000000000","message":"Done","commit_id":"e49fa1d6093e03c499ce7d03e633d470187e04c0"}],"tvix/castore/src/blobservice/combinator.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"2b08f118f07a7eada3f418f01c623853bc83ba73","unresolved":true,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"use super::{naive_seeker::NaiveSeeker, BlobReader, BlobService, BlobWriter};"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"#[derive(serde::Deserialize, Debug, Clone)]"},{"line_number":15,"context_line":"#[serde(deny_unknown_fields)]"},{"line_number":16,"context_line":"pub struct CombinedBlobServiceConfig {"},{"line_number":17,"context_line":"    local: String,"}],"source_content_type":"text/x-rustsrc","patch_set":25,"id":"6ed75637_32310f8e","line":14,"updated":"2024-07-12 14:33:15.000000000","message":"Please move this below the definition of `CombinedBlobService` itself.\n\nThis also applies to the other implementations","commit_id":"ab13775b524857e0635ab2ebea00faabce802542"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"172d3d59f1c6fd0b8a55798b54c60331438e8fe8","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"use super::{naive_seeker::NaiveSeeker, BlobReader, BlobService, BlobWriter};"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"#[derive(serde::Deserialize, Debug, Clone)]"},{"line_number":15,"context_line":"#[serde(deny_unknown_fields)]"},{"line_number":16,"context_line":"pub struct CombinedBlobServiceConfig {"},{"line_number":17,"context_line":"    local: String,"}],"source_content_type":"text/x-rustsrc","patch_set":25,"id":"809bd0a7_48601822","line":14,"in_reply_to":"6ed75637_32310f8e","updated":"2024-07-12 21:07:56.000000000","message":"Done","commit_id":"ab13775b524857e0635ab2ebea00faabce802542"}],"tvix/castore/src/blobservice/mod.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"2b08f118f07a7eada3f418f01c623853bc83ba73","unresolved":true,"context_lines":[{"line_number":105,"context_line":"impl BlobReader for io::Cursor\u003cbytes::Bytes\u003e {}"},{"line_number":106,"context_line":"impl BlobReader for tokio::fs::File {}"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"pub fn add_default_services(reg: \u0026mut Registry) {"},{"line_number":109,"context_line":"    reg.register::\u003cBox\u003cdyn ServiceBuilder\u003cOutput \u003d Arc\u003cdyn BlobService\u003e\u003e\u003e, super::blobservice::ObjectStoreBlobServiceConfig\u003e(\"objectstore\");"},{"line_number":110,"context_line":"    reg.register::\u003cBox\u003cdyn ServiceBuilder\u003cOutput \u003d Arc\u003cdyn BlobService\u003e\u003e\u003e, super::blobservice::MemoryBlobServiceConfig\u003e(\"memory\");"},{"line_number":111,"context_line":"    reg.register::\u003cBox\u003cdyn ServiceBuilder\u003cOutput \u003d Arc\u003cdyn BlobService\u003e\u003e\u003e, super::blobservice::CombinedBlobServiceConfig\u003e(\"combined\");"}],"source_content_type":"text/x-rustsrc","patch_set":25,"id":"7eb60c0f_d7c2442f","line":108,"updated":"2024-07-12 14:33:15.000000000","message":"docstring","commit_id":"ab13775b524857e0635ab2ebea00faabce802542"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"172d3d59f1c6fd0b8a55798b54c60331438e8fe8","unresolved":false,"context_lines":[{"line_number":105,"context_line":"impl BlobReader for io::Cursor\u003cbytes::Bytes\u003e {}"},{"line_number":106,"context_line":"impl BlobReader for tokio::fs::File {}"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"pub fn add_default_services(reg: \u0026mut Registry) {"},{"line_number":109,"context_line":"    reg.register::\u003cBox\u003cdyn ServiceBuilder\u003cOutput \u003d Arc\u003cdyn BlobService\u003e\u003e\u003e, super::blobservice::ObjectStoreBlobServiceConfig\u003e(\"objectstore\");"},{"line_number":110,"context_line":"    reg.register::\u003cBox\u003cdyn ServiceBuilder\u003cOutput \u003d Arc\u003cdyn BlobService\u003e\u003e\u003e, super::blobservice::MemoryBlobServiceConfig\u003e(\"memory\");"},{"line_number":111,"context_line":"    reg.register::\u003cBox\u003cdyn ServiceBuilder\u003cOutput \u003d Arc\u003cdyn BlobService\u003e\u003e\u003e, super::blobservice::CombinedBlobServiceConfig\u003e(\"combined\");"}],"source_content_type":"text/x-rustsrc","patch_set":25,"id":"25254277_04f83bc4","line":108,"in_reply_to":"7eb60c0f_d7c2442f","updated":"2024-07-12 21:07:56.000000000","message":"Done","commit_id":"ab13775b524857e0635ab2ebea00faabce802542"}],"tvix/castore/src/composition.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"763a96cd2191959ce4c171c95916a5498b26fa2a","unresolved":true,"context_lines":[{"line_number":1,"context_line":"use crate::blobservice::BlobService;"},{"line_number":2,"context_line":"use crate::directoryservice::DirectoryService;"},{"line_number":3,"context_line":"use erased_serde::deserialize;"},{"line_number":4,"context_line":"use lazy_static::lazy_static;"}],"source_content_type":"text/x-rustsrc","patch_set":6,"id":"f097364d_c83bad40","line":1,"updated":"2024-06-17 07:27:28.000000000","message":"This needs a file-level docstring explaining the API and how do use it, maybe even a doctest of an example usage. I\u0027m happy to help draft this together, but I feel like only per-function docstrings are gonna make the overall idea too hard to grasp.","commit_id":"ef54fb743954253562ad74e6d5a1c5fcafae2892"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"15b4995bb7b44d83272b28d2e2db3181eaa8e746","unresolved":true,"context_lines":[{"line_number":1,"context_line":"use crate::blobservice::BlobService;"},{"line_number":2,"context_line":"use crate::directoryservice::DirectoryService;"},{"line_number":3,"context_line":"use erased_serde::deserialize;"},{"line_number":4,"context_line":"use lazy_static::lazy_static;"}],"source_content_type":"text/x-rustsrc","patch_set":6,"id":"ff274a71_e63d96b9","line":1,"in_reply_to":"f097364d_c83bad40","updated":"2024-07-12 11:40:55.000000000","message":"added module-level docstring with examples","commit_id":"ef54fb743954253562ad74e6d5a1c5fcafae2892"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"2b08f118f07a7eada3f418f01c623853bc83ba73","unresolved":false,"context_lines":[{"line_number":1,"context_line":"use crate::blobservice::BlobService;"},{"line_number":2,"context_line":"use crate::directoryservice::DirectoryService;"},{"line_number":3,"context_line":"use erased_serde::deserialize;"},{"line_number":4,"context_line":"use lazy_static::lazy_static;"}],"source_content_type":"text/x-rustsrc","patch_set":6,"id":"cb90c481_e273f78d","line":1,"in_reply_to":"ff274a71_e63d96b9","updated":"2024-07-12 14:33:15.000000000","message":"Acknowledged","commit_id":"ef54fb743954253562ad74e6d5a1c5fcafae2892"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"763a96cd2191959ce4c171c95916a5498b26fa2a","unresolved":true,"context_lines":[{"line_number":24,"context_line":"pub struct Registry\u003cT: ?Sized\u003e(BTreeMap\u003c\u0026\u0027static str, BoxFnSeed\u003cBox\u003cT\u003e\u003e\u003e);"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"impl\u003cT: ?Sized\u003e Registry\u003cT\u003e {"},{"line_number":27,"context_line":"    #[allow(private_bounds)]"},{"line_number":28,"context_line":"    pub fn register\u003cC: DeserializeOwned, S: IntoDynBox\u003cT\u003e\u003e("},{"line_number":29,"context_line":"        \u0026mut self,"},{"line_number":30,"context_line":"        name: \u0026\u0027static str,"}],"source_content_type":"text/x-rustsrc","patch_set":6,"id":"faf12a22_2b06643d","line":27,"updated":"2024-06-17 07:27:28.000000000","message":"can we still call register from the outside to add our own implementation to the registry?","commit_id":"ef54fb743954253562ad74e6d5a1c5fcafae2892"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"2b08f118f07a7eada3f418f01c623853bc83ba73","unresolved":false,"context_lines":[{"line_number":24,"context_line":"pub struct Registry\u003cT: ?Sized\u003e(BTreeMap\u003c\u0026\u0027static str, BoxFnSeed\u003cBox\u003cT\u003e\u003e\u003e);"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"impl\u003cT: ?Sized\u003e Registry\u003cT\u003e {"},{"line_number":27,"context_line":"    #[allow(private_bounds)]"},{"line_number":28,"context_line":"    pub fn register\u003cC: DeserializeOwned, S: IntoDynBox\u003cT\u003e\u003e("},{"line_number":29,"context_line":"        \u0026mut self,"},{"line_number":30,"context_line":"        name: \u0026\u0027static str,"}],"source_content_type":"text/x-rustsrc","patch_set":6,"id":"3f19f48e_ddec3175","line":27,"in_reply_to":"0427a94a_cf36a3f2","updated":"2024-07-12 14:33:15.000000000","message":"Ok","commit_id":"ef54fb743954253562ad74e6d5a1c5fcafae2892"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"a9057276b0795b3d0501e304f04ce945cdc9e908","unresolved":true,"context_lines":[{"line_number":24,"context_line":"pub struct Registry\u003cT: ?Sized\u003e(BTreeMap\u003c\u0026\u0027static str, BoxFnSeed\u003cBox\u003cT\u003e\u003e\u003e);"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"impl\u003cT: ?Sized\u003e Registry\u003cT\u003e {"},{"line_number":27,"context_line":"    #[allow(private_bounds)]"},{"line_number":28,"context_line":"    pub fn register\u003cC: DeserializeOwned, S: IntoDynBox\u003cT\u003e\u003e("},{"line_number":29,"context_line":"        \u0026mut self,"},{"line_number":30,"context_line":"        name: \u0026\u0027static str,"}],"source_content_type":"text/x-rustsrc","patch_set":6,"id":"ff305613_267a7ce7","line":27,"in_reply_to":"aace62f8_3123df81","updated":"2024-06-21 15:02:25.000000000","message":"I realized there\u0027s still Mutex in the code sample, ignore these :-)","commit_id":"ef54fb743954253562ad74e6d5a1c5fcafae2892"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"9004cef466bf457743aecc92db42a3b0dac4880a","unresolved":true,"context_lines":[{"line_number":24,"context_line":"pub struct Registry\u003cT: ?Sized\u003e(BTreeMap\u003c\u0026\u0027static str, BoxFnSeed\u003cBox\u003cT\u003e\u003e\u003e);"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"impl\u003cT: ?Sized\u003e Registry\u003cT\u003e {"},{"line_number":27,"context_line":"    #[allow(private_bounds)]"},{"line_number":28,"context_line":"    pub fn register\u003cC: DeserializeOwned, S: IntoDynBox\u003cT\u003e\u003e("},{"line_number":29,"context_line":"        \u0026mut self,"},{"line_number":30,"context_line":"        name: \u0026\u0027static str,"}],"source_content_type":"text/x-rustsrc","patch_set":6,"id":"aace62f8_3123df81","line":27,"in_reply_to":"c8e58ed8_2725d391","updated":"2024-06-20 18:41:46.000000000","message":"I played around with this a bit, it seems I\u0027m not able to invoke `reg.register()` from \"regular code\" at runtime.\n\nI was however able to instantiate my own different registry using my own `lazy_static` block of course. Which I think should be fine, if we build another binary knowing about other stores, it should be fine to require knowing about these at lazy_static time.\n\nIf this is intentional / as expected, maybe we don\u0027t need a to control mutability, but just an `Arc`? And maybe move the \"register the common services\" into a function each taking a specific `\u0026mut Registry\u003cdyn …\u003e`, like this:\n\n```rust\nlazy_static! {\n    pub static ref BLOB_REG: Mutex\u003cRegistry\u003cdyn BlobService\u003e\u003e \u003d {\n        let mut reg \u003d Registry(Default::default());\n        add_default_blobservices(\u0026mut reg);\n        Mutex::new(reg)\n    };\n    pub static ref DIRECTORY_REG: Mutex\u003cRegistry\u003cdyn DirectoryService\u003e\u003e \u003d {\n        let mut reg \u003d Registry(Default::default());\n        add_default_directoryservices(\u0026mut reg);\n        Mutex::new(reg)\n    };\n}\n\nimpl\u003c\u0027de\u003e serde::Deserialize\u003c\u0027de\u003e for Box\u003cdyn BlobService\u003e {\n    fn deserialize\u003cD\u003e(de: D) -\u003e std::result::Result\u003cSelf, D::Error\u003e\n    where\n        D: serde::Deserializer\u003c\u0027de\u003e,\n    {\n        serde_tagged::de::internal::deserialize(de, \"type\", \u0026BLOB_REG.lock().unwrap().0)\n    }\n}\n\nimpl\u003c\u0027de\u003e serde::Deserialize\u003c\u0027de\u003e for Box\u003cdyn DirectoryService\u003e {\n    fn deserialize\u003cD\u003e(de: D) -\u003e std::result::Result\u003cSelf, D::Error\u003e\n    where\n        D: serde::Deserializer\u003c\u0027de\u003e,\n    {\n        serde_tagged::de::internal::deserialize(de, \"type\", \u0026DIRECTORY_REG.lock().unwrap().0)\n    }\n}\n```\n\nThat would make registry instantiation that also picks the \"default ones\" easier.","commit_id":"ef54fb743954253562ad74e6d5a1c5fcafae2892"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"52f322315eabe3ba87697744b020d9f65dbba5be","unresolved":true,"context_lines":[{"line_number":24,"context_line":"pub struct Registry\u003cT: ?Sized\u003e(BTreeMap\u003c\u0026\u0027static str, BoxFnSeed\u003cBox\u003cT\u003e\u003e\u003e);"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"impl\u003cT: ?Sized\u003e Registry\u003cT\u003e {"},{"line_number":27,"context_line":"    #[allow(private_bounds)]"},{"line_number":28,"context_line":"    pub fn register\u003cC: DeserializeOwned, S: IntoDynBox\u003cT\u003e\u003e("},{"line_number":29,"context_line":"        \u0026mut self,"},{"line_number":30,"context_line":"        name: \u0026\u0027static str,"}],"source_content_type":"text/x-rustsrc","patch_set":6,"id":"c8e58ed8_2725d391","line":27,"in_reply_to":"faf12a22_2b06643d","updated":"2024-06-18 16:45:52.000000000","message":"yes, sure. the API is public and so are the global registries BLOB_REG and DIRECTORY_REG. The limitations are the usual Rust ABI stability quirks, so dynamically loaded modules would need some special consideration.","commit_id":"ef54fb743954253562ad74e6d5a1c5fcafae2892"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"15b4995bb7b44d83272b28d2e2db3181eaa8e746","unresolved":true,"context_lines":[{"line_number":24,"context_line":"pub struct Registry\u003cT: ?Sized\u003e(BTreeMap\u003c\u0026\u0027static str, BoxFnSeed\u003cBox\u003cT\u003e\u003e\u003e);"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"impl\u003cT: ?Sized\u003e Registry\u003cT\u003e {"},{"line_number":27,"context_line":"    #[allow(private_bounds)]"},{"line_number":28,"context_line":"    pub fn register\u003cC: DeserializeOwned, S: IntoDynBox\u003cT\u003e\u003e("},{"line_number":29,"context_line":"        \u0026mut self,"},{"line_number":30,"context_line":"        name: \u0026\u0027static str,"}],"source_content_type":"text/x-rustsrc","patch_set":6,"id":"0427a94a_cf36a3f2","line":27,"in_reply_to":"ff305613_267a7ce7","updated":"2024-07-12 11:40:55.000000000","message":"This comment should be obsolete?","commit_id":"ef54fb743954253562ad74e6d5a1c5fcafae2892"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"8b9d2ddccdaf637aa195e1508c2d474b04048efd","unresolved":true,"context_lines":[{"line_number":16,"context_line":"/// `type` tag of an internally tagged enum on the serde side to a Config struct which is"},{"line_number":17,"context_line":"/// deserialized and then returned as a `Box\u003cdyn ServiceBuilder\u003cOutput \u003d Arc\u003cdyn BlobService\u003e\u003e\u003e`"},{"line_number":18,"context_line":"/// (the same for DirectoryService instead of BlobService etc)."},{"line_number":19,"context_line":"//"},{"line_number":20,"context_line":"// Implementation details:"},{"line_number":21,"context_line":"// This is really ugly. Really we would want to store this as a generic static field:"},{"line_number":22,"context_line":"//"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"158277bb_9367cacc","line":19,"updated":"2024-07-12 10:56:02.000000000","message":"The lower part can probably also be a docstring.","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"588b7ac101aefdea61e9cd599dadbf518621dd67","unresolved":true,"context_lines":[{"line_number":16,"context_line":"/// `type` tag of an internally tagged enum on the serde side to a Config struct which is"},{"line_number":17,"context_line":"/// deserialized and then returned as a `Box\u003cdyn ServiceBuilder\u003cOutput \u003d Arc\u003cdyn BlobService\u003e\u003e\u003e`"},{"line_number":18,"context_line":"/// (the same for DirectoryService instead of BlobService etc)."},{"line_number":19,"context_line":"//"},{"line_number":20,"context_line":"// Implementation details:"},{"line_number":21,"context_line":"// This is really ugly. Really we would want to store this as a generic static field:"},{"line_number":22,"context_line":"//"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"2289b63e_0e380957","line":19,"in_reply_to":"158277bb_9367cacc","updated":"2024-07-12 11:51:53.000000000","message":"I\u0027m not sure how, I wouldn\u0027t want to throw all this information at a user (even someone within tvix trying to use the composition module), so unless there\u0027s some way to have hidden docstrings I\u0027d rather keep it as a comment","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"2b08f118f07a7eada3f418f01c623853bc83ba73","unresolved":false,"context_lines":[{"line_number":16,"context_line":"/// `type` tag of an internally tagged enum on the serde side to a Config struct which is"},{"line_number":17,"context_line":"/// deserialized and then returned as a `Box\u003cdyn ServiceBuilder\u003cOutput \u003d Arc\u003cdyn BlobService\u003e\u003e\u003e`"},{"line_number":18,"context_line":"/// (the same for DirectoryService instead of BlobService etc)."},{"line_number":19,"context_line":"//"},{"line_number":20,"context_line":"// Implementation details:"},{"line_number":21,"context_line":"// This is really ugly. Really we would want to store this as a generic static field:"},{"line_number":22,"context_line":"//"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"efdf766f_4b52d3d9","line":19,"in_reply_to":"2289b63e_0e380957","updated":"2024-07-12 14:33:15.000000000","message":"Ok","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"8b9d2ddccdaf637aa195e1508c2d474b04048efd","unresolved":true,"context_lines":[{"line_number":64,"context_line":"pub struct DeserializeWithRegistry\u003cT\u003e(T);"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"impl Registry {"},{"line_number":67,"context_line":"    #[allow(private_bounds)]"},{"line_number":68,"context_line":"    pub fn register\u003cT: \u0027static, C: DeserializeOwned + Into\u003cT\u003e\u003e(\u0026mut self, type_name: \u0026\u0027static str) {"},{"line_number":69,"context_line":"        let seed \u003d BoxFnSeed::new(|x| {"},{"line_number":70,"context_line":"            deserialize::\u003cC\u003e(x)"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"1e812989_5b4c8c4b","line":67,"updated":"2024-07-12 10:56:02.000000000","message":"is it still possible to call this from the outside?","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"15b4995bb7b44d83272b28d2e2db3181eaa8e746","unresolved":false,"context_lines":[{"line_number":64,"context_line":"pub struct DeserializeWithRegistry\u003cT\u003e(T);"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"impl Registry {"},{"line_number":67,"context_line":"    #[allow(private_bounds)]"},{"line_number":68,"context_line":"    pub fn register\u003cT: \u0027static, C: DeserializeOwned + Into\u003cT\u003e\u003e(\u0026mut self, type_name: \u0026\u0027static str) {"},{"line_number":69,"context_line":"        let seed \u003d BoxFnSeed::new(|x| {"},{"line_number":70,"context_line":"            deserialize::\u003cC\u003e(x)"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"ab18f799_cbf21f63","line":67,"in_reply_to":"1e812989_5b4c8c4b","updated":"2024-07-12 11:40:55.000000000","message":"yes, the private_bounds is outdated and I removed it now","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"8b9d2ddccdaf637aa195e1508c2d474b04048efd","unresolved":true,"context_lines":[{"line_number":89,"context_line":"    }"},{"line_number":90,"context_line":"}"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"use std::cell::Cell;"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"pub fn with_registry\u003cR\u003e(reg: \u0026\u0027static Registry, f: impl Fn() -\u003e R) -\u003e R {"},{"line_number":95,"context_line":"    ACTIVE_REG.set(Some(reg));"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"05220122_4a3968bb","line":92,"updated":"2024-07-12 10:56:02.000000000","message":"move up","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"15b4995bb7b44d83272b28d2e2db3181eaa8e746","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    }"},{"line_number":90,"context_line":"}"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"use std::cell::Cell;"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"pub fn with_registry\u003cR\u003e(reg: \u0026\u0027static Registry, f: impl Fn() -\u003e R) -\u003e R {"},{"line_number":95,"context_line":"    ACTIVE_REG.set(Some(reg));"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"bfe39d29_7064b736","line":92,"in_reply_to":"05220122_4a3968bb","updated":"2024-07-12 11:40:55.000000000","message":"Done","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"8b9d2ddccdaf637aa195e1508c2d474b04048efd","unresolved":true,"context_lines":[{"line_number":143,"context_line":"}"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"#[derive(thiserror::Error, Clone, Debug)]"},{"line_number":146,"context_line":"pub enum CompositionError {"},{"line_number":147,"context_line":"    #[error(\"store not found\")]"},{"line_number":148,"context_line":"    NotFound,"},{"line_number":149,"context_line":"    #[error(\"recursion not allowed\")]"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"da84bf55_05d0f335","line":146,"updated":"2024-07-12 10:56:02.000000000","message":"is it possible to have the name of the store we tried to construct, at least in the Failed case?","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"2b08f118f07a7eada3f418f01c623853bc83ba73","unresolved":true,"context_lines":[{"line_number":143,"context_line":"}"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"#[derive(thiserror::Error, Clone, Debug)]"},{"line_number":146,"context_line":"pub enum CompositionError {"},{"line_number":147,"context_line":"    #[error(\"store not found\")]"},{"line_number":148,"context_line":"    NotFound,"},{"line_number":149,"context_line":"    #[error(\"recursion not allowed\")]"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"9dae907e_8345ca5e","line":146,"in_reply_to":"67783b30_a056eea0","updated":"2024-07-12 14:33:15.000000000","message":"Tracing alone can only be used to poop out log lines etc., but having the instance_name as a field here allows for better programmatic error reporting too.\n\nWe can deal with this in a followup CL though.","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"79620e6a4f2bbc6803d5ade62abfa23a42cd9330","unresolved":false,"context_lines":[{"line_number":143,"context_line":"}"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"#[derive(thiserror::Error, Clone, Debug)]"},{"line_number":146,"context_line":"pub enum CompositionError {"},{"line_number":147,"context_line":"    #[error(\"store not found\")]"},{"line_number":148,"context_line":"    NotFound,"},{"line_number":149,"context_line":"    #[error(\"recursion not allowed\")]"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"4cbd924d_302ca8a0","line":146,"in_reply_to":"9dae907e_8345ca5e","updated":"2024-07-12 21:38:08.000000000","message":"Done","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"15b4995bb7b44d83272b28d2e2db3181eaa8e746","unresolved":true,"context_lines":[{"line_number":143,"context_line":"}"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"#[derive(thiserror::Error, Clone, Debug)]"},{"line_number":146,"context_line":"pub enum CompositionError {"},{"line_number":147,"context_line":"    #[error(\"store not found\")]"},{"line_number":148,"context_line":"    NotFound,"},{"line_number":149,"context_line":"    #[error(\"recursion not allowed\")]"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"67783b30_a056eea0","line":146,"in_reply_to":"da84bf55_05d0f335","updated":"2024-07-12 11:40:55.000000000","message":"I would rather add instrumentation in more places and learn how to use the instrumentation. Interpreting errors without tracing is already a pain in other places, so I should just learn how to use tracing.","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"8b9d2ddccdaf637aa195e1508c2d474b04048efd","unresolved":true,"context_lines":[{"line_number":149,"context_line":"    #[error(\"recursion not allowed\")]"},{"line_number":150,"context_line":"    Recursion,"},{"line_number":151,"context_line":"    #[error(\"store construction panicked\")]"},{"line_number":152,"context_line":"    Poisoned,"},{"line_number":153,"context_line":"    #[error(\"service instantiation failed: {0}\")]"},{"line_number":154,"context_line":"    Failed(String),"},{"line_number":155,"context_line":"}"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"6bc79218_498806ba","line":152,"updated":"2024-07-12 10:56:02.000000000","message":"that\u0027s if it panics in another thread? can we also just panic instead?","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"172d3d59f1c6fd0b8a55798b54c60331438e8fe8","unresolved":true,"context_lines":[{"line_number":149,"context_line":"    #[error(\"recursion not allowed\")]"},{"line_number":150,"context_line":"    Recursion,"},{"line_number":151,"context_line":"    #[error(\"store construction panicked\")]"},{"line_number":152,"context_line":"    Poisoned,"},{"line_number":153,"context_line":"    #[error(\"service instantiation failed: {0}\")]"},{"line_number":154,"context_line":"    Failed(String),"},{"line_number":155,"context_line":"}"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"820589a7_aef0e04b","line":152,"in_reply_to":"0dfbd4f6_712548d4","updated":"2024-07-12 21:07:56.000000000","message":"This type is needed as a placeholder. We use std::mem::replace further down to take the current instantiation state and replace it with Poisoned, and later swap it back. If we panic while determining the new state, the Poisoned error will remain there in the instantiation state (inside a Poisoned mutex, so other threads attempting to look at this would probably already panic while attempting to lock the mutex).","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"15b4995bb7b44d83272b28d2e2db3181eaa8e746","unresolved":true,"context_lines":[{"line_number":149,"context_line":"    #[error(\"recursion not allowed\")]"},{"line_number":150,"context_line":"    Recursion,"},{"line_number":151,"context_line":"    #[error(\"store construction panicked\")]"},{"line_number":152,"context_line":"    Poisoned,"},{"line_number":153,"context_line":"    #[error(\"service instantiation failed: {0}\")]"},{"line_number":154,"context_line":"    Failed(String),"},{"line_number":155,"context_line":"}"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"cf1f9071_2510621d","line":152,"in_reply_to":"6bc79218_498806ba","updated":"2024-07-12 11:40:55.000000000","message":"I don\u0027t get the question","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"d8e02cd219a30afe8d20ad38bac18f6d8c62b784","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    #[error(\"recursion not allowed\")]"},{"line_number":150,"context_line":"    Recursion,"},{"line_number":151,"context_line":"    #[error(\"store construction panicked\")]"},{"line_number":152,"context_line":"    Poisoned,"},{"line_number":153,"context_line":"    #[error(\"service instantiation failed: {0}\")]"},{"line_number":154,"context_line":"    Failed(String),"},{"line_number":155,"context_line":"}"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"e8e7fe5e_09711c25","line":152,"in_reply_to":"820589a7_aef0e04b","updated":"2024-07-12 21:42:49.000000000","message":"ok","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"2b08f118f07a7eada3f418f01c623853bc83ba73","unresolved":true,"context_lines":[{"line_number":149,"context_line":"    #[error(\"recursion not allowed\")]"},{"line_number":150,"context_line":"    Recursion,"},{"line_number":151,"context_line":"    #[error(\"store construction panicked\")]"},{"line_number":152,"context_line":"    Poisoned,"},{"line_number":153,"context_line":"    #[error(\"service instantiation failed: {0}\")]"},{"line_number":154,"context_line":"    Failed(String),"},{"line_number":155,"context_line":"}"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"0dfbd4f6_712548d4","line":152,"in_reply_to":"cf1f9071_2510621d","updated":"2024-07-12 14:33:15.000000000","message":"When do we construct the `Poisoned` kind? Can we instead just panic there too?","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"8b9d2ddccdaf637aa195e1508c2d474b04048efd","unresolved":true,"context_lines":[{"line_number":151,"context_line":"    #[error(\"store construction panicked\")]"},{"line_number":152,"context_line":"    Poisoned,"},{"line_number":153,"context_line":"    #[error(\"service instantiation failed: {0}\")]"},{"line_number":154,"context_line":"    Failed(String),"},{"line_number":155,"context_line":"}"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"impl\u003cT: Send + Sync + ?Sized + \u0027static\u003e Composition\u003cT\u003e {"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"16028ab8_8140b939","line":154,"updated":"2024-07-12 10:56:02.000000000","message":"can we have a Box\u003cdyn Error\u003e here?","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"15b4995bb7b44d83272b28d2e2db3181eaa8e746","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    #[error(\"store construction panicked\")]"},{"line_number":152,"context_line":"    Poisoned,"},{"line_number":153,"context_line":"    #[error(\"service instantiation failed: {0}\")]"},{"line_number":154,"context_line":"    Failed(String),"},{"line_number":155,"context_line":"}"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"impl\u003cT: Send + Sync + ?Sized + \u0027static\u003e Composition\u003cT\u003e {"}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"e228dd54_6b7a108d","line":154,"in_reply_to":"16028ab8_8140b939","updated":"2024-07-12 11:40:55.000000000","message":"This must be clonable, but I made it Arc\u003cdyn Error\u003e now","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"8b9d2ddccdaf637aa195e1508c2d474b04048efd","unresolved":true,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"impl\u003cT: Send + Sync + ?Sized + \u0027static\u003e Composition\u003cT\u003e {"},{"line_number":158,"context_line":"    pub fn from_configs("},{"line_number":159,"context_line":"        configs: HashMap\u003cString, DeserializeWithRegistry\u003cBox\u003cdyn ServiceBuilder\u003cOutput \u003d Arc\u003cT\u003e\u003e\u003e\u003e\u003e,"},{"line_number":160,"context_line":"    ) -\u003e Self {"},{"line_number":161,"context_line":"        Composition {"},{"line_number":162,"context_line":"            stores: std::sync::Mutex::new("}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"a027db81_0c5cef9a","line":159,"updated":"2024-07-12 10:56:02.000000000","message":"Can we have a typedef for the value in here? and does it need to be a hash set, or can it be on any IntoIter with these keys and values?","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"d8e02cd219a30afe8d20ad38bac18f6d8c62b784","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"impl\u003cT: Send + Sync + ?Sized + \u0027static\u003e Composition\u003cT\u003e {"},{"line_number":158,"context_line":"    pub fn from_configs("},{"line_number":159,"context_line":"        configs: HashMap\u003cString, DeserializeWithRegistry\u003cBox\u003cdyn ServiceBuilder\u003cOutput \u003d Arc\u003cT\u003e\u003e\u003e\u003e\u003e,"},{"line_number":160,"context_line":"    ) -\u003e Self {"},{"line_number":161,"context_line":"        Composition {"},{"line_number":162,"context_line":"            stores: std::sync::Mutex::new("}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"3959371e_5f7851f6","line":159,"in_reply_to":"3b08cc74_8ce2e3f3","updated":"2024-07-12 21:42:49.000000000","message":"ok","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"15b4995bb7b44d83272b28d2e2db3181eaa8e746","unresolved":true,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"impl\u003cT: Send + Sync + ?Sized + \u0027static\u003e Composition\u003cT\u003e {"},{"line_number":158,"context_line":"    pub fn from_configs("},{"line_number":159,"context_line":"        configs: HashMap\u003cString, DeserializeWithRegistry\u003cBox\u003cdyn ServiceBuilder\u003cOutput \u003d Arc\u003cT\u003e\u003e\u003e\u003e\u003e,"},{"line_number":160,"context_line":"    ) -\u003e Self {"},{"line_number":161,"context_line":"        Composition {"},{"line_number":162,"context_line":"            stores: std::sync::Mutex::new("}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"a7ddd2ce_55eae6d0","line":159,"in_reply_to":"a027db81_0c5cef9a","updated":"2024-07-12 11:40:55.000000000","message":"Yes and no, it is helpful to have a concrete type here from a user perspective,  because then the type of the deserialize() call before it can be inferred.","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"2b08f118f07a7eada3f418f01c623853bc83ba73","unresolved":true,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"impl\u003cT: Send + Sync + ?Sized + \u0027static\u003e Composition\u003cT\u003e {"},{"line_number":158,"context_line":"    pub fn from_configs("},{"line_number":159,"context_line":"        configs: HashMap\u003cString, DeserializeWithRegistry\u003cBox\u003cdyn ServiceBuilder\u003cOutput \u003d Arc\u003cT\u003e\u003e\u003e\u003e\u003e,"},{"line_number":160,"context_line":"    ) -\u003e Self {"},{"line_number":161,"context_line":"        Composition {"},{"line_number":162,"context_line":"            stores: std::sync::Mutex::new("}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"d40c5866_8ceb23a2","line":159,"in_reply_to":"a7ddd2ce_55eae6d0","updated":"2024-07-12 14:33:15.000000000","message":"As for the typdef, I\u0027m thinking of a better name for the `DeserializeWithRegistry\u003cBox\u003cdyn ServiceBuilder\u003cOutput \u003d Arc\u003c…\u003e\u003e\u003e\u003e\u003e` part (and keep `T` as a generic around).\n\nWe can keep the IntoIter thing for later, and have a `from_iter` something thing.\nBut let\u0027s add a comment on why we\u0027re explicitly picking HashMap here.","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"172d3d59f1c6fd0b8a55798b54c60331438e8fe8","unresolved":true,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"impl\u003cT: Send + Sync + ?Sized + \u0027static\u003e Composition\u003cT\u003e {"},{"line_number":158,"context_line":"    pub fn from_configs("},{"line_number":159,"context_line":"        configs: HashMap\u003cString, DeserializeWithRegistry\u003cBox\u003cdyn ServiceBuilder\u003cOutput \u003d Arc\u003cT\u003e\u003e\u003e\u003e\u003e,"},{"line_number":160,"context_line":"    ) -\u003e Self {"},{"line_number":161,"context_line":"        Composition {"},{"line_number":162,"context_line":"            stores: std::sync::Mutex::new("}],"source_content_type":"text/x-rustsrc","patch_set":21,"id":"3b08cc74_8ce2e3f3","line":159,"in_reply_to":"d40c5866_8ceb23a2","updated":"2024-07-12 21:07:56.000000000","message":"I have added a from_iter variant and a comment about why we still want the HashMap variant.\nI don\u0027t think it\u0027s particularly high priority to add a typedef, since as can be seen in the examples it is never actually necessary to type out this type on the user side, and we only type it out once.","commit_id":"3b305014bfe4a8a173e78b037841d8f688390015"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"2b08f118f07a7eada3f418f01c623853bc83ba73","unresolved":true,"context_lines":[{"line_number":23,"context_line":"//!"},{"line_number":24,"context_line":"//! ### Example 2.: You want to compose a store"},{"line_number":25,"context_line":"//!"},{"line_number":26,"context_line":"//! ```"},{"line_number":27,"context_line":"//! use tvix_castore::composition::{with_registry, REG, Composition};"},{"line_number":28,"context_line":"//!"},{"line_number":29,"context_line":"//! let blob_services_configs_json \u003d serde_json::json! {"}],"source_content_type":"text/x-rustsrc","patch_set":25,"id":"bf4b2472_6ae5a761","line":26,"updated":"2024-07-12 14:33:15.000000000","message":"Note to self: check doctest for this","commit_id":"ab13775b524857e0635ab2ebea00faabce802542"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"18600497b3762eb828ecb20883c27b4f519adbe9","unresolved":false,"context_lines":[{"line_number":23,"context_line":"//!"},{"line_number":24,"context_line":"//! ### Example 2.: You want to compose a store"},{"line_number":25,"context_line":"//!"},{"line_number":26,"context_line":"//! ```"},{"line_number":27,"context_line":"//! use tvix_castore::composition::{with_registry, REG, Composition};"},{"line_number":28,"context_line":"//!"},{"line_number":29,"context_line":"//! let blob_services_configs_json \u003d serde_json::json! {"}],"source_content_type":"text/x-rustsrc","patch_set":25,"id":"e4ddcdfb_3371387a","line":26,"in_reply_to":"bf4b2472_6ae5a761","updated":"2024-07-16 15:19:43.000000000","message":"Done","commit_id":"ab13775b524857e0635ab2ebea00faabce802542"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"2b08f118f07a7eada3f418f01c623853bc83ba73","unresolved":true,"context_lines":[{"line_number":88,"context_line":"// T, so instead store it as `Box\u003cdyn Any\u003e` and downcast to `\u0026BoxFnSeed\u003cT\u003e` when performing the"},{"line_number":89,"context_line":"// lookup."},{"line_number":90,"context_line":"// I said it was ugly..."},{"line_number":91,"context_line":"/// Resolves tag names to the corresponding Config type."},{"line_number":92,"context_line":"#[derive(Default)]"},{"line_number":93,"context_line":"pub struct Registry(BTreeMap\u003c(TypeId, \u0026\u0027static str), Box\u003cdyn Any + Sync\u003e\u003e);"},{"line_number":94,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":25,"id":"78a683b0_f6d639cc","line":91,"updated":"2024-07-12 14:33:15.000000000","message":"is it possible to move this line to the top, does it still register as docstring for `Registry`?","commit_id":"ab13775b524857e0635ab2ebea00faabce802542"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"172d3d59f1c6fd0b8a55798b54c60331438e8fe8","unresolved":false,"context_lines":[{"line_number":88,"context_line":"// T, so instead store it as `Box\u003cdyn Any\u003e` and downcast to `\u0026BoxFnSeed\u003cT\u003e` when performing the"},{"line_number":89,"context_line":"// lookup."},{"line_number":90,"context_line":"// I said it was ugly..."},{"line_number":91,"context_line":"/// Resolves tag names to the corresponding Config type."},{"line_number":92,"context_line":"#[derive(Default)]"},{"line_number":93,"context_line":"pub struct Registry(BTreeMap\u003c(TypeId, \u0026\u0027static str), Box\u003cdyn Any + Sync\u003e\u003e);"},{"line_number":94,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":25,"id":"35cf665b_a4b2c5ca","line":91,"in_reply_to":"78a683b0_f6d639cc","updated":"2024-07-12 21:07:56.000000000","message":"Done","commit_id":"ab13775b524857e0635ab2ebea00faabce802542"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"2b08f118f07a7eada3f418f01c623853bc83ba73","unresolved":true,"context_lines":[{"line_number":119,"context_line":"pub struct DeserializeWithRegistry\u003cT\u003e(T);"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"impl Registry {"},{"line_number":122,"context_line":"    pub fn register\u003cT: \u0027static, C: DeserializeOwned + Into\u003cT\u003e\u003e(\u0026mut self, type_name: \u0026\u0027static str) {"},{"line_number":123,"context_line":"        let seed \u003d BoxFnSeed::new(|x| {"},{"line_number":124,"context_line":"            deserialize::\u003cC\u003e(x)"},{"line_number":125,"context_line":"                .map(Into::into)"}],"source_content_type":"text/x-rustsrc","patch_set":25,"id":"bde767bb_f23bc627","line":122,"updated":"2024-07-12 14:33:15.000000000","message":"docstring, can be short and refer to the module-level docs. but there should be a one/twoliner.\n\nAlso explain the type parameters","commit_id":"ab13775b524857e0635ab2ebea00faabce802542"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"18600497b3762eb828ecb20883c27b4f519adbe9","unresolved":false,"context_lines":[{"line_number":119,"context_line":"pub struct DeserializeWithRegistry\u003cT\u003e(T);"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"impl Registry {"},{"line_number":122,"context_line":"    pub fn register\u003cT: \u0027static, C: DeserializeOwned + Into\u003cT\u003e\u003e(\u0026mut self, type_name: \u0026\u0027static str) {"},{"line_number":123,"context_line":"        let seed \u003d BoxFnSeed::new(|x| {"},{"line_number":124,"context_line":"            deserialize::\u003cC\u003e(x)"},{"line_number":125,"context_line":"                .map(Into::into)"}],"source_content_type":"text/x-rustsrc","patch_set":25,"id":"0328ce3e_f0b3d9f5","line":122,"in_reply_to":"bde767bb_f23bc627","updated":"2024-07-16 15:19:43.000000000","message":"Done","commit_id":"ab13775b524857e0635ab2ebea00faabce802542"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"2b08f118f07a7eada3f418f01c623853bc83ba73","unresolved":true,"context_lines":[{"line_number":144,"context_line":"}"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"thread_local! {"},{"line_number":147,"context_line":"    static ACTIVE_REG: Cell\u003cOption\u003c\u0026\u0027static Registry\u003e\u003e \u003d panic!(\"reg was accessed before initialization\");"},{"line_number":148,"context_line":"}"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"/// Run the provided closure with a registry context."}],"source_content_type":"text/x-rustsrc","patch_set":25,"id":"d5a9e3b2_ddc68801","line":147,"updated":"2024-07-12 14:33:15.000000000","message":"docstring","commit_id":"ab13775b524857e0635ab2ebea00faabce802542"},{"author":{"_account_id":1000106,"name":"yuka","email":"yuka@yuka.dev","username":"yuka"},"change_message_id":"18600497b3762eb828ecb20883c27b4f519adbe9","unresolved":false,"context_lines":[{"line_number":144,"context_line":"}"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"thread_local! {"},{"line_number":147,"context_line":"    static ACTIVE_REG: Cell\u003cOption\u003c\u0026\u0027static Registry\u003e\u003e \u003d panic!(\"reg was accessed before initialization\");"},{"line_number":148,"context_line":"}"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"/// Run the provided closure with a registry context."}],"source_content_type":"text/x-rustsrc","patch_set":25,"id":"d17d906e_c129782a","line":147,"in_reply_to":"d5a9e3b2_ddc68801","updated":"2024-07-16 15:19:43.000000000","message":"Done","commit_id":"ab13775b524857e0635ab2ebea00faabce802542"}],"tvix/castore/src/directoryservice/object_store.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"763a96cd2191959ce4c171c95916a5498b26fa2a","unresolved":false,"context_lines":[{"line_number":22,"context_line":"use crate::{proto, B3Digest, Error};"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"#[derive(serde::Deserialize)]"},{"line_number":25,"context_line":"#[serde(deny_unknown_fields)]"},{"line_number":26,"context_line":"pub struct ObjectStoreDirectoryServiceConfig {"},{"line_number":27,"context_line":"    object_store_url: String,"},{"line_number":28,"context_line":"    #[serde(default)]"}],"source_content_type":"text/x-rustsrc","patch_set":6,"id":"3b18071e_695f434f","line":25,"updated":"2024-06-17 07:27:28.000000000","message":"Unsure about the naming here, it gets quite long.\n\nMaybe we just call this ServiceConfig, and only add the long name in the public export?\n\nMore like a note, we have a bit of the same mess with the services themselves.","commit_id":"ef54fb743954253562ad74e6d5a1c5fcafae2892"}]}
