From a5d1f698417dff4e470eb94c38ad6c4e5ebf38ff Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sat, 18 May 2024 02:35:34 +0200 Subject: libstore: generatorize protocol serializers this is cursed. deeply and profoundly cursed. under NO CIRCUMSTANCES must protocol serializer helpers be applied to temporaries! doing so will inevitably cause dangling references and cause the entire thing to crash. we need to do this even so to get rid of boost coroutines, and likewise to encapsulate the serializers we suffer today at least a little bit to allow a gradual migration to an actual IPC protocol. (this isn't a problem that's unique to generators. c++ coroutines in general cannot safely take references to arbitrary temporaries since c++ does not have a lifetime system that can make this safe. -sigh-) Change-Id: I2921ba451e04d86798752d140885d3c5cc08e146 --- src/libstore/export-import.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstore/export-import.cc') diff --git a/src/libstore/export-import.cc b/src/libstore/export-import.cc index fa1020537..0355e5c87 100644 --- a/src/libstore/export-import.cc +++ b/src/libstore/export-import.cc @@ -46,7 +46,7 @@ void Store::exportPath(const StorePath & path, Sink & sink) teeSink << exportMagic << printStorePath(path); - CommonProto::write(*this, + teeSink << CommonProto::write(*this, CommonProto::WriteConn { .to = teeSink }, info->references); teeSink -- cgit v1.2.3