)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"62879f910f7afc6c9bd1341454e5a2b5db87b5bb","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"4951dee1_e20fd693","updated":"2023-12-09 12:24:13.000000000","message":"There are some whitespace errors in the proto. Is there a proto formatter we can add to depotfmt?","commit_id":"5b67668237e126718f307a2b21770ba074da69f2"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"71de75a482e79de5ab9fa78fa842cc38d9d961f0","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"e1960907_985cf456","in_reply_to":"4951dee1_e20fd693","updated":"2023-12-09 13:54:29.000000000","message":"Yes, `buf` has a `buf format` subcommand.\n\nI looped it into our per-crate buf invocations, and reformatted all protos with that.","commit_id":"5b67668237e126718f307a2b21770ba074da69f2"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"7b79e374674476faa5bd9c49249932541123ca08","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"ef2f21ef_35678224","in_reply_to":"e1960907_985cf456","updated":"2023-12-09 13:54:43.000000000","message":"Done","commit_id":"5b67668237e126718f307a2b21770ba074da69f2"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"e9178366a6f115e8cc2a5831c85297b473c3f86e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"118020b7_f6643dcb","updated":"2023-12-09 17:42:38.000000000","message":"If this depends on tvix-castore it needs to be called tvix-cabuild.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"25aef66bd569e9dcb08e725e60fb34ba85750122","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"b0ed6624_122ffe0e","updated":"2023-12-09 17:37:02.000000000","message":"This seems really repetitive; can\u0027t we just have two things\n\n1. A derivation\n2. A list of impure environment variables?","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"}],"tvix/build/protos/LICENSE":[{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"25aef66bd569e9dcb08e725e60fb34ba85750122","unresolved":true,"context_lines":[{"line_number":1,"context_line":"Copyright © The Tvix Authors"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"Permission is hereby granted, free of charge, to any person obtaining"},{"line_number":4,"context_line":"a copy of this software and associated documentation files (the"}],"source_content_type":"text/plain","patch_set":4,"id":"d624e2d3_8603d2b1","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":28},"updated":"2023-12-09 17:37:02.000000000","message":"Please change this to GPLv3","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"288caf8306a1632f5ba26675ab897d819dc53603","unresolved":true,"context_lines":[{"line_number":1,"context_line":"Copyright © The Tvix Authors"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"Permission is hereby granted, free of charge, to any person obtaining"},{"line_number":4,"context_line":"a copy of this software and associated documentation files (the"}],"source_content_type":"text/plain","patch_set":4,"id":"6efa87af_6bac8d4e","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":28},"in_reply_to":"03ef0689_9291cb54","updated":"2023-12-09 20:42:21.000000000","message":"There is already a GPL-3 license in //tvix itself, there\u0027s only a MIT License in //tvix/build/protos.\n\nHow would duplicating it in there change things?","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"490f218ff82f4290e93616b1247823cf98a4f408","unresolved":true,"context_lines":[{"line_number":1,"context_line":"Copyright © The Tvix Authors"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"Permission is hereby granted, free of charge, to any person obtaining"},{"line_number":4,"context_line":"a copy of this software and associated documentation files (the"}],"source_content_type":"text/plain","patch_set":4,"id":"03ef0689_9291cb54","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":28},"in_reply_to":"12b94e09_78137114","updated":"2023-12-09 19:49:00.000000000","message":"Ah, I see.  Yeah this is fine.\n\nCould you please add a LICENSE.GPL3 to //tvix/build/?","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"02d5deec3c038ebbd64b08bb4cf132f46c4feb85","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Copyright © The Tvix Authors"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"Permission is hereby granted, free of charge, to any person obtaining"},{"line_number":4,"context_line":"a copy of this software and associated documentation files (the"}],"source_content_type":"text/plain","patch_set":4,"id":"99a1c58e_cccc0d19","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":28},"in_reply_to":"6efa87af_6bac8d4e","updated":"2023-12-11 21:37:33.000000000","message":"Marking as resolved.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"3e19c846480c1464ed954c26005664d6a4f530d9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Copyright © The Tvix Authors"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"Permission is hereby granted, free of charge, to any person obtaining"},{"line_number":4,"context_line":"a copy of this software and associated documentation files (the"}],"source_content_type":"text/plain","patch_set":4,"id":"12b94e09_78137114","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":28},"in_reply_to":"d624e2d3_8603d2b1","updated":"2023-12-09 17:47:38.000000000","message":"Nak. All .proto files are MIT, also see \"License structure\" in /tvix/README.md:\n\n\u003e […] with the exception of the protocol buffer definitions used for communication between services which are available under a more permissive license (MIT).\n\nThe RPC interfaces themselves (code generated from it, like the golang bindings) are permissively licensed, so you can write your own proprietary implementation if you want.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"}],"tvix/build/protos/build.proto":[{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"c611014464ccff7b6bd9da18743dafad1f1f99a6","unresolved":true,"context_lines":[{"line_number":64,"context_line":"    // We don\u0027t want to bleed these very nix-specific sandbox impl details into"},{"line_number":65,"context_line":"    // (dumber) builders if we don\u0027t have to."},{"line_number":66,"context_line":"    // Environment vars are sorted by their keys."},{"line_number":67,"context_line":"    repeated EnvironmentVar environment_vars \u003d 3;"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    message EnvironmentVar {"},{"line_number":70,"context_line":"        string key \u003d 1;"}],"source_content_type":"text/x-protobuf","patch_set":2,"id":"688afcab_55d1faba","line":67,"range":{"start_line":67,"start_character":13,"end_line":67,"end_character":27},"updated":"2023-12-09 12:25:13.000000000","message":"It\u0027s strange to abbreviate half of it, and not the other one. Lets either go for EnvVar or EnvironmentVariable. I think EnvVar is sufficiently widespread to be fine.","commit_id":"5b67668237e126718f307a2b21770ba074da69f2"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"71de75a482e79de5ab9fa78fa842cc38d9d961f0","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    // We don\u0027t want to bleed these very nix-specific sandbox impl details into"},{"line_number":65,"context_line":"    // (dumber) builders if we don\u0027t have to."},{"line_number":66,"context_line":"    // Environment vars are sorted by their keys."},{"line_number":67,"context_line":"    repeated EnvironmentVar environment_vars \u003d 3;"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    message EnvironmentVar {"},{"line_number":70,"context_line":"        string key \u003d 1;"}],"source_content_type":"text/x-protobuf","patch_set":2,"id":"a6fcf9cd_54093268","line":67,"range":{"start_line":67,"start_character":13,"end_line":67,"end_character":27},"in_reply_to":"688afcab_55d1faba","updated":"2023-12-09 13:54:29.000000000","message":"Called it EnvVar.","commit_id":"5b67668237e126718f307a2b21770ba074da69f2"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"c611014464ccff7b6bd9da18743dafad1f1f99a6","unresolved":true,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    // TODO: allow describing something like \"preferLocal\", to influence composition?"},{"line_number":104,"context_line":"}"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"// service BuildService {"},{"line_number":107,"context_line":"//     rpc DoBuild(BuildRequest) returns (Build);"},{"line_number":108,"context_line":"// }"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"// A Build is (one possible) outcome of executing a [BuildRequest]."},{"line_number":112,"context_line":"message Build {"}],"source_content_type":"text/x-protobuf","patch_set":2,"id":"0cab794b_653ae926","line":109,"range":{"start_line":105,"start_character":0,"end_line":109,"end_character":0},"updated":"2023-12-09 12:25:13.000000000","message":"?","commit_id":"5b67668237e126718f307a2b21770ba074da69f2"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"71de75a482e79de5ab9fa78fa842cc38d9d961f0","unresolved":true,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    // TODO: allow describing something like \"preferLocal\", to influence composition?"},{"line_number":104,"context_line":"}"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"// service BuildService {"},{"line_number":107,"context_line":"//     rpc DoBuild(BuildRequest) returns (Build);"},{"line_number":108,"context_line":"// }"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"// A Build is (one possible) outcome of executing a [BuildRequest]."},{"line_number":112,"context_line":"message Build {"}],"source_content_type":"text/x-protobuf","patch_set":2,"id":"e7a3b1f4_36ec6bf1","line":109,"range":{"start_line":105,"start_character":0,"end_line":109,"end_character":0},"in_reply_to":"0cab794b_653ae926","updated":"2023-12-09 13:54:29.000000000","message":"Yes, this belongs into a rpc_build.proto, but I wanted to add the datastructures first, before adding the rpc methods (and server/client implementation).\n\nI now did it anyways, moved this to the separate file, plumbed it in everywhere, there\u0027s just no implementations for the service in rpc_build.proto yet.","commit_id":"5b67668237e126718f307a2b21770ba074da69f2"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"7b79e374674476faa5bd9c49249932541123ca08","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    // TODO: allow describing something like \"preferLocal\", to influence composition?"},{"line_number":104,"context_line":"}"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"// service BuildService {"},{"line_number":107,"context_line":"//     rpc DoBuild(BuildRequest) returns (Build);"},{"line_number":108,"context_line":"// }"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"// A Build is (one possible) outcome of executing a [BuildRequest]."},{"line_number":112,"context_line":"message Build {"}],"source_content_type":"text/x-protobuf","patch_set":2,"id":"cb94047d_d0655577","line":109,"range":{"start_line":105,"start_character":0,"end_line":109,"end_character":0},"in_reply_to":"e7a3b1f4_36ec6bf1","updated":"2023-12-09 13:54:43.000000000","message":"Done","commit_id":"5b67668237e126718f307a2b21770ba074da69f2"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"25aef66bd569e9dcb08e725e60fb34ba85750122","unresolved":true,"context_lines":[{"line_number":15,"context_line":"//"},{"line_number":16,"context_line":"// A BuildRequest can be seen as a more normalized version of a Derivation"},{"line_number":17,"context_line":"// (parsed from A-Term), \"writing out\" some of the Nix-internal details about"},{"line_number":18,"context_line":"// how e.g. environment variables in the build are set."},{"line_number":19,"context_line":"//"},{"line_number":20,"context_line":"// Nix has some impurities when building a Derivation, for example the --cores option"},{"line_number":21,"context_line":"// ends up as an environment variable in the build, that\u0027s not part of the ATerm."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"118686e0_337c00df","line":18,"range":{"start_line":18,"start_character":7,"end_line":18,"end_character":55},"updated":"2023-12-09 17:37:02.000000000","message":"Please change this to \"how e.g. *impure* environment variables in the build are set\".  I found this sentence very confusing until I read the next paragraph.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"c2375186aaca456e27a63128a1925fe5051cd095","unresolved":true,"context_lines":[{"line_number":15,"context_line":"//"},{"line_number":16,"context_line":"// A BuildRequest can be seen as a more normalized version of a Derivation"},{"line_number":17,"context_line":"// (parsed from A-Term), \"writing out\" some of the Nix-internal details about"},{"line_number":18,"context_line":"// how e.g. environment variables in the build are set."},{"line_number":19,"context_line":"//"},{"line_number":20,"context_line":"// Nix has some impurities when building a Derivation, for example the --cores option"},{"line_number":21,"context_line":"// ends up as an environment variable in the build, that\u0027s not part of the ATerm."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"5350be38_346bba06","line":18,"range":{"start_line":18,"start_character":7,"end_line":18,"end_character":55},"in_reply_to":"01e37628_b12e45bb","updated":"2023-12-09 19:58:04.000000000","message":"Okay the \"derivation plus impure environment variables, but flattened\".\n\nBut how would you go backwards from a BuildRequest to a Derivation?\n\nThis is a good example of the kind of trouble we might run into if we defer implementing the daemon protocol for too long.  I don\u0027t think you can go backwards from a BuildRequest to a Derivation, so we have to be careful not to turn Derivations into BuildRequests until we\u0027re totally certain we won\u0027t be using the daemon protocol.\n\nSo it makes me a bit nervous to be committing to stuff like this without an implementation of the \"daemon protocol translator\".  I guess I\u0027d be a lot more comfortable if the daemon protocol translator were implemented simultaneously with this.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"8646ea07b9e229355fe5537f34572f9ee405619b","unresolved":false,"context_lines":[{"line_number":15,"context_line":"//"},{"line_number":16,"context_line":"// A BuildRequest can be seen as a more normalized version of a Derivation"},{"line_number":17,"context_line":"// (parsed from A-Term), \"writing out\" some of the Nix-internal details about"},{"line_number":18,"context_line":"// how e.g. environment variables in the build are set."},{"line_number":19,"context_line":"//"},{"line_number":20,"context_line":"// Nix has some impurities when building a Derivation, for example the --cores option"},{"line_number":21,"context_line":"// ends up as an environment variable in the build, that\u0027s not part of the ATerm."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"9dc6703c_e435d91a","line":18,"range":{"start_line":18,"start_character":7,"end_line":18,"end_character":55},"in_reply_to":"118686e0_337c00df","updated":"2023-12-09 18:56:42.000000000","message":"Comment removed by: tazjin; Reason: Accidental double submit of comment","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"8646ea07b9e229355fe5537f34572f9ee405619b","unresolved":true,"context_lines":[{"line_number":15,"context_line":"//"},{"line_number":16,"context_line":"// A BuildRequest can be seen as a more normalized version of a Derivation"},{"line_number":17,"context_line":"// (parsed from A-Term), \"writing out\" some of the Nix-internal details about"},{"line_number":18,"context_line":"// how e.g. environment variables in the build are set."},{"line_number":19,"context_line":"//"},{"line_number":20,"context_line":"// Nix has some impurities when building a Derivation, for example the --cores option"},{"line_number":21,"context_line":"// ends up as an environment variable in the build, that\u0027s not part of the ATerm."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"1561d892_c7d8dd77","line":18,"range":{"start_line":18,"start_character":7,"end_line":18,"end_character":55},"in_reply_to":"118686e0_337c00df","updated":"2023-12-09 18:56:42.000000000","message":"I actually forgot to add the non-impure environment variables (from https://github.com/adisbladis/go-nix/commit/603df5db86ab97ba29f6f94d74f4e51642c56834#diff-60d42249bb53df5d3ffd44f507aee87a57c2cff5a20f6b1d8403a76d0ce609b0R45-R61) to cl/10236.\n\nIt\u0027s now in https://cl.tvl.fyi/c/depot/+/10236/8 - does it make more sense now? With that in mind, how would you write this section?\n\nWhat I meant to say is that the builder doesn\u0027t need to know the meaning of any of these environment variables, it\u0027s just flattened out in the BuildRequest, and done by derivation_to_build_request when translating from a Derivation to a BuildRequest.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"e82915b1f435643d7dd5f579c5ae8ef985fa8afd","unresolved":true,"context_lines":[{"line_number":15,"context_line":"//"},{"line_number":16,"context_line":"// A BuildRequest can be seen as a more normalized version of a Derivation"},{"line_number":17,"context_line":"// (parsed from A-Term), \"writing out\" some of the Nix-internal details about"},{"line_number":18,"context_line":"// how e.g. environment variables in the build are set."},{"line_number":19,"context_line":"//"},{"line_number":20,"context_line":"// Nix has some impurities when building a Derivation, for example the --cores option"},{"line_number":21,"context_line":"// ends up as an environment variable in the build, that\u0027s not part of the ATerm."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"0ede3a82_4729ee09","line":18,"range":{"start_line":18,"start_character":7,"end_line":18,"end_character":55},"in_reply_to":"1382fa1c_b63ce3bd","updated":"2023-12-11 21:33:50.000000000","message":"I think the build component is still too immature to consider this as cementing stuff, we _will_ probably have to redo work, especially when we will reach out to the \"daemon protocol translator\". As it\u0027s impossible to review a XXXL CL implementing everything simultaneously, I would be in favor of proceeding with the fact that Derivation -\u003e BuildRequest is kind of a forgetful functor.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"02d5deec3c038ebbd64b08bb4cf132f46c4feb85","unresolved":false,"context_lines":[{"line_number":15,"context_line":"//"},{"line_number":16,"context_line":"// A BuildRequest can be seen as a more normalized version of a Derivation"},{"line_number":17,"context_line":"// (parsed from A-Term), \"writing out\" some of the Nix-internal details about"},{"line_number":18,"context_line":"// how e.g. environment variables in the build are set."},{"line_number":19,"context_line":"//"},{"line_number":20,"context_line":"// Nix has some impurities when building a Derivation, for example the --cores option"},{"line_number":21,"context_line":"// ends up as an environment variable in the build, that\u0027s not part of the ATerm."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"cd7ddc17_ff1f7430","line":18,"range":{"start_line":18,"start_character":7,"end_line":18,"end_character":55},"in_reply_to":"1382fa1c_b63ce3bd","updated":"2023-12-11 21:37:33.000000000","message":"Marking as resolved.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"288caf8306a1632f5ba26675ab897d819dc53603","unresolved":true,"context_lines":[{"line_number":15,"context_line":"//"},{"line_number":16,"context_line":"// A BuildRequest can be seen as a more normalized version of a Derivation"},{"line_number":17,"context_line":"// (parsed from A-Term), \"writing out\" some of the Nix-internal details about"},{"line_number":18,"context_line":"// how e.g. environment variables in the build are set."},{"line_number":19,"context_line":"//"},{"line_number":20,"context_line":"// Nix has some impurities when building a Derivation, for example the --cores option"},{"line_number":21,"context_line":"// ends up as an environment variable in the build, that\u0027s not part of the ATerm."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"1382fa1c_b63ce3bd","line":18,"range":{"start_line":18,"start_character":7,"end_line":18,"end_character":55},"in_reply_to":"5350be38_346bba06","updated":"2023-12-09 20:42:21.000000000","message":"Everything in tvix is still experimental, there\u0027s no backwards-compat promises. Landing this as-is won\u0027t cement us into this approach.\n\nThe nix daemon protocol will take a while to materialize, I don\u0027t want to block this whole chain until we have a full E2E example with the old daemon protocol.\n\nIn the past, I did already re-architect stuff if something didn\u0027t work out, I\u0027m happy to do this again if need be.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"4fef75ae4070d069c23722ce557966fd42420803","unresolved":true,"context_lines":[{"line_number":15,"context_line":"//"},{"line_number":16,"context_line":"// A BuildRequest can be seen as a more normalized version of a Derivation"},{"line_number":17,"context_line":"// (parsed from A-Term), \"writing out\" some of the Nix-internal details about"},{"line_number":18,"context_line":"// how e.g. environment variables in the build are set."},{"line_number":19,"context_line":"//"},{"line_number":20,"context_line":"// Nix has some impurities when building a Derivation, for example the --cores option"},{"line_number":21,"context_line":"// ends up as an environment variable in the build, that\u0027s not part of the ATerm."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"01e37628_b12e45bb","line":18,"range":{"start_line":18,"start_character":7,"end_line":18,"end_character":55},"in_reply_to":"9dc6703c_e435d91a","updated":"2023-12-09 18:57:35.000000000","message":"(ignore the last (smaller) comment, gerrit burped on two drafts in the same thread)","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"25aef66bd569e9dcb08e725e60fb34ba85750122","unresolved":true,"context_lines":[{"line_number":27,"context_line":"//  - Nix only uses store path (strings) to describe the inputs."},{"line_number":28,"context_line":"//    As store paths can be input-addressed, a certain store path can contain"},{"line_number":29,"context_line":"//    different contents (as not all store paths are binary reproducible)."},{"line_number":30,"context_line":"//    This requires a global store of paths, and a way for the build requester"},{"line_number":31,"context_line":"//    to upload input-addressed paths, requiring the trusted users concept."},{"line_number":32,"context_line":"//  - tvix-build records a list of tvix.castore.v1.Node as inputs."},{"line_number":33,"context_line":"//    These map from the store path base name to their contents, relieving the"},{"line_number":34,"context_line":"//    builder from having to \"trust\" any input-addressed paths, contrary to Nix."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"581ae2a1_cc1a5288","line":31,"range":{"start_line":30,"start_character":0,"end_line":31,"end_character":75},"updated":"2023-12-09 17:37:02.000000000","message":"I\u0027m having a hard time understanding this.  Yes, the daemon protocol has opcodes for uploading input addressed store paths, but you don\u0027t have to use them if you\u0027re willing to upload the entire derivation tree.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"3e19c846480c1464ed954c26005664d6a4f530d9","unresolved":true,"context_lines":[{"line_number":27,"context_line":"//  - Nix only uses store path (strings) to describe the inputs."},{"line_number":28,"context_line":"//    As store paths can be input-addressed, a certain store path can contain"},{"line_number":29,"context_line":"//    different contents (as not all store paths are binary reproducible)."},{"line_number":30,"context_line":"//    This requires a global store of paths, and a way for the build requester"},{"line_number":31,"context_line":"//    to upload input-addressed paths, requiring the trusted users concept."},{"line_number":32,"context_line":"//  - tvix-build records a list of tvix.castore.v1.Node as inputs."},{"line_number":33,"context_line":"//    These map from the store path base name to their contents, relieving the"},{"line_number":34,"context_line":"//    builder from having to \"trust\" any input-addressed paths, contrary to Nix."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"9f566ffa_1ddfbf7c","line":31,"range":{"start_line":30,"start_character":0,"end_line":31,"end_character":75},"in_reply_to":"581ae2a1_cc1a5288","updated":"2023-12-09 17:47:38.000000000","message":"The point I\u0027m trying to make here is that a BuildRequest in itself is hermetic - all inputs are content-addressed by their castore nodes, and an individual build request doesn\u0027t need to maintain a global \"trusted\" context of input-addressed paths to their contents.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"02d5deec3c038ebbd64b08bb4cf132f46c4feb85","unresolved":false,"context_lines":[{"line_number":27,"context_line":"//  - Nix only uses store path (strings) to describe the inputs."},{"line_number":28,"context_line":"//    As store paths can be input-addressed, a certain store path can contain"},{"line_number":29,"context_line":"//    different contents (as not all store paths are binary reproducible)."},{"line_number":30,"context_line":"//    This requires a global store of paths, and a way for the build requester"},{"line_number":31,"context_line":"//    to upload input-addressed paths, requiring the trusted users concept."},{"line_number":32,"context_line":"//  - tvix-build records a list of tvix.castore.v1.Node as inputs."},{"line_number":33,"context_line":"//    These map from the store path base name to their contents, relieving the"},{"line_number":34,"context_line":"//    builder from having to \"trust\" any input-addressed paths, contrary to Nix."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"6c13d254_5790aa41","line":31,"range":{"start_line":30,"start_character":0,"end_line":31,"end_character":75},"in_reply_to":"8fc09c17_a190f1cb","updated":"2023-12-11 21:37:33.000000000","message":"Ah, I see, this is about the Nix\u0027 way. Sorry. I updated to use your suggestion (and added a \"(and needs to build it)\").","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"c2375186aaca456e27a63128a1925fe5051cd095","unresolved":true,"context_lines":[{"line_number":27,"context_line":"//  - Nix only uses store path (strings) to describe the inputs."},{"line_number":28,"context_line":"//    As store paths can be input-addressed, a certain store path can contain"},{"line_number":29,"context_line":"//    different contents (as not all store paths are binary reproducible)."},{"line_number":30,"context_line":"//    This requires a global store of paths, and a way for the build requester"},{"line_number":31,"context_line":"//    to upload input-addressed paths, requiring the trusted users concept."},{"line_number":32,"context_line":"//  - tvix-build records a list of tvix.castore.v1.Node as inputs."},{"line_number":33,"context_line":"//    These map from the store path base name to their contents, relieving the"},{"line_number":34,"context_line":"//    builder from having to \"trust\" any input-addressed paths, contrary to Nix."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"bfadf849_0fad51a0","line":31,"range":{"start_line":30,"start_character":0,"end_line":31,"end_character":75},"in_reply_to":"9f566ffa_1ddfbf7c","updated":"2023-12-09 19:58:04.000000000","message":"I would replace the highlighted text with \"This requires that for every input-addressed input, the builder has access to either the input\u0027s deriver or else a trusted source for the built input.\"","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"288caf8306a1632f5ba26675ab897d819dc53603","unresolved":true,"context_lines":[{"line_number":27,"context_line":"//  - Nix only uses store path (strings) to describe the inputs."},{"line_number":28,"context_line":"//    As store paths can be input-addressed, a certain store path can contain"},{"line_number":29,"context_line":"//    different contents (as not all store paths are binary reproducible)."},{"line_number":30,"context_line":"//    This requires a global store of paths, and a way for the build requester"},{"line_number":31,"context_line":"//    to upload input-addressed paths, requiring the trusted users concept."},{"line_number":32,"context_line":"//  - tvix-build records a list of tvix.castore.v1.Node as inputs."},{"line_number":33,"context_line":"//    These map from the store path base name to their contents, relieving the"},{"line_number":34,"context_line":"//    builder from having to \"trust\" any input-addressed paths, contrary to Nix."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"8fc09c17_a190f1cb","line":31,"range":{"start_line":30,"start_character":0,"end_line":31,"end_character":75},"in_reply_to":"bfadf849_0fad51a0","updated":"2023-12-09 20:42:21.000000000","message":"No, the builder doesn\u0027t have to have access to the inputs deriver or a trusted source for the build input. Everything in BuildRequest (and `inputs` specifically) is sufficient to realize everything needed to do the build.\n\nWe need someone to bring us the data, sure, but because all of this is content-addressed, we don\u0027t need to trust anyone, we can detect if they send us wrong data.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"25aef66bd569e9dcb08e725e60fb34ba85750122","unresolved":true,"context_lines":[{"line_number":29,"context_line":"//    different contents (as not all store paths are binary reproducible)."},{"line_number":30,"context_line":"//    This requires a global store of paths, and a way for the build requester"},{"line_number":31,"context_line":"//    to upload input-addressed paths, requiring the trusted users concept."},{"line_number":32,"context_line":"//  - tvix-build records a list of tvix.castore.v1.Node as inputs."},{"line_number":33,"context_line":"//    These map from the store path base name to their contents, relieving the"},{"line_number":34,"context_line":"//    builder from having to \"trust\" any input-addressed paths, contrary to Nix."},{"line_number":35,"context_line":"//"}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"f61a59f9_04852913","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":66},"updated":"2023-12-09 17:37:02.000000000","message":"So tvix-build cannot be used with just an ordinary store?\n\nYou mean it has a hard requirement on tvix-castore?  Hrm.  Not sure about that.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"c2375186aaca456e27a63128a1925fe5051cd095","unresolved":false,"context_lines":[{"line_number":29,"context_line":"//    different contents (as not all store paths are binary reproducible)."},{"line_number":30,"context_line":"//    This requires a global store of paths, and a way for the build requester"},{"line_number":31,"context_line":"//    to upload input-addressed paths, requiring the trusted users concept."},{"line_number":32,"context_line":"//  - tvix-build records a list of tvix.castore.v1.Node as inputs."},{"line_number":33,"context_line":"//    These map from the store path base name to their contents, relieving the"},{"line_number":34,"context_line":"//    builder from having to \"trust\" any input-addressed paths, contrary to Nix."},{"line_number":35,"context_line":"//"}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"24268682_05f0afb7","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":66},"in_reply_to":"cda26db2_fffae819","updated":"2023-12-09 19:58:04.000000000","message":"Done","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"3e19c846480c1464ed954c26005664d6a4f530d9","unresolved":true,"context_lines":[{"line_number":29,"context_line":"//    different contents (as not all store paths are binary reproducible)."},{"line_number":30,"context_line":"//    This requires a global store of paths, and a way for the build requester"},{"line_number":31,"context_line":"//    to upload input-addressed paths, requiring the trusted users concept."},{"line_number":32,"context_line":"//  - tvix-build records a list of tvix.castore.v1.Node as inputs."},{"line_number":33,"context_line":"//    These map from the store path base name to their contents, relieving the"},{"line_number":34,"context_line":"//    builder from having to \"trust\" any input-addressed paths, contrary to Nix."},{"line_number":35,"context_line":"//"}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"cda26db2_fffae819","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":66},"in_reply_to":"f61a59f9_04852913","updated":"2023-12-09 17:47:38.000000000","message":"The tvix RPC protocol identifies build inputs by their tvix-castore nodes. This is an advantage over plain paths due to the reasons described in comments and elsewhere in this file.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"25aef66bd569e9dcb08e725e60fb34ba85750122","unresolved":true,"context_lines":[{"line_number":42,"context_line":"// FUTUREWORK: We might be introducing another way to refer to inputs, to"},{"line_number":43,"context_line":"// support \"send all BuildRequest for a nixpkgs eval to a remote builder and put"},{"line_number":44,"context_line":"// the laptop to sleep\" usecases later."},{"line_number":45,"context_line":"message BuildRequest {"},{"line_number":46,"context_line":"  // The command (and its args) executed as the build script."},{"line_number":47,"context_line":"  // In the case of a Nix derivation, this is usually"},{"line_number":48,"context_line":"  // [\"/path/to/some-bash/bin/bash\", \"-e\", \"/path/to/some/builder.sh\"]."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"506cdc22_d07ddd72","line":45,"range":{"start_line":45,"start_character":0,"end_line":45,"end_character":22},"updated":"2023-12-09 17:37:02.000000000","message":"This seems really repetitive; can\u0027t we just have two things\n\n1. A derivation\n2. A list of impure environment variables?","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"3e19c846480c1464ed954c26005664d6a4f530d9","unresolved":true,"context_lines":[{"line_number":42,"context_line":"// FUTUREWORK: We might be introducing another way to refer to inputs, to"},{"line_number":43,"context_line":"// support \"send all BuildRequest for a nixpkgs eval to a remote builder and put"},{"line_number":44,"context_line":"// the laptop to sleep\" usecases later."},{"line_number":45,"context_line":"message BuildRequest {"},{"line_number":46,"context_line":"  // The command (and its args) executed as the build script."},{"line_number":47,"context_line":"  // In the case of a Nix derivation, this is usually"},{"line_number":48,"context_line":"  // [\"/path/to/some-bash/bin/bash\", \"-e\", \"/path/to/some/builder.sh\"]."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"5243dd1a_9e1352ef","line":45,"range":{"start_line":45,"start_character":0,"end_line":45,"end_character":22},"in_reply_to":"506cdc22_d07ddd72","updated":"2023-12-09 17:47:38.000000000","message":"There\u0027s no RPC definiton yet, this essentially is the derivation and other impure env vars/requirements.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"c2375186aaca456e27a63128a1925fe5051cd095","unresolved":false,"context_lines":[{"line_number":42,"context_line":"// FUTUREWORK: We might be introducing another way to refer to inputs, to"},{"line_number":43,"context_line":"// support \"send all BuildRequest for a nixpkgs eval to a remote builder and put"},{"line_number":44,"context_line":"// the laptop to sleep\" usecases later."},{"line_number":45,"context_line":"message BuildRequest {"},{"line_number":46,"context_line":"  // The command (and its args) executed as the build script."},{"line_number":47,"context_line":"  // In the case of a Nix derivation, this is usually"},{"line_number":48,"context_line":"  // [\"/path/to/some-bash/bin/bash\", \"-e\", \"/path/to/some/builder.sh\"]."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"6d0934e6_dae8a763","line":45,"range":{"start_line":45,"start_character":0,"end_line":45,"end_character":22},"in_reply_to":"5243dd1a_9e1352ef","updated":"2023-12-09 19:58:04.000000000","message":"This makes more sense now after our discussion.\n\nBut I do think that if we\u0027re going to have tvix\u0027s \"native protocol\" be something new, we should implement the translator to the old protocol simultaneously with it, so we don\u0027t end up with any ugly surprises later on.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"e82915b1f435643d7dd5f579c5ae8ef985fa8afd","unresolved":true,"context_lines":[{"line_number":92,"context_line":"    string system \u003d 1;"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    // The amount of memory required to be available for the build, in bytes."},{"line_number":95,"context_line":"    uint64 min_memory \u003d 2;"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    // A list of (absolute) paths that need to be available in the build"},{"line_number":98,"context_line":"    // environment."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"302b3263_11eb943c","line":95,"updated":"2023-12-11 21:33:50.000000000","message":"nit/design: I think minimum memory is a hint rather than a constraint. In general, you don\u0027t know in advance how much memory you need, you may set a value, try, fail, bump that value.\n\nIf you setup a minimum memory, you may want to set up a minimum disk space of the tempfs or something like that?\n\nEither case, in my ideal world, I would say that minimum memory and other resources should be automatically figured out and passed back as **hints** to the whole system, e.g. you run things, you see it fails because OOM, you derive a better value, you try it again, until it doesn\u0027t OOM or OOM \"terminally\" and then you can \"know\" about that hint.\n\nHints are probably specific to that very derivation and set of constraints, e.g. running a derivation without KVM for NixOS tests will have another set of performance requirements that with KVM, etc.\n\nThat\u0027s how I view this design feature, we can proceed with a constraint for now. It\u0027s a **nit**.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"0539462653543055b670d8ec45053d2dbf4f5418","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    string system \u003d 1;"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    // The amount of memory required to be available for the build, in bytes."},{"line_number":95,"context_line":"    uint64 min_memory \u003d 2;"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    // A list of (absolute) paths that need to be available in the build"},{"line_number":98,"context_line":"    // environment."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"3ef2143d_e3d25a56","line":95,"in_reply_to":"302b3263_11eb943c","updated":"2023-12-11 21:38:07.000000000","message":"Acknowledged","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"e82915b1f435643d7dd5f579c5ae8ef985fa8afd","unresolved":true,"context_lines":[{"line_number":100,"context_line":"    repeated string available_ro_paths \u003d 3;"},{"line_number":101,"context_line":"  }"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"  // TODO: allow describing something like \"preferLocal\", to influence composition?"},{"line_number":104,"context_line":"}"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"// A Build is (one possible) outcome of executing a [BuildRequest]."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"d7854c11_3bbfd1ee","line":103,"updated":"2023-12-11 21:33:50.000000000","message":"This loops back to my hint proposal.","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"0539462653543055b670d8ec45053d2dbf4f5418","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    repeated string available_ro_paths \u003d 3;"},{"line_number":101,"context_line":"  }"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"  // TODO: allow describing something like \"preferLocal\", to influence composition?"},{"line_number":104,"context_line":"}"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"// A Build is (one possible) outcome of executing a [BuildRequest]."}],"source_content_type":"text/x-protobuf","patch_set":4,"id":"6a26e8e9_1a0a7e95","line":103,"in_reply_to":"d7854c11_3bbfd1ee","updated":"2023-12-11 21:38:07.000000000","message":"Acknowledged","commit_id":"18d06c6e06bbbca824c0560ea13e5db728a269f9"}]}
