)]}'
{"snix/glue/src/snix_build.rs":[{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"42d9fc3cf95305beccb06f5014946bc2c7d9b354","unresolved":true,"context_lines":[{"line_number":35,"context_line":"pub(crate) fn get_refscan_needles("},{"line_number":36,"context_line":"    derivation: \u0026Derivation,"},{"line_number":37,"context_line":"    known_paths: \u0026KnownPaths,"},{"line_number":38,"context_line":") -\u003e Vec\u003cStorePath\u003cString\u003e\u003e {"},{"line_number":39,"context_line":"    let outs \u003d derivation"},{"line_number":40,"context_line":"        .input_derivations"},{"line_number":41,"context_line":"        .iter()"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"de067d33_a9eb01ba","line":38,"updated":"2025-03-22 15:54:46.000000000","message":"can we avoid collecting into the Vec, and keep this an impl Iterator?","commit_id":"d57b519a09f7b8c0d79ff61139d09935f8fdb0ba"},{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"4d7a82b9bbd7e1d11f2fbbfaf3ed79de11adbbe7","unresolved":false,"context_lines":[{"line_number":35,"context_line":"pub(crate) fn get_refscan_needles("},{"line_number":36,"context_line":"    derivation: \u0026Derivation,"},{"line_number":37,"context_line":"    known_paths: \u0026KnownPaths,"},{"line_number":38,"context_line":") -\u003e Vec\u003cStorePath\u003cString\u003e\u003e {"},{"line_number":39,"context_line":"    let outs \u003d derivation"},{"line_number":40,"context_line":"        .input_derivations"},{"line_number":41,"context_line":"        .iter()"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"5b137e57_8ea51e22","line":38,"in_reply_to":"08be6750_c59eb67f","updated":"2025-03-23 15:37:26.000000000","message":"sure, whatever is easier :-)","commit_id":"d57b519a09f7b8c0d79ff61139d09935f8fdb0ba"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"9c287f2b19b14289eb354e7017607894fe2731be","unresolved":true,"context_lines":[{"line_number":35,"context_line":"pub(crate) fn get_refscan_needles("},{"line_number":36,"context_line":"    derivation: \u0026Derivation,"},{"line_number":37,"context_line":"    known_paths: \u0026KnownPaths,"},{"line_number":38,"context_line":") -\u003e Vec\u003cStorePath\u003cString\u003e\u003e {"},{"line_number":39,"context_line":"    let outs \u003d derivation"},{"line_number":40,"context_line":"        .input_derivations"},{"line_number":41,"context_line":"        .iter()"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"dc7d91af_3d547511","line":38,"in_reply_to":"493f5f02_ca4ddd34","updated":"2025-03-22 19:24:45.000000000","message":"I initially planned to do it this way, but the thing is that \u0026known_paths is a borrow() of a refcell, and between producing the iterator and consuming it, there is some async io happenning. So I wanted to ask before implementing it this way: Are we ok holding on to the borrow for a while?","commit_id":"d57b519a09f7b8c0d79ff61139d09935f8fdb0ba"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"22e06aea957dab26d613f9b3f29237dc07e82e00","unresolved":true,"context_lines":[{"line_number":35,"context_line":"pub(crate) fn get_refscan_needles("},{"line_number":36,"context_line":"    derivation: \u0026Derivation,"},{"line_number":37,"context_line":"    known_paths: \u0026KnownPaths,"},{"line_number":38,"context_line":") -\u003e Vec\u003cStorePath\u003cString\u003e\u003e {"},{"line_number":39,"context_line":"    let outs \u003d derivation"},{"line_number":40,"context_line":"        .input_derivations"},{"line_number":41,"context_line":"        .iter()"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"d71e5c05_9b10a4c4","line":38,"in_reply_to":"79cbfea5_b71a70c4","updated":"2025-03-22 19:45:07.000000000","message":"So actually... I think my commit message is a lie, I am not propagating transitive drv inputs, like we should. So we need some kind of bfs/dfs and need to keep some state for visited nodes. Can this still be done as an iterator in that case?","commit_id":"d57b519a09f7b8c0d79ff61139d09935f8fdb0ba"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"af97a2fe33c8499b52b56b8524e2d008783b0d4c","unresolved":false,"context_lines":[{"line_number":35,"context_line":"pub(crate) fn get_refscan_needles("},{"line_number":36,"context_line":"    derivation: \u0026Derivation,"},{"line_number":37,"context_line":"    known_paths: \u0026KnownPaths,"},{"line_number":38,"context_line":") -\u003e Vec\u003cStorePath\u003cString\u003e\u003e {"},{"line_number":39,"context_line":"    let outs \u003d derivation"},{"line_number":40,"context_line":"        .input_derivations"},{"line_number":41,"context_line":"        .iter()"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"c0f30bc0_2cc6a51f","line":38,"in_reply_to":"8d4c03cd_b7cd5537","updated":"2025-03-22 23:03:03.000000000","message":"Ok, I think I\u0027ve settled on a custom struct that is used as an iterator.\n\nIts iterator implementation still allocates as it needs to do internal bookkeeping to avoid duplicates and dependency cycles(not sure if nix allows them though).\n\nI think this is the best we can do given that even without this iterator we would have to store some state do bfs.\n\nptal","commit_id":"d57b519a09f7b8c0d79ff61139d09935f8fdb0ba"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"8174b56b82fb362342ab3cb5459b965fd6c44351","unresolved":false,"context_lines":[{"line_number":35,"context_line":"pub(crate) fn get_refscan_needles("},{"line_number":36,"context_line":"    derivation: \u0026Derivation,"},{"line_number":37,"context_line":"    known_paths: \u0026KnownPaths,"},{"line_number":38,"context_line":") -\u003e Vec\u003cStorePath\u003cString\u003e\u003e {"},{"line_number":39,"context_line":"    let outs \u003d derivation"},{"line_number":40,"context_line":"        .input_derivations"},{"line_number":41,"context_line":"        .iter()"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"08be6750_c59eb67f","line":38,"in_reply_to":"a6e838d3_7b94d699","updated":"2025-03-23 08:40:11.000000000","message":"I mean all it would do is also have a queue and a visited set. imo it\u0027s ok to just implement the iterator ourselves.","commit_id":"d57b519a09f7b8c0d79ff61139d09935f8fdb0ba"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"8da87d412ef9e8c3b17d558d7c56aa9b216c5fef","unresolved":true,"context_lines":[{"line_number":35,"context_line":"pub(crate) fn get_refscan_needles("},{"line_number":36,"context_line":"    derivation: \u0026Derivation,"},{"line_number":37,"context_line":"    known_paths: \u0026KnownPaths,"},{"line_number":38,"context_line":") -\u003e Vec\u003cStorePath\u003cString\u003e\u003e {"},{"line_number":39,"context_line":"    let outs \u003d derivation"},{"line_number":40,"context_line":"        .input_derivations"},{"line_number":41,"context_line":"        .iter()"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"79cbfea5_b71a70c4","line":38,"in_reply_to":"a750c86b_b537370f","updated":"2025-03-22 19:30:17.000000000","message":"oh, nvm. see it now","commit_id":"d57b519a09f7b8c0d79ff61139d09935f8fdb0ba"},{"author":{"_account_id":1000005,"name":"Ilan Joselevich","email":"personal@ilanjoselevich.com","username":"kranzes"},"change_message_id":"36f439c7b7cd9854ba52e3ce1842531400677a3b","unresolved":false,"context_lines":[{"line_number":35,"context_line":"pub(crate) fn get_refscan_needles("},{"line_number":36,"context_line":"    derivation: \u0026Derivation,"},{"line_number":37,"context_line":"    known_paths: \u0026KnownPaths,"},{"line_number":38,"context_line":") -\u003e Vec\u003cStorePath\u003cString\u003e\u003e {"},{"line_number":39,"context_line":"    let outs \u003d derivation"},{"line_number":40,"context_line":"        .input_derivations"},{"line_number":41,"context_line":"        .iter()"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"a6e838d3_7b94d699","line":38,"in_reply_to":"c0f30bc0_2cc6a51f","updated":"2025-03-22 23:59:54.000000000","message":"fwiw, petgraph has a Bfs struct which has an iter method, which returns a WalkerIter, which impls the Iterator trait, maybe that can be used?","commit_id":"d57b519a09f7b8c0d79ff61139d09935f8fdb0ba"},{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"20abf9f177c91af211146c34e177cd1be208729e","unresolved":true,"context_lines":[{"line_number":35,"context_line":"pub(crate) fn get_refscan_needles("},{"line_number":36,"context_line":"    derivation: \u0026Derivation,"},{"line_number":37,"context_line":"    known_paths: \u0026KnownPaths,"},{"line_number":38,"context_line":") -\u003e Vec\u003cStorePath\u003cString\u003e\u003e {"},{"line_number":39,"context_line":"    let outs \u003d derivation"},{"line_number":40,"context_line":"        .input_derivations"},{"line_number":41,"context_line":"        .iter()"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"8d4c03cd_b7cd5537","line":38,"in_reply_to":"d71e5c05_9b10a4c4","updated":"2025-03-22 20:37:06.000000000","message":"Like https://docs.rs/petgraph/latest/petgraph/visit/struct.Dfs.html ? That doesnt implement Iterator, it needs its state indeed. Mmmh","commit_id":"d57b519a09f7b8c0d79ff61139d09935f8fdb0ba"},{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"1749b05e4e8ce668e4c5f54e6270aacb30486b9a","unresolved":true,"context_lines":[{"line_number":35,"context_line":"pub(crate) fn get_refscan_needles("},{"line_number":36,"context_line":"    derivation: \u0026Derivation,"},{"line_number":37,"context_line":"    known_paths: \u0026KnownPaths,"},{"line_number":38,"context_line":") -\u003e Vec\u003cStorePath\u003cString\u003e\u003e {"},{"line_number":39,"context_line":"    let outs \u003d derivation"},{"line_number":40,"context_line":"        .input_derivations"},{"line_number":41,"context_line":"        .iter()"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"a750c86b_b537370f","line":38,"in_reply_to":"dc7d91af_3d547511","updated":"2025-03-22 19:28:27.000000000","message":"Did you see the patch? The way it\u0027s done there doesn\u0027t hold the borrow longer than before.","commit_id":"d57b519a09f7b8c0d79ff61139d09935f8fdb0ba"},{"author":{"_account_id":1000005,"name":"Ilan Joselevich","email":"personal@ilanjoselevich.com","username":"kranzes"},"change_message_id":"aa9f9f369604f4704b8a5114e6a139d71ff6bba1","unresolved":true,"context_lines":[{"line_number":35,"context_line":"pub(crate) fn get_refscan_needles("},{"line_number":36,"context_line":"    derivation: \u0026Derivation,"},{"line_number":37,"context_line":"    known_paths: \u0026KnownPaths,"},{"line_number":38,"context_line":") -\u003e Vec\u003cStorePath\u003cString\u003e\u003e {"},{"line_number":39,"context_line":"    let outs \u003d derivation"},{"line_number":40,"context_line":"        .input_derivations"},{"line_number":41,"context_line":"        .iter()"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"493f5f02_ca4ddd34","line":38,"in_reply_to":"de067d33_a9eb01ba","updated":"2025-03-22 17:01:51.000000000","message":"```diff\ndiff --git a/snix/glue/src/snix_build.rs b/snix/glue/src/snix_build.rs\nindex 12a4179b9..e81419b2a 100644\n--- a/snix/glue/src/snix_build.rs\n+++ b/snix/glue/src/snix_build.rs\n@@ -32,10 +32,10 @@ const NIX_ENVIRONMENT_VARS: [(\u0026str, \u0026str); 12] \u003d [\n /// Get an iterator of store paths whose nixbase32 hashes will be the needles for refscanning\n /// Importantly, the returned order will match the one used by [derivation_to_build_request]\n /// so users may use this function to map back from the found needles to a store path\n-pub(crate) fn get_refscan_needles(\n-    derivation: \u0026Derivation,\n-    known_paths: \u0026KnownPaths,\n-) -\u003e Vec\u003cStorePath\u003cString\u003e\u003e {\n+pub(crate) fn get_refscan_needles\u003c\u0027a\u003e(\n+    derivation: \u0026\u0027a Derivation,\n+    known_paths: \u0026\u0027a KnownPaths,\n+) -\u003e impl Iterator\u003cItem \u003d \u0026\u0027a StorePath\u003cString\u003e\u003e {\n     let outs \u003d derivation\n         .input_derivations\n         .iter()\n@@ -46,17 +46,16 @@ pub(crate) fn get_refscan_needles(\n                     .get(out)\n                     .expect(\"No output bug!\")\n                     .path\n-                    .clone()\n+                    .as_ref()\n                     .expect(\"output has no store path\")\n             })\n         });\n     derivation\n         .outputs\n         .values()\n-        .filter_map(|output| output.path.clone())\n-        .chain(derivation.input_sources.clone())\n+        .filter_map(|output| output.path.as_ref())\n+        .chain(derivation.input_sources.iter())\n         .chain(outs)\n-        .collect()\n }\n \n /// Takes a [Derivation] and turns it into a [buildservice::BuildRequest].\n@@ -125,7 +124,6 @@ pub(crate) fn derivation_to_build_request(\n         // Importantly, this must match the order of get_refscan_needles, since users may use that\n         // function to map back from the found needles to a store path\n         refscan_needles: get_refscan_needles(derivation, known_paths)\n-            .iter()\n             .map(|path| nixbase32::encode(path.digest()))\n             .collect(),\n         command_args,\ndiff --git a/snix/glue/src/snix_store_io.rs b/snix/glue/src/snix_store_io.rs\nindex 7ee0957ec..d5817422c 100644\n--- a/snix/glue/src/snix_store_io.rs\n+++ b/snix/glue/src/snix_store_io.rs\n@@ -285,7 +285,9 @@ impl SnixStoreIO {\n                         let refscan_needles \u003d crate::snix_build::get_refscan_needles(\n                             \u0026drv,\n                             \u0026self.known_paths.borrow(),\n-                        );\n+                        )\n+                        .map(StorePath::to_owned)\n+                        .collect::\u003cVec\u003c_\u003e\u003e();\n \n                         // For each output, insert a PathInfo.\n                         for ((output, output_needles), drv_output) in build_result\n```","commit_id":"d57b519a09f7b8c0d79ff61139d09935f8fdb0ba"},{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"42d9fc3cf95305beccb06f5014946bc2c7d9b354","unresolved":true,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"/// Takes a [Derivation] and turns it into a [buildservice::BuildRequest]."},{"line_number":63,"context_line":"/// It assumes the Derivation has been validated."},{"line_number":64,"context_line":"/// It needs two lookup functions:"},{"line_number":65,"context_line":"/// - one translating input sources to a castore node"},{"line_number":66,"context_line":"///   (`fn_input_sources_to_node`)"},{"line_number":67,"context_line":"/// - one translating a tuple of drv path and (a subset of their) output names to"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"0794f263_27f052c2","line":64,"updated":"2025-03-22 15:54:46.000000000","message":"This needs updating (and already needed before apparently, sorry).","commit_id":"d57b519a09f7b8c0d79ff61139d09935f8fdb0ba"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"af97a2fe33c8499b52b56b8524e2d008783b0d4c","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"/// Takes a [Derivation] and turns it into a [buildservice::BuildRequest]."},{"line_number":63,"context_line":"/// It assumes the Derivation has been validated."},{"line_number":64,"context_line":"/// It needs two lookup functions:"},{"line_number":65,"context_line":"/// - one translating input sources to a castore node"},{"line_number":66,"context_line":"///   (`fn_input_sources_to_node`)"},{"line_number":67,"context_line":"/// - one translating a tuple of drv path and (a subset of their) output names to"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"b0f0d539_4ff653d5","line":64,"in_reply_to":"0794f263_27f052c2","updated":"2025-03-22 23:03:03.000000000","message":"Done","commit_id":"d57b519a09f7b8c0d79ff61139d09935f8fdb0ba"},{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"42d9fc3cf95305beccb06f5014946bc2c7d9b354","unresolved":true,"context_lines":[{"line_number":125,"context_line":"        // Importantly, this must match the order of get_refscan_needles, since users may use that"},{"line_number":126,"context_line":"        // function to map back from the found needles to a store path"},{"line_number":127,"context_line":"        refscan_needles: get_refscan_needles(derivation, known_paths)"},{"line_number":128,"context_line":"            .iter()"},{"line_number":129,"context_line":"            .map(|path| nixbase32::encode(path.digest()))"},{"line_number":130,"context_line":"            .collect(),"},{"line_number":131,"context_line":"        command_args,"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"b8ca4568_6968860a","line":128,"updated":"2025-03-22 15:54:46.000000000","message":"can probably be dropped once `get_refscan_needles` returns an Iterator again?","commit_id":"d57b519a09f7b8c0d79ff61139d09935f8fdb0ba"},{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"a0bac996722580b94a1f21ac6fc627c445192d68","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        // Importantly, this must match the order of get_refscan_needles, since users may use that"},{"line_number":126,"context_line":"        // function to map back from the found needles to a store path"},{"line_number":127,"context_line":"        refscan_needles: get_refscan_needles(derivation, known_paths)"},{"line_number":128,"context_line":"            .iter()"},{"line_number":129,"context_line":"            .map(|path| nixbase32::encode(path.digest()))"},{"line_number":130,"context_line":"            .collect(),"},{"line_number":131,"context_line":"        command_args,"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"c93d2fbd_553b7f4c","line":128,"in_reply_to":"b8ca4568_6968860a","updated":"2025-03-22 17:03:49.000000000","message":"Nvm, we need the collect(), as this is a Vec on the struct we\u0027re emitting.","commit_id":"d57b519a09f7b8c0d79ff61139d09935f8fdb0ba"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"af97a2fe33c8499b52b56b8524e2d008783b0d4c","unresolved":true,"context_lines":[{"line_number":89,"context_line":"        .values()"},{"line_number":90,"context_line":"        .filter_map(|output| output.path.as_ref())"},{"line_number":91,"context_line":"        .chain(derivation.input_sources.iter())"},{"line_number":92,"context_line":"        // It may seem that the above iterator paired with bfs can produce duplicates,"},{"line_number":93,"context_line":"        // but it\u0027s not possible for a derivation\u0027s inputs to depend on its outputs,"},{"line_number":94,"context_line":"        // so we can safely chain them."},{"line_number":95,"context_line":"        .chain(bfs)"},{"line_number":96,"context_line":"}"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"5c55e33f_82435ba8","line":94,"range":{"start_line":92,"start_character":8,"end_line":94,"end_character":39},"updated":"2025-03-22 23:03:03.000000000","message":"is this a valid assumption?","commit_id":"e08f1632adc90588c2c08b92eab3bbdcdd49555b"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"2427a571214c1918936a23b53e9c4e1304fe55e4","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        .values()"},{"line_number":90,"context_line":"        .filter_map(|output| output.path.as_ref())"},{"line_number":91,"context_line":"        .chain(derivation.input_sources.iter())"},{"line_number":92,"context_line":"        // It may seem that the above iterator paired with bfs can produce duplicates,"},{"line_number":93,"context_line":"        // but it\u0027s not possible for a derivation\u0027s inputs to depend on its outputs,"},{"line_number":94,"context_line":"        // so we can safely chain them."},{"line_number":95,"context_line":"        .chain(bfs)"},{"line_number":96,"context_line":"}"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"1be6a84e_4e4bd677","line":94,"range":{"start_line":92,"start_character":8,"end_line":94,"end_character":39},"in_reply_to":"56b8d956_fc81b768","updated":"2025-03-25 00:46:39.000000000","message":"resolve","commit_id":"e08f1632adc90588c2c08b92eab3bbdcdd49555b"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"cccc6aa164feda149818b69e77da313f2cb712ff","unresolved":true,"context_lines":[{"line_number":89,"context_line":"        .values()"},{"line_number":90,"context_line":"        .filter_map(|output| output.path.as_ref())"},{"line_number":91,"context_line":"        .chain(derivation.input_sources.iter())"},{"line_number":92,"context_line":"        // It may seem that the above iterator paired with bfs can produce duplicates,"},{"line_number":93,"context_line":"        // but it\u0027s not possible for a derivation\u0027s inputs to depend on its outputs,"},{"line_number":94,"context_line":"        // so we can safely chain them."},{"line_number":95,"context_line":"        .chain(bfs)"},{"line_number":96,"context_line":"}"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"56b8d956_fc81b768","line":94,"range":{"start_line":92,"start_character":8,"end_line":94,"end_character":39},"in_reply_to":"5c55e33f_82435ba8","updated":"2025-03-22 23:46:09.000000000","message":"also see my next cl in the chain that will simplify this further","commit_id":"e08f1632adc90588c2c08b92eab3bbdcdd49555b"},{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"d579b527ef18ab82c3c384c39452314edec5c7e3","unresolved":true,"context_lines":[{"line_number":46,"context_line":"/// It needs two lookup functions:"},{"line_number":47,"context_line":"/// - one translating input sources to a castore node"},{"line_number":48,"context_line":"///   (`fn_input_sources_to_node`)"},{"line_number":49,"context_line":"/// - one translating a tuple of drv path and (a subset of their) output names to"},{"line_number":50,"context_line":"///   castore nodes of the selected outpus (`fn_input_drvs_to_output_nodes`)."},{"line_number":51,"context_line":"pub(crate) fn derivation_to_build_request("},{"line_number":52,"context_line":"    derivation: \u0026Derivation,"}],"source_content_type":"text/x-rustsrc","patch_set":7,"id":"9d324e2c_042399e8","side":"PARENT","line":49,"updated":"2025-03-24 13:36:18.000000000","message":"/// NOTE: The resulting BuildRequest currently does not scan for self-references, as we don\u0027t need it for input-addressed derivations.\n\nThough I\u0027m not sure whether stdenv or nix fails a build of a FOD fetcher if it contains self-references. Maybe we should look into that...","commit_id":"1a78270f540c9d5caa729be2496b00fa77b660bd"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"f77ff99f6a122e452b303ec405249b4c60306056","unresolved":true,"context_lines":[{"line_number":46,"context_line":"/// It needs two lookup functions:"},{"line_number":47,"context_line":"/// - one translating input sources to a castore node"},{"line_number":48,"context_line":"///   (`fn_input_sources_to_node`)"},{"line_number":49,"context_line":"/// - one translating a tuple of drv path and (a subset of their) output names to"},{"line_number":50,"context_line":"///   castore nodes of the selected outpus (`fn_input_drvs_to_output_nodes`)."},{"line_number":51,"context_line":"pub(crate) fn derivation_to_build_request("},{"line_number":52,"context_line":"    derivation: \u0026Derivation,"}],"source_content_type":"text/x-rustsrc","patch_set":7,"id":"db8c287d_793db77d","side":"PARENT","line":49,"in_reply_to":"9d324e2c_042399e8","updated":"2025-03-25 00:46:20.000000000","message":"It looks like it should scan for self refs, i.e. here\u0027s a nar that references itself apparently: https://cache.nixos.org/hi5y7bj2p60xll9dj4ch9ddpsjjijz5f.narinfo\n\nWith this code the nar produced by the build is identical","commit_id":"1a78270f540c9d5caa729be2496b00fa77b660bd"},{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"5861582cc905fa08236aa1e6efe08819fb77c738","unresolved":false,"context_lines":[{"line_number":46,"context_line":"/// It needs two lookup functions:"},{"line_number":47,"context_line":"/// - one translating input sources to a castore node"},{"line_number":48,"context_line":"///   (`fn_input_sources_to_node`)"},{"line_number":49,"context_line":"/// - one translating a tuple of drv path and (a subset of their) output names to"},{"line_number":50,"context_line":"///   castore nodes of the selected outpus (`fn_input_drvs_to_output_nodes`)."},{"line_number":51,"context_line":"pub(crate) fn derivation_to_build_request("},{"line_number":52,"context_line":"    derivation: \u0026Derivation,"}],"source_content_type":"text/x-rustsrc","patch_set":7,"id":"524c30f5_71c29727","side":"PARENT","line":49,"in_reply_to":"db8c287d_793db77d","updated":"2025-03-26 15:54:12.000000000","message":"Ok, so we do need to scan for self-references no matter what. Ok, thanks for checking!","commit_id":"1a78270f540c9d5caa729be2496b00fa77b660bd"},{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"d579b527ef18ab82c3c384c39452314edec5c7e3","unresolved":true,"context_lines":[{"line_number":127,"context_line":"}"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"/// Takes a [Derivation] and turns it into a [buildservice::BuildRequest]."},{"line_number":130,"context_line":"/// It assumes the Derivation has been validated."},{"line_number":131,"context_line":"pub(crate) fn derivation_to_build_request("},{"line_number":132,"context_line":"    derivation: \u0026Derivation,"},{"line_number":133,"context_line":"    inputs: BTreeMap\u003cStorePath\u003cString\u003e, Node\u003e,"}],"source_content_type":"text/x-rustsrc","patch_set":7,"id":"f8108eb4_2c165501","line":130,"updated":"2025-03-24 13:36:18.000000000","message":"```suggestion\n/// It assumes the Derivation has been validated, and all referenced output paths are present in `inputs`.\n```\n\n(modulo line wrapping)","commit_id":"fa972e5b032f0f50b5565227652d73e6e399da5b"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"f77ff99f6a122e452b303ec405249b4c60306056","unresolved":false,"context_lines":[{"line_number":127,"context_line":"}"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"/// Takes a [Derivation] and turns it into a [buildservice::BuildRequest]."},{"line_number":130,"context_line":"/// It assumes the Derivation has been validated."},{"line_number":131,"context_line":"pub(crate) fn derivation_to_build_request("},{"line_number":132,"context_line":"    derivation: \u0026Derivation,"},{"line_number":133,"context_line":"    inputs: BTreeMap\u003cStorePath\u003cString\u003e, Node\u003e,"}],"source_content_type":"text/x-rustsrc","patch_set":7,"id":"40e9d421_95ace090","line":130,"in_reply_to":"f8108eb4_2c165501","updated":"2025-03-25 00:46:20.000000000","message":"Done","commit_id":"fa972e5b032f0f50b5565227652d73e6e399da5b"}],"snix/glue/src/snix_store_io.rs":[{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"d579b527ef18ab82c3c384c39452314edec5c7e3","unresolved":true,"context_lines":[{"line_number":237,"context_line":"                                .try_into_name_and_node()"},{"line_number":238,"context_line":"                                .expect(\"invalid node\");"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"                            let mut output_needles: Vec\u003c_\u003e \u003d output_needles"},{"line_number":241,"context_line":"                                .needles"},{"line_number":242,"context_line":"                                .iter()"},{"line_number":243,"context_line":"                                // Map each output needle index back to the refscan_needle"}],"source_content_type":"text/x-rustsrc","patch_set":7,"id":"7a5d862f_591ddba3","line":240,"updated":"2025-03-24 13:36:18.000000000","message":"I\u0027d move this into the assignment of the PathInfo struct, and not call it output_needles anymore, but references. This will also make the to_owned stuff we have down there a bit less awkward.","commit_id":"fa972e5b032f0f50b5565227652d73e6e399da5b"},{"author":{"_account_id":1000004,"name":"Florian Klink","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"5861582cc905fa08236aa1e6efe08819fb77c738","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                                .try_into_name_and_node()"},{"line_number":238,"context_line":"                                .expect(\"invalid node\");"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"                            let mut output_needles: Vec\u003c_\u003e \u003d output_needles"},{"line_number":241,"context_line":"                                .needles"},{"line_number":242,"context_line":"                                .iter()"},{"line_number":243,"context_line":"                                // Map each output needle index back to the refscan_needle"}],"source_content_type":"text/x-rustsrc","patch_set":7,"id":"f9458050_f2cb9b00","line":240,"in_reply_to":"5fca5a20_523f0adb","updated":"2025-03-26 15:54:12.000000000","message":"Hmmh,I guess we can iterate further over this in followups, no need to block this. Thanks!","commit_id":"fa972e5b032f0f50b5565227652d73e6e399da5b"},{"author":{"_account_id":1000009,"name":"Vova Kryachko","email":"v.kryachko@gmail.com","username":"vkryachko"},"change_message_id":"f77ff99f6a122e452b303ec405249b4c60306056","unresolved":true,"context_lines":[{"line_number":237,"context_line":"                                .try_into_name_and_node()"},{"line_number":238,"context_line":"                                .expect(\"invalid node\");"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"                            let mut output_needles: Vec\u003c_\u003e \u003d output_needles"},{"line_number":241,"context_line":"                                .needles"},{"line_number":242,"context_line":"                                .iter()"},{"line_number":243,"context_line":"                                // Map each output needle index back to the refscan_needle"}],"source_content_type":"text/x-rustsrc","patch_set":7,"id":"5fca5a20_523f0adb","line":240,"in_reply_to":"7a5d862f_591ddba3","updated":"2025-03-25 00:46:20.000000000","message":"Done, not sure if I made it any cleaner though","commit_id":"fa972e5b032f0f50b5565227652d73e6e399da5b"}]}
