New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix build against latest Nix master #818
Conversation
Flake input changes: * Updated 'nix': 'github:NixOS/nix/2a8017092025a7c108ca1a829a8b4f0bcf7ee2c0' -> 'github:NixOS/nix/8b4a542d1767e0df7b3c0902b766f34352cb0958' * Updated 'nix/lowdown-src': 'github:edolstra/lowdown/c7a4e715af1e233080842db82d15b261cb74cb28' -> 'github:kristapsdz/lowdown/1705b4a26fbf065d9574dce47a94e8c7c79e052f' * Updated 'nixpkgs': 'github:NixOS/nixpkgs/252bfe0107587d40092057f338e9ffcf7bbd90cb' -> 'github:NixOS/nixpkgs/5659cb448e9b615d642c5fe52779c2223e72f7eb'
Recently a few internal APIs have changed[1]. The `outputPaths` function has been removed and a lot of data structures are modeled with `std::optional` which broke compilation. This patch updates the code in `hydra-queue-runner` accordingly to make sure that Hydra compiles again. [1] NixOS/nix#3883
ping @edolstra anything missing to proceed here? :) |
@@ -434,7 +434,11 @@ void State::buildRemote(ref<Store> destStore, | |||
|
|||
auto now1 = std::chrono::steady_clock::now(); | |||
|
|||
auto outputs = step->drv->outputPaths(*localStore); | |||
StorePathSet outputs; | |||
for (auto & i : step->drv->outputsAndOptPaths(*localStore)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I was going to suggest using drv->outputsAndPaths()
here, but it seems to have disappeared mysteriously. (In a major git fail, git log -p src/libstore/derivations.cc
shows it being added but not being removed...) @Ericson2314 Do you know why it was removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might have disappeared in a merge commit; I've noticed git log -G
skipping that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean that the patch is fine overall?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might have been intentionally removed because we didn't want people to unintentionally not support floating CA derivations.
The build-remote protocol needs to be changed for those anyways, so I wouldn't worry for now.
This PR contains an automatic
flake.lock
update (2394140) and updates the code inhydra-queue-runner
to compile again (9cc76f6). The details can be found in the commit messages.
cc @edolstra @grahamc @Ericson2314 @lheckemann