)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"4886e43620bcba4f87129b577db4ffa2ccf25f36","unresolved":true,"context_lines":[{"line_number":17,"context_line":"outPath.  For example, perl538.src and perldevel.src use the same"},{"line_number":18,"context_line":"source tarball but a different `version`."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Anyways, I have found the root cause but have run out of time for a"},{"line_number":21,"context_line":"while, so I\u0027ve added a panic!() to in the spot where we have a logic"},{"line_number":22,"context_line":"bug in order to call it out."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"e0ebc1e8_11ca8b93","line":20,"updated":"2023-11-25 13:23:32.000000000","message":"How long did the debugging take, and do you think you\u0027ll get time to fix the bug in the near future, or is there a way to help you with that?\n\nI\u0027m fine having this debug commit on a path to rule out the bug, but we should also put in the resources to fix it.","commit_id":"c7bac83b7bc1a6646f80b542dcce7909c941ae1d"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"6d54e17e1fd411d12f2bce4f3aabf13d6d8ba8dd","unresolved":false,"context_lines":[{"line_number":17,"context_line":"outPath.  For example, perl538.src and perldevel.src use the same"},{"line_number":18,"context_line":"source tarball but a different `version`."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Anyways, I have found the root cause but have run out of time for a"},{"line_number":21,"context_line":"while, so I\u0027ve added a panic!() to in the spot where we have a logic"},{"line_number":22,"context_line":"bug in order to call it out."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"04362e8d_59bad4e0","line":20,"in_reply_to":"e0ebc1e8_11ca8b93","updated":"2023-12-09 03:30:12.000000000","message":"Acknowledged","commit_id":"c7bac83b7bc1a6646f80b542dcce7909c941ae1d"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"57d0386b2408c5f894cbc5ffe9110adcbc25c7d0","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"52ba44cd_1edbf8c0","updated":"2023-09-18 11:51:20.000000000","message":"Is there any other observable issue other than different .drv hashes?\n\nWe documented that in cl/9080, output paths are the same, and I\u0027m still not sure if we actually need to put in more work to properly track this.\n\nAlso note that things like https://github.com/NixOS/nix/issues/4347 exist, where Nix decided to \"shortcut\" to \"simpler FODs\" (though in other cases) - so I\u0027d argue using a \"simpler build recipe\" is actually more desirable.","commit_id":"b56e9fb91087c2e98002618aadc8f9343841d963"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"e279a620670d7356fe42e71aa36be122d3473c45","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"594648b4_d39b2b7b","in_reply_to":"52ba44cd_1edbf8c0","updated":"2023-09-18 23:20:16.000000000","message":"Yes, it affects `.outPath` hashes of packages downstream of the affected FOD.\n\nBasically, try this CL, and if it panics you know that the code *before* this CL would have returned an incorrect value instead.  Of course the best solution would be to fix the bug, but in the meantime I think that panicing at the point of error is better than silently returning incorrect results.\n\nTo fix the underlying bug we will need to change the data structures: `path` can\u0027t be just a `HashMap\u003cPathName, PathKind\u003e`; the values of the `HashMap` will somehow need to be a collection of `PathKind`s.\n\n\u003e Also note that things like https://github.com/NixOS/nix/issues/4347 exist,\n\nYou mentioned that PR on IRC, but I think you misunderstand what it does.  Read the code that goes with it -- notice how all of the important changes are wrapped in \"if `ca-derivations` then\" blocks.  The PR comment doesn\u0027t explain this, so it\u0027s easy to misread what it does unless you look at the code.\n\nAnyways, that PR has absolutely no effect unless you\u0027re using `ca-derivations`, which tvix doesn\u0027t support yet.","commit_id":"b56e9fb91087c2e98002618aadc8f9343841d963"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"6d54e17e1fd411d12f2bce4f3aabf13d6d8ba8dd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"91af48ac_2f27daed","in_reply_to":"55931f2a_49f63462","updated":"2023-12-09 03:30:12.000000000","message":"Done","commit_id":"b56e9fb91087c2e98002618aadc8f9343841d963"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"34112eb5af30388896f000d94aa4d6c3cbee66ef","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"beee85d2_b6245114","in_reply_to":"594648b4_d39b2b7b","updated":"2023-09-19 08:44:28.000000000","message":"\u003e Yes, it affects .outPath hashes of packages downstream of the affected FOD.\n\nHow? For output path calculation, FODs are replaced with some hashDevivationModulo string (https://cs.tvl.fyi/depot@6c586bc2a7a49755b4b2566c034bc1affc92011d/-/blob/tvix/nix-compat/src/derivation/mod.rs?L151), so this should only differ if the name differs (and we do already consider this different with the current design?)\n\n\u003e You mentioned that PR on IRC, but I think you misunderstand what it does. Read the code that goes with it -- notice how all of the important changes are wrapped in \"if ca-derivations then\" blocks. The PR comment doesn\u0027t explain this, so it\u0027s easy to misread what it does unless you look at the code.\n\nI read the code, and I understand it\u0027s only used in the ca-derivations case. My point was mostly that even Nix started to short-circuit in some FODs, because the output path doesn\u0027t change.\n\nMaybe it\u0027s better to talk about this in sync, to make sure we both talk about the same thing?","commit_id":"b56e9fb91087c2e98002618aadc8f9343841d963"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"602589068deac5477bd94d3fc9f06eb960800f1f","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"ed14a2c3_41e258af","in_reply_to":"82999064_f6468eb0","updated":"2023-10-06 09:37:49.000000000","message":"It seems perldevel got removed in 9f815be60520665e139fb8575a64218fc7994ecc, so I checked out 9f815be60520665e139fb8575a64218fc7994ecc~1, and it\u0027s not a FOD, but a flat file:\n\n❯ nix-build -A perldevel.src\n/nix/store/68iaivqj1m34j679hwnxx0hvimqd2m96-perl-5.38.0.tar.gz\n❯ nix-build -A perl538.src\n/nix/store/68iaivqj1m34j679hwnxx0hvimqd2m96-perl-5.38.0.tar.gz\n\nThis also seems to be the case on the release-23.05 branch, so I don\u0027t know how to reproduce this.","commit_id":"b56e9fb91087c2e98002618aadc8f9343841d963"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"f79dea623e82346ba45d58bcf56adb52fd6cfcfd","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"82999064_f6468eb0","in_reply_to":"beee85d2_b6245114","updated":"2023-09-19 08:46:44.000000000","message":"A different version is an instance of a different \"name\", as would be a different pname. They both end up in the \"name\".","commit_id":"b56e9fb91087c2e98002618aadc8f9343841d963"},{"author":{"_account_id":1000066,"name":"Adam Joseph","display_name":"amjoseph","email":"adam@westernsemico.com","username":"amjoseph"},"change_message_id":"1aa1bb7daf404cfbef7a135561957a927bc04139","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"55931f2a_49f63462","in_reply_to":"ce7f9417_6ce50318","updated":"2023-11-25 02:36:37.000000000","message":"\u003e I need to read known_paths and surroundings again to see if/how we need to handle this.\n\nOkay; since it\u0027s currently unhandled can we merge this in the meantime?\n\nA panic is better than somebody else having to rediscover all of this the hard way.","commit_id":"b56e9fb91087c2e98002618aadc8f9343841d963"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"597e79ffb7caf4851a494e2b8fc82a00ac4c3cda","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"ce7f9417_6ce50318","in_reply_to":"ed14a2c3_41e258af","updated":"2023-10-06 09:40:48.000000000","message":"I wasn\u0027t really able to figure out how to reproduce it, so I created another example, allowing to play with FODs of different names and/or different build recipes:\n\n\n\n```\nlet\n  pkgs \u003d …;\n  mkFod \u003d name: extraBuild: pkgs.stdenv.mkDerivation {\n    inherit name;\n    # src \u003d ./default.nix;\n    dontUnpack \u003d true;\n\n    buildPhase \u003d \u0027\u0027\n      mkdir -p $out\n      touch $out/.keep\n    \u0027\u0027 + extraBuild;\n\n    outputHashMode \u003d \"recursive\";\n    outputHashAlgo \u003d \"sha256\";\n    outputHash \u003d \"sha256-Q3QXOoy+iN4VK2CflvRulYvPZXYgF0dO7FoF7CvWFTA\u003d\";\n  };\nin {\n  fod-foo \u003d (mkFod \"foo\" \"\");\n  fod-foo2 \u003d (mkFod \"foo\" \"sleep 1\");\n  fod-bar \u003d (mkFod \"bar\" \"\");\n}\n```\n❯ nix-instantiate nix -A fod-foo\n/nix/store/8gx9j990sk4vy2a403g7cdj9qj1i04hb-foo.drv\n❯ nix-build -A fod-foo\n/nix/store/17wgs52s7kcamcyin4ja58njkf91ipq8-foo\n\n❯ nix-instantiate nix -A fod-foo2\n/nix/store/w55xzn5p67674nxhb2i0a6shrj07iasc-foo.drv\n❯ nix-build -A fod-foo2\n/nix/store/17wgs52s7kcamcyin4ja58njkf91ipq8-foo\n\n❯ nix-instantiate nix -A fod-bar\n/nix/store/jivx5zg9zkqk8gmpvxbg76qphmgjp9db-bar.drv\n❯ nix-build -A fod-bar\n/nix/store/xdr584252fnmr951y58030mdl94j3pqf-bar\n\nSo yes, both the output hash *and* the name (and only these two) is what affects the output path of a FOD. See https://docs.tvix.dev/rust/src/nix_compat/store_path/utils.rs.html#125-134, where exactly these two are function parameters.\n\nI need to read known_paths and surroundings again to see if/how we need to handle this.","commit_id":"b56e9fb91087c2e98002618aadc8f9343841d963"}]}
