)]}'
{"tvix/Cargo.toml":[{"author":{"_account_id":1000082,"name":"Brian Olsen","display_name":"griff","email":"me@griff.name","username":"griff"},"change_message_id":"dc1fa4423785bca8404e5998a5b2ae120543235f","unresolved":true,"context_lines":[{"line_number":118,"context_line":"rustyline \u003d \"10.1.1\""},{"line_number":119,"context_line":"serde \u003d \"1.0.209\""},{"line_number":120,"context_line":"serde_json \u003d \"1.0\""},{"line_number":121,"context_line":"serde_repr \u003d \"0.1.19\""},{"line_number":122,"context_line":"serde_qs \u003d \"0.12.0\""},{"line_number":123,"context_line":"serde_tagged \u003d \"0.3.0\""},{"line_number":124,"context_line":"serde_with \u003d \"3.9.0\""}],"source_content_type":"text/x-toml","patch_set":5,"id":"425e0524_bfb6debe","line":121,"updated":"2025-03-02 14:25:26.000000000","message":"We don\u0027t need this dependency if we rewrite the derives using existing dependencies.","commit_id":"1e99576a8076d3b2046e61073bd84a17ba3f2a25"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"ac181f5e326be17b70d709f9240b26cf5a367ccf","unresolved":false,"context_lines":[{"line_number":118,"context_line":"rustyline \u003d \"10.1.1\""},{"line_number":119,"context_line":"serde \u003d \"1.0.209\""},{"line_number":120,"context_line":"serde_json \u003d \"1.0\""},{"line_number":121,"context_line":"serde_repr \u003d \"0.1.19\""},{"line_number":122,"context_line":"serde_qs \u003d \"0.12.0\""},{"line_number":123,"context_line":"serde_tagged \u003d \"0.3.0\""},{"line_number":124,"context_line":"serde_with \u003d \"3.9.0\""}],"source_content_type":"text/x-toml","patch_set":5,"id":"8c304e39_8efb67ee","line":121,"in_reply_to":"425e0524_bfb6debe","updated":"2025-03-02 15:23:59.000000000","message":"Acknowledged","commit_id":"1e99576a8076d3b2046e61073bd84a17ba3f2a25"}],"tvix/nix-compat/src/log/mod.rs":[{"author":{"_account_id":1000082,"name":"Brian Olsen","display_name":"griff","email":"me@griff.name","username":"griff"},"change_message_id":"e11a9f124f98acb926be767ab35e1afdfd19af86","unresolved":true,"context_lines":[{"line_number":30,"context_line":"    )"},{"line_number":31,"context_line":")]"},{"line_number":32,"context_line":"#[cfg_attr(feature \u003d \"daemon\", nix(from \u003d \"u64\", into \u003d \"u64\"))]"},{"line_number":33,"context_line":"#[cfg_attr("},{"line_number":34,"context_line":"    not(feature \u003d \"daemon\"),"},{"line_number":35,"context_line":"    derive(Clone, Debug, Eq, PartialEq, Serialize_repr, Deserialize_repr)"},{"line_number":36,"context_line":")]"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"0e666606_c3c79f75","line":33,"updated":"2025-02-21 11:05:46.000000000","message":"You don\u0027t actually need to use cfg_attr here since you can have more than one line of derive. So instead this does the exact same thing:\n```\n#[derive(Clone, Debug, Eq, PartialEq, Serialize_repr, Deserialize_repr)]\n#[cfg_attr(\n    feature \u003d \"daemon\",\n    derive(\n        num_enum::FromPrimitive,\n        num_enum::IntoPrimitive,\n        nix_compat_derive::NixDeserialize,\n        nix_compat_derive::NixSerialize,\n        Default,\n    )\n)]\n#[cfg_attr(feature \u003d \"daemon\", nix(from \u003d \"u64\", into \u003d \"u64\"))]\n```","commit_id":"66bbd51f0cdc1633ebcc7e83ecf8209491b3718a"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"576aad08bd4a29e0b70bdc4ab773ec2a1dd8c28c","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    )"},{"line_number":31,"context_line":")]"},{"line_number":32,"context_line":"#[cfg_attr(feature \u003d \"daemon\", nix(from \u003d \"u64\", into \u003d \"u64\"))]"},{"line_number":33,"context_line":"#[cfg_attr("},{"line_number":34,"context_line":"    not(feature \u003d \"daemon\"),"},{"line_number":35,"context_line":"    derive(Clone, Debug, Eq, PartialEq, Serialize_repr, Deserialize_repr)"},{"line_number":36,"context_line":")]"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"9077df88_f791a784","line":33,"in_reply_to":"0e666606_c3c79f75","updated":"2025-02-27 15:45:13.000000000","message":"Done, thanks!","commit_id":"66bbd51f0cdc1633ebcc7e83ecf8209491b3718a"},{"author":{"_account_id":1000082,"name":"Brian Olsen","display_name":"griff","email":"me@griff.name","username":"griff"},"change_message_id":"e11a9f124f98acb926be767ab35e1afdfd19af86","unresolved":true,"context_lines":[{"line_number":32,"context_line":"#[cfg_attr(feature \u003d \"daemon\", nix(from \u003d \"u64\", into \u003d \"u64\"))]"},{"line_number":33,"context_line":"#[cfg_attr("},{"line_number":34,"context_line":"    not(feature \u003d \"daemon\"),"},{"line_number":35,"context_line":"    derive(Clone, Debug, Eq, PartialEq, Serialize_repr, Deserialize_repr)"},{"line_number":36,"context_line":")]"},{"line_number":37,"context_line":"#[repr(u64)]"},{"line_number":38,"context_line":"pub enum Verbosity {"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"bd34092d_72ce9c38","line":35,"updated":"2025-02-21 11:05:46.000000000","message":"You also don\u0027t need `Deserialize_repr` / `Serialize_repr` since the `from\u003d\"\"` and `into\u003d\"\"` from nix_compat_derive is based on the same feature in Serde. See https://serde.rs/container-attrs.html#from\n```\n#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, num_enum::FromPrimitive, num_enum::IntoPrimitive, Default)]\n#[serde(from \u003d \"u64\", into \u003d \"u64\")]\n```","commit_id":"66bbd51f0cdc1633ebcc7e83ecf8209491b3718a"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"576aad08bd4a29e0b70bdc4ab773ec2a1dd8c28c","unresolved":false,"context_lines":[{"line_number":32,"context_line":"#[cfg_attr(feature \u003d \"daemon\", nix(from \u003d \"u64\", into \u003d \"u64\"))]"},{"line_number":33,"context_line":"#[cfg_attr("},{"line_number":34,"context_line":"    not(feature \u003d \"daemon\"),"},{"line_number":35,"context_line":"    derive(Clone, Debug, Eq, PartialEq, Serialize_repr, Deserialize_repr)"},{"line_number":36,"context_line":")]"},{"line_number":37,"context_line":"#[repr(u64)]"},{"line_number":38,"context_line":"pub enum Verbosity {"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"e7e5464c_12d77704","line":35,"in_reply_to":"bd34092d_72ce9c38","updated":"2025-02-27 15:45:13.000000000","message":"Done, thanks!","commit_id":"66bbd51f0cdc1633ebcc7e83ecf8209491b3718a"},{"author":{"_account_id":1000082,"name":"Brian Olsen","display_name":"griff","email":"me@griff.name","username":"griff"},"change_message_id":"e11a9f124f98acb926be767ab35e1afdfd19af86","unresolved":true,"context_lines":[{"line_number":52,"context_line":"#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]"},{"line_number":53,"context_line":"#[serde(tag \u003d \"action\", deny_unknown_fields)]"},{"line_number":54,"context_line":"// TODO: deny_unknown_fields doesn\u0027t seem to work"},{"line_number":55,"context_line":"// TODO: the shape of `fields` still is super confusing"},{"line_number":56,"context_line":"pub enum LogMessage\u003c\u0027a\u003e {"},{"line_number":57,"context_line":"    #[serde(rename \u003d \"start\")]"},{"line_number":58,"context_line":"    Start {"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"ee23cead_096a835f","line":55,"updated":"2025-02-21 11:05:46.000000000","message":"You can see the way my current state of Nix.rs defines daemon logging types and fields here: https://github.com/griff/Nix.rs/blob/main/nixrs/src/daemon/logger.rs\n\nMost of how Nix JSON encodes logs is defined here: https://github.com/NixOS/nix/blob/master/src/libutil/logging.cc#L169\n\nIn essence fields is an array of variable length with either int or string values.","commit_id":"66bbd51f0cdc1633ebcc7e83ecf8209491b3718a"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"576aad08bd4a29e0b70bdc4ab773ec2a1dd8c28c","unresolved":false,"context_lines":[{"line_number":52,"context_line":"#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]"},{"line_number":53,"context_line":"#[serde(tag \u003d \"action\", deny_unknown_fields)]"},{"line_number":54,"context_line":"// TODO: deny_unknown_fields doesn\u0027t seem to work"},{"line_number":55,"context_line":"// TODO: the shape of `fields` still is super confusing"},{"line_number":56,"context_line":"pub enum LogMessage\u003c\u0027a\u003e {"},{"line_number":57,"context_line":"    #[serde(rename \u003d \"start\")]"},{"line_number":58,"context_line":"    Start {"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"5d5e7fed_3835ef47","line":55,"in_reply_to":"ee23cead_096a835f","updated":"2025-02-27 15:45:13.000000000","message":"Ok. I also used an enum with String and Int kinds. We can add NixDeserialize/NixSerialize bits once we need the daemon feature of that.","commit_id":"66bbd51f0cdc1633ebcc7e83ecf8209491b3718a"},{"author":{"_account_id":1000082,"name":"Brian Olsen","display_name":"griff","email":"me@griff.name","username":"griff"},"change_message_id":"f06c534248fe5ba2aaeb9fa509390ca6c33ebd85","unresolved":true,"context_lines":[{"line_number":53,"context_line":"#[serde(tag \u003d \"action\", deny_unknown_fields)]"},{"line_number":54,"context_line":"// TODO: deny_unknown_fields doesn\u0027t seem to work"},{"line_number":55,"context_line":"// TODO: the shape of `fields` still is super confusing"},{"line_number":56,"context_line":"pub enum LogMessage\u003c\u0027a\u003e {"},{"line_number":57,"context_line":"    #[serde(rename \u003d \"start\")]"},{"line_number":58,"context_line":"    Start {"},{"line_number":59,"context_line":"        #[serde(skip_serializing_if \u003d \"Option::is_none\")]"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"8f1432bd_0f7c0aef","line":56,"updated":"2025-02-21 11:29:03.000000000","message":"There is one more message type not covered here: `setPhase`\n\nWhen parsing json logs Nix 2.24 converts those to a `Result` with `ResultType::SetPhase`","commit_id":"66bbd51f0cdc1633ebcc7e83ecf8209491b3718a"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"576aad08bd4a29e0b70bdc4ab773ec2a1dd8c28c","unresolved":false,"context_lines":[{"line_number":53,"context_line":"#[serde(tag \u003d \"action\", deny_unknown_fields)]"},{"line_number":54,"context_line":"// TODO: deny_unknown_fields doesn\u0027t seem to work"},{"line_number":55,"context_line":"// TODO: the shape of `fields` still is super confusing"},{"line_number":56,"context_line":"pub enum LogMessage\u003c\u0027a\u003e {"},{"line_number":57,"context_line":"    #[serde(rename \u003d \"start\")]"},{"line_number":58,"context_line":"    Start {"},{"line_number":59,"context_line":"        #[serde(skip_serializing_if \u003d \"Option::is_none\")]"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"2e08a3fc_e899535f","line":56,"in_reply_to":"8f1432bd_0f7c0aef","updated":"2025-02-27 15:45:13.000000000","message":"added, thanks. I was mostly focusing on the lines running nix with internal-json log format it self produces when running a build, but indeed it doesn\u0027t hurt to cover this.\n\nI added testcases for both an example of what\u0027s written inside the build, and how it\u0027ll appear on the outside.","commit_id":"66bbd51f0cdc1633ebcc7e83ecf8209491b3718a"},{"author":{"_account_id":1000082,"name":"Brian Olsen","display_name":"griff","email":"me@griff.name","username":"griff"},"change_message_id":"e11a9f124f98acb926be767ab35e1afdfd19af86","unresolved":true,"context_lines":[{"line_number":72,"context_line":"        id: u64,"},{"line_number":73,"context_line":"        r#type: ResultType,"},{"line_number":74,"context_line":"    },"},{"line_number":75,"context_line":"    // TODO: there sometimes seems to be column/file/line fields set to null, and a raw_msg field"},{"line_number":76,"context_line":"    #[serde(rename \u003d \"msg\")]"},{"line_number":77,"context_line":"    Msg {"},{"line_number":78,"context_line":"        // column: Option\u003cu64\u003e,   // TODO: null or int"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"a6f6f7b9_1afe872a","line":75,"updated":"2025-02-21 11:05:46.000000000","message":"column/line/file fields and raw_msg are there when using the show-trace option. When that is set msg contains ANSI colors and a formatted stack trace and raw_msg is the original unformatted msg.","commit_id":"66bbd51f0cdc1633ebcc7e83ecf8209491b3718a"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"576aad08bd4a29e0b70bdc4ab773ec2a1dd8c28c","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        id: u64,"},{"line_number":73,"context_line":"        r#type: ResultType,"},{"line_number":74,"context_line":"    },"},{"line_number":75,"context_line":"    // TODO: there sometimes seems to be column/file/line fields set to null, and a raw_msg field"},{"line_number":76,"context_line":"    #[serde(rename \u003d \"msg\")]"},{"line_number":77,"context_line":"    Msg {"},{"line_number":78,"context_line":"        // column: Option\u003cu64\u003e,   // TODO: null or int"}],"source_content_type":"text/x-rustsrc","patch_set":1,"id":"4252e25f_a7a66742","line":75,"in_reply_to":"a6f6f7b9_1afe872a","updated":"2025-02-27 15:45:13.000000000","message":"I think the example I encountered was just the ctrl-c case, without setting `--show-trace`.\n\nIn any case, it\u0027s not really necessary to have all fields covered initially. I parametrized the tests, and allow that one to not roundtrip for now.","commit_id":"66bbd51f0cdc1633ebcc7e83ecf8209491b3718a"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"8243fc06273ffae7e8120f9ee6dcd95dcaf70646","unresolved":false,"context_lines":[{"line_number":62,"context_line":"/// represent."},{"line_number":63,"context_line":"#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]"},{"line_number":64,"context_line":"#[serde(tag \u003d \"action\" /*, deny_unknown_fields */)]"},{"line_number":65,"context_line":"// TODO: deny_unknown_fields doesn\u0027t seem to work in the testcases below"},{"line_number":66,"context_line":"pub enum LogMessage\u003c\u0027a\u003e {"},{"line_number":67,"context_line":"    #[serde(rename \u003d \"start\")]"},{"line_number":68,"context_line":"    Start {"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"8615a96f_aea8de7d","line":65,"updated":"2025-03-02 12:16:00.000000000","message":"This does trigger in actual consumer code, just not in the testcase.\n\nI think it\u0027s ok to keep this TODO until column/file/line/raw_msg and examples for it are also added (which I consider out of scope for this PR)","commit_id":"51024d00542d087154328742fcafe532025ada7f"},{"author":{"_account_id":1000082,"name":"Brian Olsen","display_name":"griff","email":"me@griff.name","username":"griff"},"change_message_id":"dc1fa4423785bca8404e5998a5b2ae120543235f","unresolved":true,"context_lines":[{"line_number":2,"context_line":"//! messages as well as in nix-daemon communication."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"use serde::{Deserialize, Serialize};"},{"line_number":5,"context_line":"use serde_repr::{Deserialize_repr, Serialize_repr};"},{"line_number":6,"context_line":"use tracing::warn;"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"/// Every \"internal-json\" log line emitted by Nix has this prefix."}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"f3a3ac20_c10c12f3","line":5,"updated":"2025-03-02 14:25:26.000000000","message":"If you get rid of the two uses below we can get rid of this entire dependency.","commit_id":"1e99576a8076d3b2046e61073bd84a17ba3f2a25"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"0f3946e696b15ad4482b93a0f015549960533cfb","unresolved":false,"context_lines":[{"line_number":2,"context_line":"//! messages as well as in nix-daemon communication."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"use serde::{Deserialize, Serialize};"},{"line_number":5,"context_line":"use serde_repr::{Deserialize_repr, Serialize_repr};"},{"line_number":6,"context_line":"use tracing::warn;"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"/// Every \"internal-json\" log line emitted by Nix has this prefix."}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"559702f8_e1657310","line":5,"in_reply_to":"15e7ff49_d3127e43","updated":"2025-03-03 16:21:03.000000000","message":"Addressed.","commit_id":"1e99576a8076d3b2046e61073bd84a17ba3f2a25"},{"author":{"_account_id":1000082,"name":"Brian Olsen","display_name":"griff","email":"me@griff.name","username":"griff"},"change_message_id":"b41c2598986dc8bfcdeed0498eb388acb527bcf9","unresolved":true,"context_lines":[{"line_number":2,"context_line":"//! messages as well as in nix-daemon communication."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"use serde::{Deserialize, Serialize};"},{"line_number":5,"context_line":"use serde_repr::{Deserialize_repr, Serialize_repr};"},{"line_number":6,"context_line":"use tracing::warn;"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"/// Every \"internal-json\" log line emitted by Nix has this prefix."}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"d40ddaa7_ba3cf0a4","line":5,"in_reply_to":"a0df4404_65c0efc7","updated":"2025-03-02 18:07:58.000000000","message":"We can\u0027t actually do that. I think it was vova who mentioned that Nix has higher verbosity levels and it is easy to set them. Just add enough `-v` arguments on the command line to a nix command and BOOM you have higher than Vomit level.","commit_id":"1e99576a8076d3b2046e61073bd84a17ba3f2a25"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"4073ea423bbb05eb56a5560e3da1e873a2e04e9d","unresolved":true,"context_lines":[{"line_number":2,"context_line":"//! messages as well as in nix-daemon communication."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"use serde::{Deserialize, Serialize};"},{"line_number":5,"context_line":"use serde_repr::{Deserialize_repr, Serialize_repr};"},{"line_number":6,"context_line":"use tracing::warn;"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"/// Every \"internal-json\" log line emitted by Nix has this prefix."}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"15e7ff49_d3127e43","line":5,"in_reply_to":"d40ddaa7_ba3cf0a4","updated":"2025-03-03 16:20:42.000000000","message":"Ugh, this is terrible.","commit_id":"1e99576a8076d3b2046e61073bd84a17ba3f2a25"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"ac181f5e326be17b70d709f9240b26cf5a367ccf","unresolved":true,"context_lines":[{"line_number":2,"context_line":"//! messages as well as in nix-daemon communication."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"use serde::{Deserialize, Serialize};"},{"line_number":5,"context_line":"use serde_repr::{Deserialize_repr, Serialize_repr};"},{"line_number":6,"context_line":"use tracing::warn;"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"/// Every \"internal-json\" log line emitted by Nix has this prefix."}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"a0df4404_65c0efc7","line":5,"in_reply_to":"f3a3ac20_c10c12f3","updated":"2025-03-02 15:23:59.000000000","message":"Ah, `num_enum::TryFromPrimitive` (instead of `num_enum::FromPrimitive`) was the right clue - I really didn\u0027t like having to specify a `#[default]` for the other structs (and silently shortcutting unknown representations to this default).\n\nI\u0027ll use TryFromPrimitive there, allowing to get rid of serde_repr.\n\nWonder if we should switch `VerbosityLevel` to a version without `#[default]` too, WDYT?","commit_id":"1e99576a8076d3b2046e61073bd84a17ba3f2a25"},{"author":{"_account_id":1000082,"name":"Brian Olsen","display_name":"griff","email":"me@griff.name","username":"griff"},"change_message_id":"dc1fa4423785bca8404e5998a5b2ae120543235f","unresolved":true,"context_lines":[{"line_number":121,"context_line":"    String(#[serde(serialize_with \u003d \"serialize_bytes_as_string\")] std::borrow::Cow\u003c\u0027a, [u8]\u003e),"},{"line_number":122,"context_line":"}"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"#[derive(Clone, Debug, Eq, PartialEq, Serialize_repr, Deserialize_repr)]"},{"line_number":125,"context_line":"#[repr(u8)]"},{"line_number":126,"context_line":"pub enum ActivityType {"},{"line_number":127,"context_line":"    Unknown \u003d 0,"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"9b581047_e9be4c55","line":124,"updated":"2025-03-02 14:25:26.000000000","message":"Use of Serialize_repr can also be replaced by normal Serde combined with TryFromPrimitive and IntoPrimitive and the `try_from\u003d\"u8\", into\u003d\"u8\"` trick here. \n\n```suggestion\n#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, num_enum::TryFromPrimitive, num_enum::IntoPrimitive)]\n#[serde(try_from\u003d\"u8\", into\u003d\"u8\")]\n```\n\nIt might actually make sense to decide on one common way to represent and serialize these number enums and use that everywhere.","commit_id":"1e99576a8076d3b2046e61073bd84a17ba3f2a25"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"ac181f5e326be17b70d709f9240b26cf5a367ccf","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    String(#[serde(serialize_with \u003d \"serialize_bytes_as_string\")] std::borrow::Cow\u003c\u0027a, [u8]\u003e),"},{"line_number":122,"context_line":"}"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"#[derive(Clone, Debug, Eq, PartialEq, Serialize_repr, Deserialize_repr)]"},{"line_number":125,"context_line":"#[repr(u8)]"},{"line_number":126,"context_line":"pub enum ActivityType {"},{"line_number":127,"context_line":"    Unknown \u003d 0,"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"34c9ec8c_7e4b09c7","line":124,"in_reply_to":"9b581047_e9be4c55","updated":"2025-03-02 15:23:59.000000000","message":"Acknowledged","commit_id":"1e99576a8076d3b2046e61073bd84a17ba3f2a25"},{"author":{"_account_id":1000082,"name":"Brian Olsen","display_name":"griff","email":"me@griff.name","username":"griff"},"change_message_id":"dc1fa4423785bca8404e5998a5b2ae120543235f","unresolved":true,"context_lines":[{"line_number":165,"context_line":"    }"},{"line_number":166,"context_line":"}"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"#[derive(Clone, Debug, Eq, PartialEq, Serialize_repr, Deserialize_repr)]"},{"line_number":169,"context_line":"#[repr(u8)]"},{"line_number":170,"context_line":"pub enum ResultType {"},{"line_number":171,"context_line":"    FileLinked \u003d 100,"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"6f7535ce_895fd33d","line":168,"updated":"2025-03-02 14:25:26.000000000","message":"This can also be `try_from\u003d\"u8\", into\u003d\"u8\"`\n```suggestion\n#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, num_enum::TryFromPrimitive, num_enum::IntoPrimitive)]\n#[serde(try_from\u003d\"u8\", into\u003d\"u8\")]\n```","commit_id":"1e99576a8076d3b2046e61073bd84a17ba3f2a25"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"18cfe464cf280d1c53d957d340ff36aa1f1fb379","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    }"},{"line_number":166,"context_line":"}"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"#[derive(Clone, Debug, Eq, PartialEq, Serialize_repr, Deserialize_repr)]"},{"line_number":169,"context_line":"#[repr(u8)]"},{"line_number":170,"context_line":"pub enum ResultType {"},{"line_number":171,"context_line":"    FileLinked \u003d 100,"}],"source_content_type":"text/x-rustsrc","patch_set":5,"id":"edad634d_1a6e2939","line":168,"in_reply_to":"6f7535ce_895fd33d","updated":"2025-03-02 15:24:13.000000000","message":"Done","commit_id":"1e99576a8076d3b2046e61073bd84a17ba3f2a25"},{"author":{"_account_id":1000082,"name":"Brian Olsen","display_name":"griff","email":"me@griff.name","username":"griff"},"change_message_id":"b41c2598986dc8bfcdeed0498eb388acb527bcf9","unresolved":true,"context_lines":[{"line_number":35,"context_line":"    Talkative \u003d 4,"},{"line_number":36,"context_line":"    Chatty \u003d 5,"},{"line_number":37,"context_line":"    Debug \u003d 6,"},{"line_number":38,"context_line":"    Vomit \u003d 7,"},{"line_number":39,"context_line":"}"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"impl std::fmt::Display for VerbosityLevel {"}],"source_content_type":"text/x-rustsrc","patch_set":9,"id":"30315064_a788990f","line":38,"updated":"2025-03-02 18:07:58.000000000","message":"I have considered making this change instead since it nicer deals with the too many `-v` problem by locking any higher values to `Vomit`.\n\n```suggestion\n    #[catch_all]\n    Vomit \u003d 7,\n```\n\nTo keep the values we would need to do something like below. But I think the corner case is better dealt with in the solution above.\n\n```suggestion\n    Vomit \u003d 7,\n    #[catch_all]\n    Custom(u16),\n```","commit_id":"bfffe72a410a44cb4e01505c7041719c2edd15d4"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"4073ea423bbb05eb56a5560e3da1e873a2e04e9d","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    Talkative \u003d 4,"},{"line_number":36,"context_line":"    Chatty \u003d 5,"},{"line_number":37,"context_line":"    Debug \u003d 6,"},{"line_number":38,"context_line":"    Vomit \u003d 7,"},{"line_number":39,"context_line":"}"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"impl std::fmt::Display for VerbosityLevel {"}],"source_content_type":"text/x-rustsrc","patch_set":9,"id":"aee5c222_fb4753ea","line":38,"in_reply_to":"30315064_a788990f","updated":"2025-03-03 16:20:42.000000000","message":"catch_all and default don\u0027t seem to compose. I think it\u0027s fine if we simply reject too high log levels we don\u0027t understand and that shouldn\u0027t be there.\n\nJust because you can cause nix to emit a higher log level that itself knows about doesn\u0027t mean we need to expect it on the wire protocol.\n\nI changed this to use TryFromPrimitive (and by this reject larger than Vomit level).","commit_id":"bfffe72a410a44cb4e01505c7041719c2edd15d4"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"d0dbc973b6b2419fb784630a34e059a082f1d556","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    Talkative \u003d 4,"},{"line_number":36,"context_line":"    Chatty \u003d 5,"},{"line_number":37,"context_line":"    Debug \u003d 6,"},{"line_number":38,"context_line":"    Vomit \u003d 7,"},{"line_number":39,"context_line":"}"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"impl std::fmt::Display for VerbosityLevel {"}],"source_content_type":"text/x-rustsrc","patch_set":9,"id":"4c85f51d_ac71bffd","line":38,"in_reply_to":"677e2463_cb7f5175","updated":"2025-03-03 16:55:39.000000000","message":"I couldn\u0027t set the default to error, while catch_alling everything else to Vomit.\n\nBut in any case, I think being more restrictive here and only allowing Verbosity levels that are supposed to exist, and rejecting others seems to be the nicer approach IMHO.","commit_id":"bfffe72a410a44cb4e01505c7041719c2edd15d4"},{"author":{"_account_id":1000082,"name":"Brian Olsen","display_name":"griff","email":"me@griff.name","username":"griff"},"change_message_id":"dfd595d664d4e53427dcd57c16855e78f744bf14","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    Talkative \u003d 4,"},{"line_number":36,"context_line":"    Chatty \u003d 5,"},{"line_number":37,"context_line":"    Debug \u003d 6,"},{"line_number":38,"context_line":"    Vomit \u003d 7,"},{"line_number":39,"context_line":"}"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"impl std::fmt::Display for VerbosityLevel {"}],"source_content_type":"text/x-rustsrc","patch_set":9,"id":"677e2463_cb7f5175","line":38,"in_reply_to":"aee5c222_fb4753ea","updated":"2025-03-03 16:42:03.000000000","message":"\u003e catch_all and default don\u0027t seem to compose.\n\nHuh? I use them together here: https://github.com/griff/Nix.rs/blob/main/nixrs/src/daemon/logger.rs#L34\nBut maybe it derializes wrong? I haven\u0027t tested that. Does it deserialize wrong?","commit_id":"bfffe72a410a44cb4e01505c7041719c2edd15d4"}]}
