)]}'
{"tvix/nar/src/lib.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"23c895d3aa84304e5502da61bf1a516c08309ff1","unresolved":true,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"/// Single node in a NAR file."},{"line_number":46,"context_line":"///"},{"line_number":47,"context_line":"/// A NAR can be thought of as a tree of files, where the root of the tree and"},{"line_number":48,"context_line":"/// all of its children (such as directories or the files contained therein) are"},{"line_number":49,"context_line":"/// nodes represented by this type."},{"line_number":50,"context_line":"pub struct Node\u003c\u0027a, \u0027w: \u0027a\u003e {"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"331cccd8_a232cd83","line":47,"updated":"2022-12-21 14:05:25.000000000","message":"It\u0027s a tree of nodes, and directories have entries, which are nodes again.","commit_id":"3d3e871964c61475760b40694a40e69cf5db7ced"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"8ad6fb336b5e27d3de04fbd71484a013f4529172","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"/// Single node in a NAR file."},{"line_number":46,"context_line":"///"},{"line_number":47,"context_line":"/// A NAR can be thought of as a tree of files, where the root of the tree and"},{"line_number":48,"context_line":"/// all of its children (such as directories or the files contained therein) are"},{"line_number":49,"context_line":"/// nodes represented by this type."},{"line_number":50,"context_line":"pub struct Node\u003c\u0027a, \u0027w: \u0027a\u003e {"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"2efce194_4ffd8847","line":47,"in_reply_to":"331cccd8_a232cd83","updated":"2022-12-21 14:29:28.000000000","message":"Done","commit_id":"3d3e871964c61475760b40694a40e69cf5db7ced"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"23c895d3aa84304e5502da61bf1a516c08309ff1","unresolved":true,"context_lines":[{"line_number":63,"context_line":"        }"},{"line_number":64,"context_line":"    }"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    /// Fill a NAR with a symlink."},{"line_number":67,"context_line":"    pub fn symlink(mut self, target: \u0026str) -\u003e io::Result\u003c()\u003e {"},{"line_number":68,"context_line":"        debug_assert!("},{"line_number":69,"context_line":"            target.len() \u003c\u003d wire::MAX_TARGET_LEN,"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"4c6db0a1_b5c0e3a9","line":66,"updated":"2022-12-21 14:05:25.000000000","message":"This is more like a \"make this Node a symlink\".","commit_id":"3d3e871964c61475760b40694a40e69cf5db7ced"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"8ad6fb336b5e27d3de04fbd71484a013f4529172","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        }"},{"line_number":64,"context_line":"    }"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    /// Fill a NAR with a symlink."},{"line_number":67,"context_line":"    pub fn symlink(mut self, target: \u0026str) -\u003e io::Result\u003c()\u003e {"},{"line_number":68,"context_line":"        debug_assert!("},{"line_number":69,"context_line":"            target.len() \u003c\u003d wire::MAX_TARGET_LEN,"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"d3366c5f_ea68dfee","line":66,"in_reply_to":"4c6db0a1_b5c0e3a9","updated":"2022-12-21 14:29:28.000000000","message":"Done","commit_id":"3d3e871964c61475760b40694a40e69cf5db7ced"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"23c895d3aa84304e5502da61bf1a516c08309ff1","unresolved":true,"context_lines":[{"line_number":84,"context_line":"        Ok(())"},{"line_number":85,"context_line":"    }"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    /// Fill the node with a single file."},{"line_number":88,"context_line":"    pub fn file(mut self, executable: bool, size: u64, reader: \u0026mut dyn BufRead) -\u003e io::Result\u003c()\u003e {"},{"line_number":89,"context_line":"        self.write(if executable {"},{"line_number":90,"context_line":"            \u0026wire::TOK_EXE"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"3a669f06_8ad652ee","line":87,"updated":"2022-12-21 14:05:25.000000000","message":"This is more like a \"make this Node a single file\".","commit_id":"3d3e871964c61475760b40694a40e69cf5db7ced"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"8ad6fb336b5e27d3de04fbd71484a013f4529172","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        Ok(())"},{"line_number":85,"context_line":"    }"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    /// Fill the node with a single file."},{"line_number":88,"context_line":"    pub fn file(mut self, executable: bool, size: u64, reader: \u0026mut dyn BufRead) -\u003e io::Result\u003c()\u003e {"},{"line_number":89,"context_line":"        self.write(if executable {"},{"line_number":90,"context_line":"            \u0026wire::TOK_EXE"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"09be3cbc_9acf101c","line":87,"in_reply_to":"3a669f06_8ad652ee","updated":"2022-12-21 14:29:28.000000000","message":"Done","commit_id":"3d3e871964c61475760b40694a40e69cf5db7ced"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"23c895d3aa84304e5502da61bf1a516c08309ff1","unresolved":true,"context_lines":[{"line_number":115,"context_line":"        Ok(())"},{"line_number":116,"context_line":"    }"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    /// Fill the node with a directory, the content of which is set using the"},{"line_number":119,"context_line":"    /// resulting [`Directory`] value."},{"line_number":120,"context_line":"    pub fn directory(mut self) -\u003e io::Result\u003cDirectory\u003c\u0027a, \u0027w\u003e\u003e {"},{"line_number":121,"context_line":"        self.write(\u0026wire::TOK_DIR)?;"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"7cf3de19_a34f8f42","line":118,"updated":"2022-12-21 14:05:25.000000000","message":"Same as above.","commit_id":"3d3e871964c61475760b40694a40e69cf5db7ced"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"8ad6fb336b5e27d3de04fbd71484a013f4529172","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        Ok(())"},{"line_number":116,"context_line":"    }"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    /// Fill the node with a directory, the content of which is set using the"},{"line_number":119,"context_line":"    /// resulting [`Directory`] value."},{"line_number":120,"context_line":"    pub fn directory(mut self) -\u003e io::Result\u003cDirectory\u003c\u0027a, \u0027w\u003e\u003e {"},{"line_number":121,"context_line":"        self.write(\u0026wire::TOK_DIR)?;"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"870d7280_bffff68c","line":118,"in_reply_to":"7cf3de19_a34f8f42","updated":"2022-12-21 14:29:28.000000000","message":"Done","commit_id":"3d3e871964c61475760b40694a40e69cf5db7ced"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"23c895d3aa84304e5502da61bf1a516c08309ff1","unresolved":true,"context_lines":[{"line_number":196,"context_line":"    ///"},{"line_number":197,"context_line":"    /// **Important:** This *must* be called when all entries have been written"},{"line_number":198,"context_line":"    /// in a directory, otherwise the resulting NAR file will be invalid."},{"line_number":199,"context_line":"    // TODO: panic in Directory::drop if this was not called?"},{"line_number":200,"context_line":"    pub fn close(mut self) -\u003e io::Result\u003c()\u003e {"},{"line_number":201,"context_line":"        if self.prev_name.is_some() {"},{"line_number":202,"context_line":"            self.node.write(\u0026wire::TOK_PAR)?;"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"49af06c2_a20791bc","line":199,"updated":"2022-12-21 14:05:25.000000000","message":"@grfn, thoughts?","commit_id":"3d3e871964c61475760b40694a40e69cf5db7ced"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"4e19e4e1e1c64c0a1c62da825987e07a50b08968","unresolved":true,"context_lines":[{"line_number":196,"context_line":"    ///"},{"line_number":197,"context_line":"    /// **Important:** This *must* be called when all entries have been written"},{"line_number":198,"context_line":"    /// in a directory, otherwise the resulting NAR file will be invalid."},{"line_number":199,"context_line":"    // TODO: panic in Directory::drop if this was not called?"},{"line_number":200,"context_line":"    pub fn close(mut self) -\u003e io::Result\u003c()\u003e {"},{"line_number":201,"context_line":"        if self.prev_name.is_some() {"},{"line_number":202,"context_line":"            self.node.write(\u0026wire::TOK_PAR)?;"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"6af6cf3a_3e1f7fd1","line":199,"in_reply_to":"49af06c2_a20791bc","updated":"2022-12-21 14:08:53.000000000","message":"panic-in-drop is extremely fraught. See https://faultlore.com/blah/linear-rust/ for a longer explanation of the kind of thing you are reaching for here - but the tl;dr is that we kinda can\u0027t do it","commit_id":"3d3e871964c61475760b40694a40e69cf5db7ced"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"8ad6fb336b5e27d3de04fbd71484a013f4529172","unresolved":false,"context_lines":[{"line_number":196,"context_line":"    ///"},{"line_number":197,"context_line":"    /// **Important:** This *must* be called when all entries have been written"},{"line_number":198,"context_line":"    /// in a directory, otherwise the resulting NAR file will be invalid."},{"line_number":199,"context_line":"    // TODO: panic in Directory::drop if this was not called?"},{"line_number":200,"context_line":"    pub fn close(mut self) -\u003e io::Result\u003c()\u003e {"},{"line_number":201,"context_line":"        if self.prev_name.is_some() {"},{"line_number":202,"context_line":"            self.node.write(\u0026wire::TOK_PAR)?;"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"effae503_eaea258c","line":199,"in_reply_to":"6af6cf3a_3e1f7fd1","updated":"2022-12-21 14:29:28.000000000","message":"Ack","commit_id":"3d3e871964c61475760b40694a40e69cf5db7ced"}]}
