1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 15:32:43 +01:00

Merge branch 'master' (pre-reformat)

This commit is contained in:
Eelco Dolstra 2025-07-23 21:22:19 +02:00
commit 72e8f7cd35
23 changed files with 202 additions and 131 deletions

View file

@ -59,6 +59,7 @@ boost = dependency(
'boost',
modules : ['context', 'coroutine', 'iostreams'],
include_type: 'system',
version: '>=1.82.0'
)
# boost is a public dependency, but not a pkg-config dependency unfortunately, so we
# put in `deps_other`.

View file

@ -194,10 +194,6 @@ size_t StringSource::read(char * data, size_t len)
}
#if BOOST_VERSION >= 106300 && BOOST_VERSION < 106600
#error Coroutines are broken in this version of Boost!
#endif
std::unique_ptr<FinishSink> sourceToSink(std::function<void(Source &)> fun)
{
struct SourceToSink : FinishSink

View file

@ -190,8 +190,10 @@ void ignoreExceptionInDestructor(Verbosity lvl)
try {
try {
throw;
} catch (Error & e) {
printMsg(lvl, ANSI_RED "error (ignored):" ANSI_NORMAL " %s", e.info().msg);
} catch (std::exception & e) {
printMsg(lvl, "error (ignored): %1%", e.what());
printMsg(lvl, ANSI_RED "error (ignored):" ANSI_NORMAL " %s", e.what());
}
} catch (...) { }
}
@ -202,8 +204,10 @@ void ignoreExceptionExceptInterrupt(Verbosity lvl)
throw;
} catch (const Interrupted & e) {
throw;
} catch (Error & e) {
printMsg(lvl, ANSI_RED "error (ignored):" ANSI_NORMAL " %s", e.info().msg);
} catch (std::exception & e) {
printMsg(lvl, "error (ignored): %1%", e.what());
printMsg(lvl, ANSI_RED "error (ignored):" ANSI_NORMAL " %s", e.what());
}
}

View file

@ -1,7 +1,8 @@
#include "nix/util/windows-async-pipe.hh"
#include "nix/util/windows-error.hh"
#ifdef _WIN32
# include "nix/util/windows-async-pipe.hh"
# include "nix/util/windows-error.hh"
namespace nix::windows {

View file

@ -1,6 +1,5 @@
#include "nix/util/windows-error.hh"
#ifdef _WIN32
#include "nix/util/windows-error.hh"
#include <error.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>