Qyriad
43aaa943bf
fix build with latest Lix
...
Lix commit 4dbbd721e[1] changed the way settings are changed, removing
operator= in the process. This commit changes the places where we use
operator= to using either setDefault(), or override(). I *believe* I
have used the correct ones for each changed setting.
Fixes #13 .
[1]: 4dbbd721eb
2024-10-25 14:29:57 -06:00
d9a46559a4
drv: backport CA derivations support changes from hydra-eval-jobs
...
It is not possible to query output paths for CA derivations since
they're not static / known at eval time. Instead, return JSON nulls for
outputs paths.
This is a partial port of the following Hydra commits:
- 9ba4417940
- 069b7775c5
- fcde5908d8
By the following authors:
Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems >
Co-Authored-By: Théophane Hufschmitt <theophane.hufschmitt@tweag.io >
Co-Authored-By: Alexander Sosedkin <monk@unboiled.info >
Co-Authored-By: Andrea Ciceri <andrea.ciceri@autistici.org >
Co-Authored-By: Charlotte 🦝 Delenk Mlotte@chir.rs >
Co-Authored-By: Sandro Jäckel <sandro.jaeckel@gmail.com >
2024-07-16 09:15:21 +02:00
eldritch horrors
f8869bdcca
update for lix 2.91-dev
...
the api of nix::Pid changed, causing a build failure.
2024-06-25 23:57:51 +02:00
Jade Lovelace
fd86a1a068
Fix on latest lix
...
Fixes: https://git.lix.systems/lix-project/nix-eval-jobs/issues/9
2024-06-18 23:08:04 -07:00
Jade Lovelace
9c23772cf2
Tidy and make it work on release-2.90
2024-06-18 22:31:42 -07:00
Puck Meerburg
11d467fecd
Use our own Thread struct instead of std::thread
...
We'd highly prefer using std::thread here; but this won't let us configure the stack
size. macOS uses 512KiB size stacks for non-main threads, and musl defaults to 128k.
While Nix configures a 64MiB size for the main thread, this doesn't propagate to the
threads we launch here. It turns out, running the evaluator under an anemic stack of
0.5MiB has it overflow way too quickly. Hence, we have our own custom Thread struct.
2024-06-12 22:39:53 +00:00
Jade Lovelace
b67c46d320
lix: deal with util.hh removal
2024-05-29 19:17:54 -07:00
Jade Lovelace and Lunaphied
30cf61fd26
fix: don't crash on startup on macOS
...
This is caused, through several layers of absurdity, by runtime type
information of Nix things being invisible due to -fvisibility=hidden
inside n-e-j.
We don't have any idea why n-e-j has -fvisibility=hidden, since blame
says it's from the initial commit. It is plausible that it was some
ill-advised optimization but it's not sound.
The crash is caused by dynamic_cast<RootArgs *>(MyArgs *) failing, which
is in turn caused by the RTTI being invisible.
See: https://www.qt.io/blog/quality-assurance/one-way-dynamic_cast-across-library-boundaries-can-fail-and-how-to-fix-it
Fixes: https://git.lix.systems/lix-project/nix-eval-jobs/issues/2
2024-05-27 18:23:13 -06:00
Jade Lovelace
a94f80e512
nixexpr -> lixexpr
2024-05-23 16:23:45 -07:00
Jörg Thalheim and Raito Bezarius
52e96bd421
fix crash in worker when opening the store
2024-05-11 17:41:27 +02:00
eldritch horrors
793841a9b7
fix drv.cc invalid output throw
...
EvalState::error does not return an exception instance in lix, but an
exception *builder*. throwing this thing will not trigger any catches,
which then causes the worker process to die without reporting an error
to the collector. this confuses the collector and causes *it* to exit,
effectively breaking nix-eval-jobs for anything that has broken attrs.
2024-04-18 18:05:33 +02:00
Linus Heckemann
c3d8ca19b3
EvalError needs to reference an eval state now
2024-04-15 19:35:05 +02:00
Linus Heckemann
c1ee00bf7c
ProcessOptions: remove allowVfork field
...
This was removed in Lix 1f8b85786e
2024-04-15 19:30:56 +02:00
Linus Heckemann
14e4308346
parseCmdline: no allowShebang arg
...
This arg was only introduced in Nix 2.19 (commit ffd414eb756dcb3c64348551d5dbaf674c0d4900)
2024-04-15 19:30:32 +02:00
Linus Heckemann
a2bd945259
hasPrefix -> starts_with
...
hasPrefix was removed in lix commit 61e21b2557
2024-04-15 19:28:36 +02:00
Linus Heckemann
733f3051b1
Fix include paths for Nix headers
...
While the previous style seems more sensible to me (the header names
are quite generic), the pkg-config definitions both from upstream Nix
and from Lix specify -I${includedir}/nix in CFLAGS rather than
-I${includedir}. This may be worth changing, but for now I want
nix-eval-jobs to work and this does what I want.
2024-04-15 19:20:21 +02:00
Jörg Thalheim and mergify[bot]
e3d71921c3
buffered-io: also check for interrupts in readline
...
This allows us to more reliable interrupt nix-eval-jobs
2023-12-17 12:15:15 +00:00
Jörg Thalheim
b73f7ceff4
classify SIGSEV/SIGBUS as infinite recursion errors
2023-12-16 11:58:01 +01:00
Jörg Thalheim
093b8ce5cc
apply treefmt
2023-12-16 11:44:08 +01:00
Jörg Thalheim
4d97e5a386
improve infinite recursion errors
2023-12-16 10:52:23 +01:00
Jörg Thalheim
83df9d4e24
fix exit status reporting when evaluation fails
2023-12-16 09:48:37 +01:00
Jörg Thalheim
89927c434c
make sure we also define HAVE_STRUCT_DIRENT_D_TYPE outside of autotools
2023-12-16 09:24:42 +01:00
Jörg Thalheim
1f4bbded61
optimize imports with "include-what-you-use"
2023-12-16 09:20:53 +01:00
Jörg Thalheim and mergify[bot]
521380076d
release proc.pid properly before calling waitpid()
2023-12-10 20:36:24 +00:00
Jörg Thalheim and mergify[bot]
e1ad62cef1
include orignal json in worker error message
2023-12-10 20:36:24 +00:00
Jörg Thalheim and mergify[bot]
d48cfadb3d
fix catching eval errors on macOS
2023-12-10 20:36:24 +00:00
Jörg Thalheim and mergify[bot]
c00fcbba8d
drop obsolete compiler warning suppression
2023-12-10 20:36:24 +00:00
Jörg Thalheim and mergify[bot]
b6ec7d2ecf
make MyArgs non-copyable
...
this seems to have weird effects
2023-12-10 20:36:24 +00:00
Jörg Thalheim and mergify[bot]
b24c03e2de
simplify collector function
...
looks like the lambda doesn't buy us anything here.
2023-12-10 20:36:24 +00:00
Jörg Thalheim and mergify[bot]
e7c30b306d
don't fail nix-eval-jobs on eval errors
...
This error handling was copied by accident in https://github.com/nix-community/nix-eval-jobs/pull/277/commits/5c764d4a67feceae1848414fd9434e79120884e6#diff-a79ded172fd76747492a417a39848b6c25c14238e65971e6a05fe81706d5048fR622
2023-12-10 15:57:18 +00:00
Jörg Thalheim and mergify[bot]
36a5368dfc
include missing filesystem header
2023-12-10 14:52:52 +00:00
Jörg Thalheim and mergify[bot]
3be8c48f54
fix format
2023-12-10 14:52:52 +00:00
Jörg Thalheim and mergify[bot]
a03f039a56
split nix-eval-jobs further into smaller files
2023-12-10 14:52:52 +00:00
Jörg Thalheim
880c66a7d1
move drvs ot its own class
2023-12-10 15:07:38 +01:00
Jörg Thalheim
db3099bc8f
move argument parsing to new file
2023-12-10 14:22:32 +01:00
Jörg Thalheim and mergify[bot]
00d3f014e7
print error if worker receives invalid command
2023-12-10 10:25:15 +00:00
Jörg Thalheim and mergify[bot]
93972c0c18
handle broken evaluation worker pipes on write
2023-12-10 10:25:15 +00:00
Jörg Thalheim and mergify[bot]
5ad4e7266f
handle broken evaluation worker pipes more gracefully
...
writeLine will throw a SysError exception, which obfuscates out-of-memory events where the eval worker is killed by the OS.
readLine is suffering from the same problem and will be handled in a subsequent commit.
2023-12-10 10:25:15 +00:00
Jörg Thalheim and mergify[bot]
fad244725f
print which derivation failed to evaluate
2023-12-10 08:31:27 +00:00
Jörg Thalheim and mergify[bot]
d4eeecf6b2
fix commandline parsing for nix 2.19
2023-12-06 08:30:10 +00:00
Jörg Thalheim and mergify[bot]
c240e61481
fix missing includes for nix 2.19
2023-12-06 08:30:10 +00:00
adisbladis and mergify[bot]
cb9c7cac6b
Fix iterating over input derivation outputs
2023-11-03 03:07:37 +00:00
adisbladis and mergify[bot]
dd8affe264
Add missing include for eval-settings.hh
2023-11-03 03:07:37 +00:00
Jörg Thalheim
56f0464288
use platform instead of querySystem()
...
nix-build uses "system" from the derivation rather than the derivation attributes
2023-10-07 22:52:14 +02:00
Jörg Thalheim and mergify[bot]
15ec2c4663
print derivation name if system attribute is missing
2023-09-12 07:07:07 +00:00
Andrea Bedini and mergify[bot]
f88571cfc9
Fix formatting
2023-07-14 07:09:40 +00:00
Andrea Bedini and mergify[bot]
15e5f5f7c8
Add --override-input
2023-07-14 07:09:40 +00:00
Andrea Bedini and mergify[bot]
ab07651f74
Small refactor to avoid optional values
2023-07-14 07:09:40 +00:00
Jörg Thalheim
9e8320dbd6
fix c++20 warnings
2023-06-10 13:52:28 +02:00
Jörg Thalheim
cace652bff
fix build on darwin
2023-06-10 13:50:23 +02:00