)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"58ca833c439b4cde1f9425e113bda18c27c508a7","unresolved":false,"context_lines":[{"line_number":26,"context_line":"strings everywhere, instead opting to just convert to String/str when"},{"line_number":27,"context_line":"passing things into that - there *might* be something to be done there,"},{"line_number":28,"context_line":"but I don\u0027t know what the rules should be and I don\u0027t want to figure"},{"line_number":29,"context_line":"them out in this change."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"To deal with OS-native paths in a way that also works in WASM for"},{"line_number":32,"context_line":"tvixbolt, this also adds a dependency on the \"os_str_bytes\" crate."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"23f393d7_335fe6bb","line":29,"updated":"2024-01-31 09:32:56.000000000","message":"Regarding nix-compat, it might be true you can create non-UTF-8 environment keys. Maybe builder+arguments / system too.\n\nThis needs some checking on my side, and if so, needs threading all the way down (not just in this one occurence).\n\nI opened b/375, feel free to refer to its number here or drop the comment alltogether if you do another pass.","commit_id":"804ee828ce67c367a5d4139f20acb85ca83596c7"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"b3fefcbc4da1de251108b838efdd803d9bb6cd14","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"b5276c46_7beae59e","updated":"2023-12-07 18:48:07.000000000","message":"I rebased this and re-ran `crate2nix-generate`.","commit_id":"869c7b8154e43422e287e6c2d64b1e7f525fe6cd"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"3db2adecf880194e9fb2578804df3cf6c9a08b02","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":23,"id":"ee9490ed_e4707e7b","updated":"2024-01-20 00:32:19.000000000","message":"LGTM on the stuff I touched.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"a12e163e0d742ba94c670b2b8f906dfd833de73b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"a67abeaa_6b2ea518","updated":"2024-01-20 20:23:21.000000000","message":"Sorry for the rebase had this cherry-picked on a local branch and pushed it by accident. Hope this did not tip anything over…","commit_id":"e31315c230b67d5406e67c41bec896b10f43617a"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"df149bb3f63279042041a06962793bff669d50b1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":29,"id":"8a318927_6b997797","updated":"2024-01-31 09:58:29.000000000","message":"other than the two nits, LGTM.","commit_id":"804ee828ce67c367a5d4139f20acb85ca83596c7"}],"tvix/Cargo.nix":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"3a23a83d6e36981324d2ec8ea042e84be6d79df5","unresolved":true,"context_lines":[{"line_number":508,"context_line":"          {"},{"line_number":509,"context_line":"            name \u003d \"hermit-abi\";"},{"line_number":510,"context_line":"            packageId \u003d \"hermit-abi 0.1.19\";"},{"line_number":511,"context_line":"            target \u003d { target, features }: (\"hermit\" \u003d\u003d target.\"os\" or null);"},{"line_number":512,"context_line":"          }"},{"line_number":513,"context_line":"          {"},{"line_number":514,"context_line":"            name \u003d \"libc\";"}],"source_content_type":"text/x-nix","patch_set":3,"id":"667cf4da_3133613d","side":"PARENT","line":511,"updated":"2023-12-06 10:37:12.000000000","message":"did you re-generate Cargo.nix without cl/10082?","commit_id":"3c41fb320e7701be18f2118e8ea820a7173bf122"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"b3fefcbc4da1de251108b838efdd803d9bb6cd14","unresolved":false,"context_lines":[{"line_number":508,"context_line":"          {"},{"line_number":509,"context_line":"            name \u003d \"hermit-abi\";"},{"line_number":510,"context_line":"            packageId \u003d \"hermit-abi 0.1.19\";"},{"line_number":511,"context_line":"            target \u003d { target, features }: (\"hermit\" \u003d\u003d target.\"os\" or null);"},{"line_number":512,"context_line":"          }"},{"line_number":513,"context_line":"          {"},{"line_number":514,"context_line":"            name \u003d \"libc\";"}],"source_content_type":"text/x-nix","patch_set":3,"id":"c92f160f_40bcadb2","side":"PARENT","line":511,"in_reply_to":"667cf4da_3133613d","updated":"2023-12-07 18:48:07.000000000","message":"Done","commit_id":"3c41fb320e7701be18f2118e8ea820a7173bf122"}],"tvix/eval/src/builtins/mod.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"3db2adecf880194e9fb2578804df3cf6c9a08b02","unresolved":true,"context_lines":[{"line_number":204,"context_line":"                .to_contextful_str()?,"},{"line_number":205,"context_line":"        };"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        let (s, ctx) \u003d s.into_parts();"},{"line_number":208,"context_line":"        Ok(NixString::from_parts("},{"line_number":209,"context_line":"            s.rfind_char(\u0027/\u0027)"},{"line_number":210,"context_line":"                .map(|last_slash| s[(last_slash + 1)..].to_owned().into())"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"5a9db296_148fbbe8","line":207,"updated":"2024-01-20 00:32:19.000000000","message":"@flokli@flokli.de we went through the discussion of naming on this and it\u0027s back to something that does not contain the word `context`, is that fine to you? I personally don\u0027t care.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e071eb4f589cee6ce281dfcc3abdfdcae083224d","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                .to_contextful_str()?,"},{"line_number":205,"context_line":"        };"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        let (s, ctx) \u003d s.into_parts();"},{"line_number":208,"context_line":"        Ok(NixString::from_parts("},{"line_number":209,"context_line":"            s.rfind_char(\u0027/\u0027)"},{"line_number":210,"context_line":"                .map(|last_slash| s[(last_slash + 1)..].to_owned().into())"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"fc505c9c_93b7a0e6","line":207,"in_reply_to":"30cb9797_98fe5330","updated":"2024-01-30 17:34:27.000000000","message":"function is gone now.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"2b37e44c9c7c515895546324588da4d9c2bc9634","unresolved":true,"context_lines":[{"line_number":204,"context_line":"                .to_contextful_str()?,"},{"line_number":205,"context_line":"        };"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        let (s, ctx) \u003d s.into_parts();"},{"line_number":208,"context_line":"        Ok(NixString::from_parts("},{"line_number":209,"context_line":"            s.rfind_char(\u0027/\u0027)"},{"line_number":210,"context_line":"                .map(|last_slash| s[(last_slash + 1)..].to_owned().into())"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"62e2327e_74755842","line":207,"in_reply_to":"5a9db296_148fbbe8","updated":"2024-01-21 15:40:41.000000000","message":"why do we need the word context here? that\u0027s obvious from the type of the secondd argument","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"74df38c6d69a7c6fbfd078c54edd458c16a5127b","unresolved":true,"context_lines":[{"line_number":204,"context_line":"                .to_contextful_str()?,"},{"line_number":205,"context_line":"        };"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        let (s, ctx) \u003d s.into_parts();"},{"line_number":208,"context_line":"        Ok(NixString::from_parts("},{"line_number":209,"context_line":"            s.rfind_char(\u0027/\u0027)"},{"line_number":210,"context_line":"                .map(|last_slash| s[(last_slash + 1)..].to_owned().into())"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"30cb9797_98fe5330","line":207,"in_reply_to":"62e2327e_74755842","updated":"2024-01-21 15:44:06.000000000","message":"Well, if you don\u0027t have types around, arguably, this would be nicer for code review.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"3db2adecf880194e9fb2578804df3cf6c9a08b02","unresolved":true,"context_lines":[{"line_number":358,"context_line":"                Err(c) \u003d\u003e return Ok(Value::Catchable(c)),"},{"line_number":359,"context_line":"            }"},{"line_number":360,"context_line":"        }"},{"line_number":361,"context_line":"        // FIXME: pass immediately the string res."},{"line_number":362,"context_line":"        Ok(NixString::new_context_from(context, res).into())"},{"line_number":363,"context_line":"    }"},{"line_number":364,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"353f571d_a65911ad","line":361,"updated":"2024-01-20 00:32:19.000000000","message":"you can drop this I think now","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e5edf5f80d5446edc62b7de777494e9e79a8f8f6","unresolved":false,"context_lines":[{"line_number":358,"context_line":"                Err(c) \u003d\u003e return Ok(Value::Catchable(c)),"},{"line_number":359,"context_line":"            }"},{"line_number":360,"context_line":"        }"},{"line_number":361,"context_line":"        // FIXME: pass immediately the string res."},{"line_number":362,"context_line":"        Ok(NixString::new_context_from(context, res).into())"},{"line_number":363,"context_line":"    }"},{"line_number":364,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"3f2c5e2f_c38e659f","line":361,"in_reply_to":"353f571d_a65911ad","updated":"2024-01-21 15:40:00.000000000","message":"Done","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"3db2adecf880194e9fb2578804df3cf6c9a08b02","unresolved":true,"context_lines":[{"line_number":404,"context_line":"                OsString::assert_from_raw_vec(result.to_owned()),"},{"line_number":405,"context_line":"            ))))"},{"line_number":406,"context_line":"        } else {"},{"line_number":407,"context_line":"            Ok(Value::String(NixString::new_inherit_context_from("},{"line_number":408,"context_line":"                \u0026str,"},{"line_number":409,"context_line":"                result.into(),"},{"line_number":410,"context_line":"            )))"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"93bea8b3_8a44bbe5","line":407,"updated":"2024-01-20 00:32:19.000000000","message":"Not sure if I understand that now there\u0027s `into_parts`, `from_parts` and `new_inherit_context_from`, cc @flokli@flokli.de","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e5edf5f80d5446edc62b7de777494e9e79a8f8f6","unresolved":true,"context_lines":[{"line_number":404,"context_line":"                OsString::assert_from_raw_vec(result.to_owned()),"},{"line_number":405,"context_line":"            ))))"},{"line_number":406,"context_line":"        } else {"},{"line_number":407,"context_line":"            Ok(Value::String(NixString::new_inherit_context_from("},{"line_number":408,"context_line":"                \u0026str,"},{"line_number":409,"context_line":"                result.into(),"},{"line_number":410,"context_line":"            )))"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"b3c2bfac_1f958851","line":407,"in_reply_to":"93bea8b3_8a44bbe5","updated":"2024-01-21 15:40:00.000000000","message":"This is all done primarily to avoid unnecessary cloning","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e071eb4f589cee6ce281dfcc3abdfdcae083224d","unresolved":false,"context_lines":[{"line_number":404,"context_line":"                OsString::assert_from_raw_vec(result.to_owned()),"},{"line_number":405,"context_line":"            ))))"},{"line_number":406,"context_line":"        } else {"},{"line_number":407,"context_line":"            Ok(Value::String(NixString::new_inherit_context_from("},{"line_number":408,"context_line":"                \u0026str,"},{"line_number":409,"context_line":"                result.into(),"},{"line_number":410,"context_line":"            )))"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"d3b5dcfa_0e453fd9","line":407,"in_reply_to":"b3c2bfac_1f958851","updated":"2024-01-30 17:34:27.000000000","message":"gone now.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"3db2adecf880194e9fb2578804df3cf6c9a08b02","unresolved":true,"context_lines":[{"line_number":1308,"context_line":"            }"},{"line_number":1309,"context_line":"        }"},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"        // FIXME: consume directly the String."},{"line_number":1312,"context_line":"        Ok(Value::String(NixString::new_context_from(context, res)))"},{"line_number":1313,"context_line":"    }"},{"line_number":1314,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"16d64b27_0a98cb9a","line":1311,"updated":"2024-01-20 00:32:19.000000000","message":"can be dropped","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e5edf5f80d5446edc62b7de777494e9e79a8f8f6","unresolved":false,"context_lines":[{"line_number":1308,"context_line":"            }"},{"line_number":1309,"context_line":"        }"},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"        // FIXME: consume directly the String."},{"line_number":1312,"context_line":"        Ok(Value::String(NixString::new_context_from(context, res)))"},{"line_number":1313,"context_line":"    }"},{"line_number":1314,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"c3fb36a0_6bf7a654","line":1311,"in_reply_to":"16d64b27_0a98cb9a","updated":"2024-01-21 15:40:00.000000000","message":"Done","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"58ca833c439b4cde1f9425e113bda18c27c508a7","unresolved":true,"context_lines":[{"line_number":1308,"context_line":"            }"},{"line_number":1309,"context_line":"        }"},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"        // FIXME: consume directly the String."},{"line_number":1312,"context_line":"        Ok(Value::String(NixString::new_context_from(context, res)))"},{"line_number":1313,"context_line":"    }"},{"line_number":1314,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":29,"id":"cff06f75_eac86803","line":1311,"updated":"2024-01-31 09:32:56.000000000","message":"This is solved now, no?","commit_id":"804ee828ce67c367a5d4139f20acb85ca83596c7"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"1bf44903f4b3387bc900f4d504e9327baa43f291","unresolved":false,"context_lines":[{"line_number":1308,"context_line":"            }"},{"line_number":1309,"context_line":"        }"},{"line_number":1310,"context_line":""},{"line_number":1311,"context_line":"        // FIXME: consume directly the String."},{"line_number":1312,"context_line":"        Ok(Value::String(NixString::new_context_from(context, res)))"},{"line_number":1313,"context_line":"    }"},{"line_number":1314,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":29,"id":"6728a861_3fbed9e4","line":1311,"in_reply_to":"cff06f75_eac86803","updated":"2024-01-31 14:38:13.000000000","message":"Done","commit_id":"804ee828ce67c367a5d4139f20acb85ca83596c7"}],"tvix/eval/src/builtins/versions.rs":[{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"22ab3b302d0a20c6aa8eda8f33afb0d470afcc09","unresolved":true,"context_lines":[{"line_number":58,"context_line":"/// This can then be directly used to compare two versions"},{"line_number":59,"context_line":"pub struct VersionPartsIter\u003c\u0027a\u003e {"},{"line_number":60,"context_line":"    cached_part: InternalPart,"},{"line_number":61,"context_line":"    iter: bstr::CharIndices\u003c\u0027a\u003e,"},{"line_number":62,"context_line":"    version: \u0026\u0027a BStr,"},{"line_number":63,"context_line":"}"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"b23ce703_7accacbf","line":61,"updated":"2024-01-20 20:14:04.000000000","message":"Can you add a TODO here that we iterate by byte? C++ Nix can do this even if non-unicode garbage is in the string, so it\u0027d be neat to also be able to do so, although it is a niche occurrence probably.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e5edf5f80d5446edc62b7de777494e9e79a8f8f6","unresolved":false,"context_lines":[{"line_number":58,"context_line":"/// This can then be directly used to compare two versions"},{"line_number":59,"context_line":"pub struct VersionPartsIter\u003c\u0027a\u003e {"},{"line_number":60,"context_line":"    cached_part: InternalPart,"},{"line_number":61,"context_line":"    iter: bstr::CharIndices\u003c\u0027a\u003e,"},{"line_number":62,"context_line":"    version: \u0026\u0027a BStr,"},{"line_number":63,"context_line":"}"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"6077ee08_e87bb0c6","line":61,"in_reply_to":"b23ce703_7accacbf","updated":"2024-01-21 15:40:00.000000000","message":"Done","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"}],"tvix/eval/src/errors.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"3db2adecf880194e9fb2578804df3cf6c9a08b02","unresolved":true,"context_lines":[{"line_number":178,"context_line":"        formals_span: Span,"},{"line_number":179,"context_line":"    },"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    /// Invalid UTF-8 was encoutered somewhere"},{"line_number":182,"context_line":"    Utf8,"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    /// Errors while serialising to XML."}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"0b733ce3_cee79a83","line":181,"updated":"2024-01-20 00:32:19.000000000","message":"typo: encountered","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e5edf5f80d5446edc62b7de777494e9e79a8f8f6","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        formals_span: Span,"},{"line_number":179,"context_line":"    },"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    /// Invalid UTF-8 was encoutered somewhere"},{"line_number":182,"context_line":"    Utf8,"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    /// Errors while serialising to XML."}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"617cc57b_b04f8d5d","line":181,"in_reply_to":"0b733ce3_cee79a83","updated":"2024-01-21 15:40:00.000000000","message":"Done","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"}],"tvix/eval/src/value/mod.rs":[{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"22ab3b302d0a20c6aa8eda8f33afb0d470afcc09","unresolved":true,"context_lines":[{"line_number":342,"context_line":"                // general consideration anyways, since one current discrepancy between"},{"line_number":343,"context_line":"                // C++ Nix and Tvix is that the former\u0027s strings are arbitrary byte"},{"line_number":344,"context_line":"                // sequences without NUL bytes, whereas Tvix only allows valid"},{"line_number":345,"context_line":"                // Unicode. See also b/189."},{"line_number":346,"context_line":"                ("},{"line_number":347,"context_line":"                    Value::Path(p),"},{"line_number":348,"context_line":"                    CoercionKind {"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"17478a19_0c8f7f36","line":345,"updated":"2024-01-20 20:14:04.000000000","message":"I think this comment is addressed by your change?","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e5edf5f80d5446edc62b7de777494e9e79a8f8f6","unresolved":false,"context_lines":[{"line_number":342,"context_line":"                // general consideration anyways, since one current discrepancy between"},{"line_number":343,"context_line":"                // C++ Nix and Tvix is that the former\u0027s strings are arbitrary byte"},{"line_number":344,"context_line":"                // sequences without NUL bytes, whereas Tvix only allows valid"},{"line_number":345,"context_line":"                // Unicode. See also b/189."},{"line_number":346,"context_line":"                ("},{"line_number":347,"context_line":"                    Value::Path(p),"},{"line_number":348,"context_line":"                    CoercionKind {"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"99ba3e6e_a36ffb06","line":345,"in_reply_to":"17478a19_0c8f7f36","updated":"2024-01-21 15:40:00.000000000","message":"Done","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"22ab3b302d0a20c6aa8eda8f33afb0d470afcc09","unresolved":true,"context_lines":[{"line_number":395,"context_line":""},{"line_number":396,"context_line":"                // strong coercions"},{"line_number":397,"context_line":"                (Value::Null, CoercionKind { strong: true, .. })"},{"line_number":398,"context_line":"                | (Value::Bool(false), CoercionKind { strong: true, .. }) \u003d\u003e Ok(\"\".into()),"},{"line_number":399,"context_line":"                (Value::Bool(true), CoercionKind { strong: true, .. }) \u003d\u003e Ok(\"1\".into()),"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"                (Value::Integer(i), CoercionKind { strong: true, .. }) \u003d\u003e Ok(format!(\"{i}\").into()),"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"262583de_65e66805","line":398,"updated":"2024-01-20 20:14:04.000000000","message":"Should we use `B(\"\")` here or does that not matter w.r.t. optimization?","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e5edf5f80d5446edc62b7de777494e9e79a8f8f6","unresolved":false,"context_lines":[{"line_number":395,"context_line":""},{"line_number":396,"context_line":"                // strong coercions"},{"line_number":397,"context_line":"                (Value::Null, CoercionKind { strong: true, .. })"},{"line_number":398,"context_line":"                | (Value::Bool(false), CoercionKind { strong: true, .. }) \u003d\u003e Ok(\"\".into()),"},{"line_number":399,"context_line":"                (Value::Bool(true), CoercionKind { strong: true, .. }) \u003d\u003e Ok(\"1\".into()),"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"                (Value::Integer(i), CoercionKind { strong: true, .. }) \u003d\u003e Ok(format!(\"{i}\").into()),"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"4310d671_ee5981c1","line":398,"in_reply_to":"262583de_65e66805","updated":"2024-01-21 15:40:00.000000000","message":"it can\u0027t matter - we have to return a BString here no matter what, so we always have to allocate on the heap (though i doubt this *really* matters)","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"}],"tvix/eval/src/value/string.rs":[{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"b3fefcbc4da1de251108b838efdd803d9bb6cd14","unresolved":true,"context_lines":[{"line_number":1,"context_line":"//! This module mplements Nix language strings."},{"line_number":2,"context_line":"//!"},{"line_number":3,"context_line":"//! Nix language strings never need to be modified on the language"},{"line_number":4,"context_line":"//! level, allowing us to shave off some memory overhead and only"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"a03f690d_e4877401","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":25},"updated":"2023-12-07 18:48:07.000000000","message":"i hink e ost a haracter ere","commit_id":"869c7b8154e43422e287e6c2d64b1e7f525fe6cd"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"d36373f4e3e8f9004d9458f136b3abee8445729c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"//! This module mplements Nix language strings."},{"line_number":2,"context_line":"//!"},{"line_number":3,"context_line":"//! Nix language strings never need to be modified on the language"},{"line_number":4,"context_line":"//! level, allowing us to shave off some memory overhead and only"}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"a8eb00fd_1102c891","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":25},"in_reply_to":"a03f690d_e4877401","updated":"2023-12-07 19:14:44.000000000","message":"Done","commit_id":"869c7b8154e43422e287e6c2d64b1e7f525fe6cd"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"22ab3b302d0a20c6aa8eda8f33afb0d470afcc09","unresolved":true,"context_lines":[{"line_number":2,"context_line":"//!"},{"line_number":3,"context_line":"//! Nix language strings never need to be modified on the language"},{"line_number":4,"context_line":"//! level, allowing us to shave off some memory overhead and only"},{"line_number":5,"context_line":"//! paying the cost when creating new strings."},{"line_number":6,"context_line":"use bstr::{BStr, BString, ByteSlice, Chars};"},{"line_number":7,"context_line":"use rnix::ast;"},{"line_number":8,"context_line":"use std::borrow::{Borrow, Cow};"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"b5b91aa4_936081e7","line":5,"updated":"2024-01-20 20:14:04.000000000","message":"Doesn\u0027t this reference the previous use of `Box\u003cstr\u003e`? Maybe needs updating.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e5edf5f80d5446edc62b7de777494e9e79a8f8f6","unresolved":false,"context_lines":[{"line_number":2,"context_line":"//!"},{"line_number":3,"context_line":"//! Nix language strings never need to be modified on the language"},{"line_number":4,"context_line":"//! level, allowing us to shave off some memory overhead and only"},{"line_number":5,"context_line":"//! paying the cost when creating new strings."},{"line_number":6,"context_line":"use bstr::{BStr, BString, ByteSlice, Chars};"},{"line_number":7,"context_line":"use rnix::ast;"},{"line_number":8,"context_line":"use std::borrow::{Borrow, Cow};"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"9b144c42_30e3ed3f","line":5,"in_reply_to":"b5b91aa4_936081e7","updated":"2024-01-21 15:40:00.000000000","message":"Done","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"22ab3b302d0a20c6aa8eda8f33afb0d470afcc09","unresolved":true,"context_lines":[{"line_number":212,"context_line":""},{"line_number":213,"context_line":"impl From\u003c(String, Option\u003cNixContext\u003e)\u003e for NixString {"},{"line_number":214,"context_line":"    fn from((s, ctx): (String, Option\u003cNixContext\u003e)) -\u003e Self {"},{"line_number":215,"context_line":"        NixString(s.into(), ctx)"},{"line_number":216,"context_line":"    }"},{"line_number":217,"context_line":"}"},{"line_number":218,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"ae11861e_6536614f","line":215,"updated":"2024-01-20 20:14:04.000000000","message":"`Self`?","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e5edf5f80d5446edc62b7de777494e9e79a8f8f6","unresolved":false,"context_lines":[{"line_number":212,"context_line":""},{"line_number":213,"context_line":"impl From\u003c(String, Option\u003cNixContext\u003e)\u003e for NixString {"},{"line_number":214,"context_line":"    fn from((s, ctx): (String, Option\u003cNixContext\u003e)) -\u003e Self {"},{"line_number":215,"context_line":"        NixString(s.into(), ctx)"},{"line_number":216,"context_line":"    }"},{"line_number":217,"context_line":"}"},{"line_number":218,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"1b0deb37_033b89c8","line":215,"in_reply_to":"ae11861e_6536614f","updated":"2024-01-21 15:40:00.000000000","message":"Done","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"22ab3b302d0a20c6aa8eda8f33afb0d470afcc09","unresolved":true,"context_lines":[{"line_number":216,"context_line":"    }"},{"line_number":217,"context_line":"}"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"impl From\u003cBox\u003cstr\u003e\u003e for NixString {"},{"line_number":220,"context_line":"    fn from(s: Box\u003cstr\u003e) -\u003e Self {"},{"line_number":221,"context_line":"        Self(s.into_boxed_bytes().into_vec().into(), None)"},{"line_number":222,"context_line":"    }"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"6c83b6a4_384eadc3","line":219,"updated":"2024-01-20 20:14:04.000000000","message":"Does it make sense keeping this instance if it is no longer the internal representation of `NixString`? The appeal of this before would have been that it\u0027s basically free, but not anymore, right?","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e5edf5f80d5446edc62b7de777494e9e79a8f8f6","unresolved":false,"context_lines":[{"line_number":216,"context_line":"    }"},{"line_number":217,"context_line":"}"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"impl From\u003cBox\u003cstr\u003e\u003e for NixString {"},{"line_number":220,"context_line":"    fn from(s: Box\u003cstr\u003e) -\u003e Self {"},{"line_number":221,"context_line":"        Self(s.into_boxed_bytes().into_vec().into(), None)"},{"line_number":222,"context_line":"    }"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"5683a9e6_e9e8b663","line":219,"in_reply_to":"6c83b6a4_384eadc3","updated":"2024-01-21 15:40:00.000000000","message":"Done","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"c919a35486fbd4bbbd90e4de44f653bfa5448fbc","unresolved":true,"context_lines":[{"line_number":291,"context_line":"    }"},{"line_number":292,"context_line":"}"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"impl Deref for NixString {"},{"line_number":295,"context_line":"    type Target \u003d BString;"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    fn deref(\u0026self) -\u003e \u0026Self::Target {"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"14cbffcc_3e2f805f","line":294,"updated":"2024-01-20 08:15:40.000000000","message":"I\u0027d be careful with this, it\u0027s very easy to discard the context here by accident, if we deref to BString and then .into() a NixString again.\n\nI\u0027d prefer this to be more explicit, but also ok to be convinced otherwise.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e5edf5f80d5446edc62b7de777494e9e79a8f8f6","unresolved":true,"context_lines":[{"line_number":291,"context_line":"    }"},{"line_number":292,"context_line":"}"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"impl Deref for NixString {"},{"line_number":295,"context_line":"    type Target \u003d BString;"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    fn deref(\u0026self) -\u003e \u0026Self::Target {"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"9d1038be_cffb4ba7","line":294,"in_reply_to":"14cbffcc_3e2f805f","updated":"2024-01-21 15:40:00.000000000","message":"I think that kind of \"avoid doing a thing by accident\" stuff should be covered by tests - not having this here is *really* annoying and verbose at the call site.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e071eb4f589cee6ce281dfcc3abdfdcae083224d","unresolved":false,"context_lines":[{"line_number":291,"context_line":"    }"},{"line_number":292,"context_line":"}"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"impl Deref for NixString {"},{"line_number":295,"context_line":"    type Target \u003d BString;"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    fn deref(\u0026self) -\u003e \u0026Self::Target {"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"a7503ebe_979fa5ef","line":294,"in_reply_to":"9d1038be_cffb4ba7","updated":"2024-01-30 17:34:27.000000000","message":"resolving, since this hasn\u0027t been replied to - please feel free to unresolve if you feel very strongly about this (but I will say it\u0027s *really* annoying to not have this)","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"c919a35486fbd4bbbd90e4de44f653bfa5448fbc","unresolved":true,"context_lines":[{"line_number":321,"context_line":"        Self(new_contents, other.1.clone())"},{"line_number":322,"context_line":"    }"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    pub fn new_context_from(context: NixContext, contents: BString) -\u003e Self {"},{"line_number":325,"context_line":"        Self("},{"line_number":326,"context_line":"            contents,"},{"line_number":327,"context_line":"            if context.is_empty() {"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"3e63ebb9_8e1f0dee","line":324,"updated":"2024-01-20 08:15:40.000000000","message":"The aim was to keep the NixContext type somewhat private, and have operations on NixString take care of contexta as much as possible.\n\nAlso see how you previously couldn\u0027t really *access* the context, just iterate over some of its elements.\n\nSo it could at some point be put into a feature flag.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"22ab3b302d0a20c6aa8eda8f33afb0d470afcc09","unresolved":true,"context_lines":[{"line_number":321,"context_line":"        Self(new_contents, other.1.clone())"},{"line_number":322,"context_line":"    }"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    pub fn new_context_from(context: NixContext, contents: BString) -\u003e Self {"},{"line_number":325,"context_line":"        Self("},{"line_number":326,"context_line":"            contents,"},{"line_number":327,"context_line":"            if context.is_empty() {"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"bfadbe76_803fc77b","line":324,"in_reply_to":"3e63ebb9_8e1f0dee","updated":"2024-01-20 20:14:04.000000000","message":"The type of the function is equivalent before and after, so I don\u0027t think this is relevant to this CL.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e071eb4f589cee6ce281dfcc3abdfdcae083224d","unresolved":false,"context_lines":[{"line_number":321,"context_line":"        Self(new_contents, other.1.clone())"},{"line_number":322,"context_line":"    }"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    pub fn new_context_from(context: NixContext, contents: BString) -\u003e Self {"},{"line_number":325,"context_line":"        Self("},{"line_number":326,"context_line":"            contents,"},{"line_number":327,"context_line":"            if context.is_empty() {"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"4a369b79_a8357534","line":324,"in_reply_to":"46f940b7_9e7ac437","updated":"2024-01-30 17:34:27.000000000","message":"Done","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"cce0ec44a593a6e47ca978ae92124d61f6f9c454","unresolved":true,"context_lines":[{"line_number":321,"context_line":"        Self(new_contents, other.1.clone())"},{"line_number":322,"context_line":"    }"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    pub fn new_context_from(context: NixContext, contents: BString) -\u003e Self {"},{"line_number":325,"context_line":"        Self("},{"line_number":326,"context_line":"            contents,"},{"line_number":327,"context_line":"            if context.is_empty() {"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"e15dce07_a8ffa75f","line":324,"in_reply_to":"5af7ceed_d5317ab4","updated":"2024-01-22 20:06:01.000000000","message":"I may have fucked up and misrebased, @root@gws.fyi I\u0027m so sorry if so… patchet 27 is me I guess.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"ef641c99f93928f6dc17f3a1de4e06a79df5b132","unresolved":true,"context_lines":[{"line_number":321,"context_line":"        Self(new_contents, other.1.clone())"},{"line_number":322,"context_line":"    }"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    pub fn new_context_from(context: NixContext, contents: BString) -\u003e Self {"},{"line_number":325,"context_line":"        Self("},{"line_number":326,"context_line":"            contents,"},{"line_number":327,"context_line":"            if context.is_empty() {"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"5af7ceed_d5317ab4","line":324,"in_reply_to":"baa1ecdd_770eccf4","updated":"2024-01-21 21:53:51.000000000","message":"Where did into_parts go? I don\u0027t find it anymore in this CL.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e5edf5f80d5446edc62b7de777494e9e79a8f8f6","unresolved":true,"context_lines":[{"line_number":321,"context_line":"        Self(new_contents, other.1.clone())"},{"line_number":322,"context_line":"    }"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    pub fn new_context_from(context: NixContext, contents: BString) -\u003e Self {"},{"line_number":325,"context_line":"        Self("},{"line_number":326,"context_line":"            contents,"},{"line_number":327,"context_line":"            if context.is_empty() {"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"baa1ecdd_770eccf4","line":324,"in_reply_to":"bfadbe76_803fc77b","updated":"2024-01-21 15:40:00.000000000","message":"Also, having `into_parts` and `from_parts` avoids a fair bit of unnecessary cloning","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"f4d6b9f2a63897b32f02e2d702a1b3215d1816b9","unresolved":true,"context_lines":[{"line_number":321,"context_line":"        Self(new_contents, other.1.clone())"},{"line_number":322,"context_line":"    }"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    pub fn new_context_from(context: NixContext, contents: BString) -\u003e Self {"},{"line_number":325,"context_line":"        Self("},{"line_number":326,"context_line":"            contents,"},{"line_number":327,"context_line":"            if context.is_empty() {"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"46f940b7_9e7ac437","line":324,"in_reply_to":"e15dce07_a8ffa75f","updated":"2024-01-23 14:53:29.000000000","message":"`into_parts` and `from_parts` are indeed still around, I was just for some reason diffing two revisions and got confused comewhat. Sorry for the noise regarding that.\n\n----\n\nRegarding `into_parts` and `from_parts` in general - these are only used in https://cl.tvl.fyi/c/depot/+/10200/comment/5a9db296_148fbbe8/ (`baseNameOf`), which does replace the BString with a smaller one, leaving the context untouched.\n\nI\u0027d much prefer if we\u0027d have some utility function that allows replacing the inner BString with another one (for example, by having a mutable reference, or taking the owned Bstring and returning it back (or an error).\n\nI\u0027d assume we could use that same helper for things like substring as well, rather than reassembling with context from the old NixString.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"22ab3b302d0a20c6aa8eda8f33afb0d470afcc09","unresolved":true,"context_lines":[{"line_number":361,"context_line":"    pub fn ident_str(\u0026self) -\u003e Cow\u003cstr\u003e {"},{"line_number":362,"context_line":"        let escaped \u003d match self.to_str_lossy() {"},{"line_number":363,"context_line":"            Cow::Borrowed(s) \u003d\u003e nix_escape_string(s),"},{"line_number":364,"context_line":"            Cow::Owned(s) \u003d\u003e nix_escape_string(\u0026s).into_owned().into(),"},{"line_number":365,"context_line":"        };"},{"line_number":366,"context_line":"        match escaped {"},{"line_number":367,"context_line":"            // A borrowed string is unchanged and can be returned as"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"8ad423e4_bb5cf03b","line":364,"range":{"start_line":364,"start_character":29,"end_line":364,"end_character":46},"updated":"2024-01-20 20:14:04.000000000","message":"Technically, `nix_escape_string()` is a byte array -\u003e byte array transformation, but I\u0027m happy to push these changes to a later issue/CL, since it kind of requires thinking about another can of worms entirely (whether printing should just vomit bytes, since that\u0027d be technically correct if you want output to be equivalent to the expression that produced it in as many cases as possible…).","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"aae328c874df5fd0bb94e71328bc9ce0abc78de1","unresolved":false,"context_lines":[{"line_number":361,"context_line":"    pub fn ident_str(\u0026self) -\u003e Cow\u003cstr\u003e {"},{"line_number":362,"context_line":"        let escaped \u003d match self.to_str_lossy() {"},{"line_number":363,"context_line":"            Cow::Borrowed(s) \u003d\u003e nix_escape_string(s),"},{"line_number":364,"context_line":"            Cow::Owned(s) \u003d\u003e nix_escape_string(\u0026s).into_owned().into(),"},{"line_number":365,"context_line":"        };"},{"line_number":366,"context_line":"        match escaped {"},{"line_number":367,"context_line":"            // A borrowed string is unchanged and can be returned as"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"c89fe700_d1027b03","line":364,"range":{"start_line":364,"start_character":29,"end_line":364,"end_character":46},"in_reply_to":"428bc424_c1c6fb8a","updated":"2024-01-21 16:52:01.000000000","message":"Acknowledged","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e5edf5f80d5446edc62b7de777494e9e79a8f8f6","unresolved":true,"context_lines":[{"line_number":361,"context_line":"    pub fn ident_str(\u0026self) -\u003e Cow\u003cstr\u003e {"},{"line_number":362,"context_line":"        let escaped \u003d match self.to_str_lossy() {"},{"line_number":363,"context_line":"            Cow::Borrowed(s) \u003d\u003e nix_escape_string(s),"},{"line_number":364,"context_line":"            Cow::Owned(s) \u003d\u003e nix_escape_string(\u0026s).into_owned().into(),"},{"line_number":365,"context_line":"        };"},{"line_number":366,"context_line":"        match escaped {"},{"line_number":367,"context_line":"            // A borrowed string is unchanged and can be returned as"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"428bc424_c1c6fb8a","line":364,"range":{"start_line":364,"start_character":29,"end_line":364,"end_character":46},"in_reply_to":"8ad423e4_bb5cf03b","updated":"2024-01-21 15:40:00.000000000","message":"yeah, I\u0027d like to push this off","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"}],"tvix/eval/src/vm/mod.rs":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"3db2adecf880194e9fb2578804df3cf6c9a08b02","unresolved":true,"context_lines":[{"line_number":987,"context_line":"            }"},{"line_number":988,"context_line":"        }"},{"line_number":989,"context_line":""},{"line_number":990,"context_line":"        // FIXME: consume immediately here the String."},{"line_number":991,"context_line":"        self.stack"},{"line_number":992,"context_line":"            .push(Value::String(NixString::new_context_from(context, out)));"},{"line_number":993,"context_line":"        Ok(())"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"0ad608ea_776990c6","line":990,"updated":"2024-01-20 00:32:19.000000000","message":"can be dropped","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e5edf5f80d5446edc62b7de777494e9e79a8f8f6","unresolved":false,"context_lines":[{"line_number":987,"context_line":"            }"},{"line_number":988,"context_line":"        }"},{"line_number":989,"context_line":""},{"line_number":990,"context_line":"        // FIXME: consume immediately here the String."},{"line_number":991,"context_line":"        self.stack"},{"line_number":992,"context_line":"            .push(Value::String(NixString::new_context_from(context, out)));"},{"line_number":993,"context_line":"        Ok(())"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"dd663447_38987f36","line":990,"in_reply_to":"0ad608ea_776990c6","updated":"2024-01-21 15:40:00.000000000","message":"Done","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"}],"tvix/glue/src/builtins/derivation.rs":[{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"22ab3b302d0a20c6aa8eda8f33afb0d470afcc09","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            return Ok(input);"},{"line_number":137,"context_line":"        }"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        let placeholder \u003d hash_placeholder("},{"line_number":140,"context_line":"            input"},{"line_number":141,"context_line":"                .to_str()"},{"line_number":142,"context_line":"                .context(\"looking at output name in builtins.placeholder\")?"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"dfc84c25_a78bea70","line":139,"range":{"start_line":139,"start_character":26,"end_line":139,"end_character":42},"updated":"2024-01-20 20:14:04.000000000","message":"@flokli@flokli.de This should also use byte strings in the future, I\u0027d say—it\u0027s always an ASCII sequence.\n\nSame goes for a lot of derivation stuff though I\u0027m not sure maybe a little thinking about windows is required.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"ddf24173f5c2621933691bc1ad7bbfa6e7f8475e","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            return Ok(input);"},{"line_number":137,"context_line":"        }"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        let placeholder \u003d hash_placeholder("},{"line_number":140,"context_line":"            input"},{"line_number":141,"context_line":"                .to_str()"},{"line_number":142,"context_line":"                .context(\"looking at output name in builtins.placeholder\")?"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"3fb60b6d_14a642d4","line":139,"range":{"start_line":139,"start_character":26,"end_line":139,"end_character":42},"in_reply_to":"79dbc2d6_665a50b6","updated":"2024-01-22 09:08:31.000000000","message":"There\u0027s no Derivation going over the wire, only BuildRequest, and they are fairly self-contained (contrary to .drv), so if a client assembles something wrongly, it\u0027s mostly their own fault (and we mostly do have validation for everything crossing the wire in a less strict type).\n\nI opened https://b.tvl.fyi/issues/373.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"41c31c4c06cb758ba752a6080c17a20a895589b2","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            return Ok(input);"},{"line_number":137,"context_line":"        }"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        let placeholder \u003d hash_placeholder("},{"line_number":140,"context_line":"            input"},{"line_number":141,"context_line":"                .to_str()"},{"line_number":142,"context_line":"                .context(\"looking at output name in builtins.placeholder\")?"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"79dbc2d6_665a50b6","line":139,"range":{"start_line":139,"start_character":26,"end_line":139,"end_character":42},"in_reply_to":"bd9ef614_b6c3c0c8","updated":"2024-01-21 22:49:00.000000000","message":"Agree.\n\n\u003e I wonder if that\u0027s a TODO for me to factor out and apply the same checks here.\n\nThe problem with being so modular is that you probably have to check this at multiple boundaries, i.e. `derivation` shouldn\u0027t accept it, but also at the RPC boundary it should probably be re-checked.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"ef641c99f93928f6dc17f3a1de4e06a79df5b132","unresolved":true,"context_lines":[{"line_number":136,"context_line":"            return Ok(input);"},{"line_number":137,"context_line":"        }"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        let placeholder \u003d hash_placeholder("},{"line_number":140,"context_line":"            input"},{"line_number":141,"context_line":"                .to_str()"},{"line_number":142,"context_line":"                .context(\"looking at output name in builtins.placeholder\")?"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"bd9ef614_b6c3c0c8","line":139,"range":{"start_line":139,"start_character":26,"end_line":139,"end_character":42},"in_reply_to":"dfc84c25_a78bea70","updated":"2024-01-21 21:53:51.000000000","message":"output names have stricter restrictions even. it\u0027s a subset of StorePath.name, see https://cs.tvl.fyi/depot/-/blob/tvix/nix-compat/src/derivation/validate.rs?L30\n\nI wonder if that\u0027s a TODO for me to factor out and apply the same checks here.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"22ab3b302d0a20c6aa8eda8f33afb0d470afcc09","unresolved":true,"context_lines":[{"line_number":251,"context_line":"                            Err(cek) \u003d\u003e return Ok(Value::Catchable(cek)),"},{"line_number":252,"context_line":"                            Ok(s) \u003d\u003e {"},{"line_number":253,"context_line":"                                input_context.mimic(\u0026s);"},{"line_number":254,"context_line":"                                drv.arguments.push((**s).clone().into_string()?)"},{"line_number":255,"context_line":"                            }"},{"line_number":256,"context_line":"                        }"},{"line_number":257,"context_line":"                    }"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"e609adb1_e73b9dc1","line":254,"range":{"start_line":254,"start_character":51,"end_line":254,"end_character":79},"updated":"2024-01-20 20:14:04.000000000","message":"Why do we this here, but `s.to_str()?.to_owned()` elsewhere?","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e5edf5f80d5446edc62b7de777494e9e79a8f8f6","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                            Err(cek) \u003d\u003e return Ok(Value::Catchable(cek)),"},{"line_number":252,"context_line":"                            Ok(s) \u003d\u003e {"},{"line_number":253,"context_line":"                                input_context.mimic(\u0026s);"},{"line_number":254,"context_line":"                                drv.arguments.push((**s).clone().into_string()?)"},{"line_number":255,"context_line":"                            }"},{"line_number":256,"context_line":"                        }"},{"line_number":257,"context_line":"                    }"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"a0ba8c20_43a9c402","line":254,"range":{"start_line":254,"start_character":51,"end_line":254,"end_character":79},"in_reply_to":"e609adb1_e73b9dc1","updated":"2024-01-21 15:40:00.000000000","message":"the latter is faster, actually, so I updated this.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"22ab3b302d0a20c6aa8eda8f33afb0d470afcc09","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                            .is_some()"},{"line_number":285,"context_line":"                        {"},{"line_number":286,"context_line":"                            Err(DerivationError::DuplicateOutput("},{"line_number":287,"context_line":"                                (**output_name).clone().into_string_lossy(),"},{"line_number":288,"context_line":"                            ))?"},{"line_number":289,"context_line":"                        }"},{"line_number":290,"context_line":"                        output_names.push((**output_name).clone().into_string()?);"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"061917e4_1f2dc940","line":287,"range":{"start_line":287,"start_character":56,"end_line":287,"end_character":73},"updated":"2024-01-20 20:14:04.000000000","message":"I think a DerivationSafeString wrapper would be nice which checks the drv path requirements (subset of ASCII) upon construction, then a lot of lossy conversion can go away here.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e5edf5f80d5446edc62b7de777494e9e79a8f8f6","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                            .is_some()"},{"line_number":285,"context_line":"                        {"},{"line_number":286,"context_line":"                            Err(DerivationError::DuplicateOutput("},{"line_number":287,"context_line":"                                (**output_name).clone().into_string_lossy(),"},{"line_number":288,"context_line":"                            ))?"},{"line_number":289,"context_line":"                        }"},{"line_number":290,"context_line":"                        output_names.push((**output_name).clone().into_string()?);"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"c7d669ab_cdde507e","line":287,"range":{"start_line":287,"start_character":56,"end_line":287,"end_character":73},"in_reply_to":"061917e4_1f2dc940","updated":"2024-01-21 15:40:00.000000000","message":"yeah, that\u0027d be nice","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"ef641c99f93928f6dc17f3a1de4e06a79df5b132","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                            .is_some()"},{"line_number":285,"context_line":"                        {"},{"line_number":286,"context_line":"                            Err(DerivationError::DuplicateOutput("},{"line_number":287,"context_line":"                                (**output_name).clone().into_string_lossy(),"},{"line_number":288,"context_line":"                            ))?"},{"line_number":289,"context_line":"                        }"},{"line_number":290,"context_line":"                        output_names.push((**output_name).clone().into_string()?);"}],"source_content_type":"text/x-rustsrc","patch_set":23,"id":"0d4344a2_7f41d892","line":287,"range":{"start_line":287,"start_character":56,"end_line":287,"end_character":73},"in_reply_to":"c7d669ab_cdde507e","updated":"2024-01-21 21:53:51.000000000","message":"We already have a type for that, these things are called StorePath (with a .drv suffix) ;-)\n\nThere\u0027s an open bug about making Derivation accept StorePath(Ref), but we need to have a generic prototype accepting strings (that\u0027s used for the hash derivation modulo calculation). https://b.tvl.fyi/issues/264 has some info, and there\u0027s a somewhat stale CL, but no matter what, that\u0027s followup material.","commit_id":"978f529485065c3b2f02a0abc693f5eb1323992c"}],"tvix/glue/src/tvix_store_io.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"802c09a58308893ecacff1c25c877d7d8b69b45b","unresolved":true,"context_lines":[{"line_number":274,"context_line":"    #[instrument(skip(self), ret, err)]"},{"line_number":275,"context_line":"    fn import_path(\u0026self, path: \u0026Path) -\u003e io::Result\u003cPathBuf\u003e {"},{"line_number":276,"context_line":"        let output_path \u003d self.tokio_handle.block_on(async {"},{"line_number":277,"context_line":"            tvix_store::import::import_path_as_nar_ca("},{"line_number":278,"context_line":"                path,"},{"line_number":279,"context_line":"                tvix_store::import::path_to_name(path)?,"},{"line_number":280,"context_line":"                \u0026self.blob_service,"}],"source_content_type":"text/x-rustsrc","patch_set":27,"id":"9be86c68_14bb3bc9","line":277,"updated":"2024-01-21 22:06:13.000000000","message":"This looks like something in the rebase gone wrong, this change shouldn\u0027t be here.","commit_id":"e4fa19c1c000ea8bcf5ece1dc03cdd03346e9126"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"f4d6b9f2a63897b32f02e2d702a1b3215d1816b9","unresolved":false,"context_lines":[{"line_number":274,"context_line":"    #[instrument(skip(self), ret, err)]"},{"line_number":275,"context_line":"    fn import_path(\u0026self, path: \u0026Path) -\u003e io::Result\u003cPathBuf\u003e {"},{"line_number":276,"context_line":"        let output_path \u003d self.tokio_handle.block_on(async {"},{"line_number":277,"context_line":"            tvix_store::import::import_path_as_nar_ca("},{"line_number":278,"context_line":"                path,"},{"line_number":279,"context_line":"                tvix_store::import::path_to_name(path)?,"},{"line_number":280,"context_line":"                \u0026self.blob_service,"}],"source_content_type":"text/x-rustsrc","patch_set":27,"id":"27699cf3_78e7a664","line":277,"in_reply_to":"563dd984_2adcae2b","updated":"2024-01-23 14:53:29.000000000","message":"Same gerrit confusion as above, sorry for the noise, all good.","commit_id":"e4fa19c1c000ea8bcf5ece1dc03cdd03346e9126"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"5a0b212f54cffb1a33853248b1af72badd95b57e","unresolved":true,"context_lines":[{"line_number":274,"context_line":"    #[instrument(skip(self), ret, err)]"},{"line_number":275,"context_line":"    fn import_path(\u0026self, path: \u0026Path) -\u003e io::Result\u003cPathBuf\u003e {"},{"line_number":276,"context_line":"        let output_path \u003d self.tokio_handle.block_on(async {"},{"line_number":277,"context_line":"            tvix_store::import::import_path_as_nar_ca("},{"line_number":278,"context_line":"                path,"},{"line_number":279,"context_line":"                tvix_store::import::path_to_name(path)?,"},{"line_number":280,"context_line":"                \u0026self.blob_service,"}],"source_content_type":"text/x-rustsrc","patch_set":27,"id":"563dd984_2adcae2b","line":277,"in_reply_to":"9be86c68_14bb3bc9","updated":"2024-01-22 20:06:25.000000000","message":"Why?","commit_id":"e4fa19c1c000ea8bcf5ece1dc03cdd03346e9126"}]}
