| 2 Aug 2025 |
raitobezarius | for reference for those who are interested in testing the HEAD:
diff --git c/lix/libstore/build/local-derivation-goal.cc i/lix/libstore/build/local-derivation-goal.cc
index 68442d839..bd5cf4147 100644
--- c/lix/libstore/build/local-derivation-goal.cc
+++ i/lix/libstore/build/local-derivation-goal.cc
@@ -457,12 +457,13 @@ try {
"Failed to use the system-wide build directory '%s', falling back to a temporary "
"directory inside '%s'",
globalBuildDir,
- worker.buildDir
+ *worker.buildDir
);
+ }
}
/* Create a temporary directory where the build will take
place. */
- tmpDirRoot = createTempSubdir(buildDir, std::nullopt, 0700);
+ tmpDirRoot = createTempSubdir(*worker.buildDir, std::nullopt, 0700);
/* The TOCTOU between the previous mkdir call and this open call is unavoidable due to
* POSIX semantics.*/
tmpDirRootFd = AutoCloseFD{open(tmpDirRoot.c_str(), O_RDONLY | O_NOFOLLOW | O_DIRECTORY)};
diff --git c/lix/libutil/file-system.cc i/lix/libutil/file-system.cc
index f85202956..750d64cb4 100644
--- c/lix/libutil/file-system.cc
+++ i/lix/libutil/file-system.cc
@@ -677,7 +677,7 @@ Path makeTempPath(const Path & root, const std::optional<Path> & prefix)
const uint64_t entropy[2] = {uniform_dist(generator), uniform_dist(generator)};
const std::string unique = base32Encode(std::string_view(
reinterpret_cast<const char *>(entropy),
- sizeof(entropy),
+ sizeof(entropy)
));
if (prefix) {
return fmt("%s%s-%s", root, *prefix, unique);
should be sufficient on the top of the chain | 16:01:46 |
emily | (last hunk is a casualty of last-minute manual reformatting…) | 16:06:23 |
emily | (well, that and C++ being dumb) | 16:06:27 |
raitobezarius | don't worry | 16:06:40 |
raitobezarius | In reply to @emilazy:matrix.org
something like
For full logs, run:
nix log /nix/store/r0729886rq9nvzsngj2dnwwdl5q5dcq0-test.drv
The build directory has been kept in:
/nix/var/nix/b/3qxda0xkh4wllkxh182kvrza5n
i cooked | 16:27:02 |
raitobezarius | i should think how i could convey some nice note for remote builder usecases | 16:27:23 |
emily | was it that easy to move? I sorta figured it's printed as a separate note because the code paths are disconnected | 16:27:46 |
emily | (because that's the only way I could understand why it'd be like this) | 16:27:54 |
raitobezarius | i decided to make a buildErrorContents() virtual method | 16:27:56 |
raitobezarius | derivation goal calls it | 16:28:01 |
raitobezarius | default impl is the one of where it was | 16:28:06 |
raitobezarius | local derivation goal overrides and tacks more notes | 16:28:11 |
raitobezarius | the code paths are still slightly disconnected, so I add a boolean "tmpDirKept" to decide whether I should print or not | 16:28:32 |
raitobezarius | if I have settings.keepFailed && !tmpDirKept, I can even print info about why i did not keep the tmp dir | 16:28:45 |
emily | a weird thing is that when you use a remote builder it prints nix-store for the logs | 16:28:49 |
emily | even when using nix(1) | 16:28:55 |
emily | because I guess that message is from the remote | 16:28:59 |
raitobezarius | yeah because the error comes from derivation goal | 16:29:02 |
raitobezarius | yeah, the whole thing is a bit messy in that circumstance | 16:29:17 |
emily | seems like the remote builder should not be handling that kind of thing. but well, layering | 16:29:24 |
raitobezarius | <insert meme with the comedian with jokes on a card and all cards he have 'RPC fixes this'> | 16:29:52 |
raitobezarius | https://gerrit.lix.systems/c/lix/+/3861/1 | 16:35:47 |
raitobezarius | something like that | 16:35:48 |
raitobezarius | hm i changed the message too | 16:36:11 |
raitobezarius | i should have split the commit | 16:36:14 |
emily | all my cards are Jujutsu fixes this | 16:41:10 |
raitobezarius | https://www.gerritcodereview.com/2025-05-07-esc-minutes.html so we see you in Paris regarding jujutsu Ă— gerrit ? :> | 16:42:20 |
raitobezarius | fwiw this is the code that propagates the remote error
std::shared_ptr<Error> remoteError;
if (result.getResult().isBad()) {
remoteError = std::make_shared<Error>(from(result.getResult().getBad()));
logger->logEI(remoteError->info());
}
co_return HookResult::Accept{TRY_AWAIT(buildDone(remoteError))};
| 16:45:57 |
raitobezarius | across the RPC boundary | 16:46:02 |
raitobezarius | i think i can easily pass remoteError the buildErrorContents | 16:46:47 |