Skip to content
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

Merged
merged 2 commits into from Oct 20, 2020
Merged

Conversation

@Ma27
Copy link
Member

@Ma27 Ma27 commented Sep 26, 2020

This PR contains an automatic flake.lock update (2394140) and updates the code in hydra-queue-runner to compile again (
9cc76f6). The details can be found in the commit messages.

cc @edolstra @grahamc @Ericson2314 @lheckemann

Ma27 added 2 commits Sep 26, 2020
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
@Ma27
Copy link
Member Author

@Ma27 Ma27 commented Oct 9, 2020

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)) {
Copy link
Member

@edolstra edolstra Oct 9, 2020

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?

Copy link
Member

@Ericson2314 Ericson2314 Oct 17, 2020

It might have disappeared in a merge commit; I've noticed git log -G skipping that

Copy link
Member Author

@Ma27 Ma27 Oct 17, 2020

Does it mean that the patch is fine overall?

Copy link
Member

@Ericson2314 Ericson2314 Oct 20, 2020

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.

@edolstra edolstra merged commit bea7c25 into NixOS:master Oct 20, 2020
2 checks passed
@Ma27 Ma27 deleted the update-nix-unstable branch Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants