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

Update perl bindings for nix#9863 #1359

Merged
merged 1 commit into from Feb 12, 2024
Merged

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Feb 7, 2024

@Ericson2314
Copy link
Member

Ericson2314 commented Feb 8, 2024

OK the underlying Nix PR is merged!

@Ma27 can you spit this up so the 1st (or 1st and part of 4th) commit is in this PR, and the possibly-behavior-changing middle parts are in a second PR?

I just want to be very cautious and have a nice rollback ready in case something goes wrong :).

@Ma27
Copy link
Member Author

Ma27 commented Feb 12, 2024

I just want to be very cautious and have a nice rollback ready in case something goes wrong :).

Sure, this PR only contains the MACHINE_LOCAL_STORE changes. A second PR will be opened in a few minutes.

(or 1st and part of 4th)

Not necessary IMHO: w/o the BINARY_CACHE_STORE it's not necessary to read from hydra.conf and thus the include test doesn't break. Also this seemed to painful to split and push up in the history, so I figured it's OK that way.

flake.nix Outdated
@@ -2,7 +2,7 @@
description = "A Nix-based continuous build system";

inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05-small";
inputs.nix.url = "github:NixOS/nix";
inputs.nix.url = "github:obsidiansystems/nix/perl-open-other-store";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer needed, because I merged the underlying Nix PR!

Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good except for the Flake URL change.

Implements support for Nix's new Perl bindings[1]. The current state
basically does `openStore()`, but always uses `auto` and doesn't support
stores at other URIs.

Even though the stores are cached inside the Perl implementation, I
decided to instantiate those once in the Nix helper module. That way
store openings aren't cluttered across the entire codebase. Also, there
are two stores used later on - MACHINE_LOCAL_STORE for `auto`,
BINARY_CACHE_STORE for the one from `store_uri` in `hydra.conf` - and
using consistent names should make the intent clearer then.

This doesn't contain any behavioral changes, i.e. the build product
availability issue from NixOS#1352 isn't fixed. This patch only contains the
migration to the new API.

[1] NixOS/nix#9863
@Ma27
Copy link
Member Author

Ma27 commented Feb 12, 2024

Done! Required a few changes to the cpp code though.

Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

@Ericson2314 Ericson2314 merged commit 973cb64 into NixOS:nix-next Feb 12, 2024
1 check passed
@Ma27 Ma27 deleted the nix-perl-bindings branch February 12, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants