From c6f5a6a196611c7195f882a72c7c87bf09de63a7 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Mon, 24 Feb 2025 04:54:41 +0100 Subject: [PATCH] perl: fix computeFSClosure we must await the promise. also add a Werror argument to not break this again. Change-Id: Ia02fee1720c0280853bc299d3d20301370d93e56 --- perl/lib/Nix/Store.xs | 4 +++- perl/meson.build | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs index bd316d7a9..c4e24e497 100644 --- a/perl/lib/Nix/Store.xs +++ b/perl/lib/Nix/Store.xs @@ -159,7 +159,9 @@ SV * computeFSClosure(int flipDirection, int includeOutputs, ...) try { StorePathSet paths; for (int n = 2; n < items; ++n) - store()->computeFSClosure(store()->parseStorePath(SvPV_nolen(ST(n))), paths, flipDirection, includeOutputs); + aio().blockOn(store()->computeFSClosure( + store()->parseStorePath(SvPV_nolen(ST(n))), paths, flipDirection, includeOutputs + )); for (auto & i : paths) XPUSHs(sv_2mortal(newSVpv(store()->printStorePath(i).c_str(), 0))); } catch (Error & e) { diff --git a/perl/meson.build b/perl/meson.build index 55bf4561a..6e5000a14 100644 --- a/perl/meson.build +++ b/perl/meson.build @@ -9,6 +9,11 @@ project('lix-perl', 'cpp', ], ) +add_project_arguments( + '-Werror=unused-result', + language : 'cpp', +) + fs = import('fs') prefix = get_option('prefix')