this needs a new method because overloading rules would make a pair of
methods taking `std::function`s of different argument types ambiguous.
we could've turned enqueue into a template and made `enqueueWithAio` a
private method too, but the necessary template magic is wasted on this
Change-Id: I93ccfde07126c287ad2a4dc5a07caec6a9d83944
signals could cause lockFile to return without having locked the file.
the garbage collector didn't check for this, and then hilarity ensued.
Change-Id: If86d33595e8bf5510d2b032139342261dc6e07c9
lockFile is currently interruptible by signals like SIGCHLD. which
happen a lot in daemons. now imagine that daemon enabled automatic
garbage collection. observe that the local store does not actually
check whether its lock operations have succeeded ... get the idea?
Change-Id: Ibfd7ee786c4fee3add72d4456a7e95e73e09c73e
propagating the "unlock" lock type through this high-level api is
nonsense. it doesn't make sense to treat locking and unlocking as
similar operations; unlocking *must* not not interruptible by our
checkInterrupt machinery or it will just leave locks lying around
for a potentially very long time. unlock operations should not be
taking long enough to *want* them interrupted anyway. even on nfs
this makes very little sense because nfs waits *uninterruptibly*.
Change-Id: I10d605c8fe6c651bee64466eee1f8e20251d39f4
only `AssertionError`s from the forcing of the `tryEval`'s argument
should be caught. reducing the scope makes that explicit.
Change-Id: I6de6e14dda07619134babe5ee24bb1afbfc5fec1
a65e9e5828 did not inform `tryEval` that
(as far as it's concerned) `state.debug` moved to `state.errors.debug`
and changed types. this resulted in the REPL erroneously coming up, that
REPL having a non-debug state, and segfaulting after that REPL exited.
it's probably good that `state.debug` isn't mutated by `--ignore-try`
anymore.
Change-Id: I1918e93edacd626452aa423fc2eb825080738835
Fixes: a65e9e5828 ("libexpr: extract eval error creation into new type")
Signed-off-by: Dusk Banks <me@bb010g.com>
We don't want any of this github integration stuff since it won't do
anything, flakes don't support subdirs properly and maintaining a second
flake is pointless and annoying, and then the rest is lix formatting
standards hitting n-e-j.
Yeet!
Change-Id: Ibcd3b0182d90f727562a92c215b6061c16502554
We will link to boehm inside of the test suite if it depends on libexpr
but we don't need it for other tests.
For anything linking to libexpr internally, just like externally, it
needs to link to boehm.
Likewise with kj and libutil (or really any lix), so we should just make
it automatic.
Change-Id: I2bb9ec4668e6ff741b4139fdce167f278eb71c7e
This is required for moving n-e-j into tree with good meson support: it
needs to be able to include `<lix/config.h>`.
Change-Id: I21f1cfa37dcdce992812c8b008df503c0fc9dea5
it's entirely not necessary. any time we'd print this exception we're
already being called as part of stack unwinding, and printing the way
it's done here causes crashes when the error is a user pressing ^C to
abort the current operation. printing all errors (including ones that
aren't interruptions) only causes unnecessary noise in terminal logs.
fixes fj#646
Change-Id: I965ff57bc9ecf7dff35963d7056aa3a5d8a83e39
I was wondering why there were only 59 succeeding jobs. We really need
to fix the buildbot at some point ;;
Change-Id: I81a22e32ac0dd0e105677f1b7bc064568009890d
These are only called when registering the schemes, so reordering them
to the previous order should ensure identical behaviour.
Change-Id: I12ea0e18e6dc897a91ad20cea3a765c0b96ae85e
Since we include kj from a header, we need to add a dependency to force
downstreams to also have it as a declared dependency or at least put it
in their include dir paths.
Given kj is what it is, this is basically unavoidable that this
dependency is visible.
Change-Id: Ia89a90f10ad8b821260db0d7fdc47aebda44e66a
the worker already wants to make a promise explicitly control-C-able,
and some other things in the future will want this as well. we do not
yet have the option to use the signal interfaces kj offers, but if we
can manage to remove all uses of the old-style notifiers we might get
there. until then we can at least wrap the old interfaces to be a bit
nicer to use, and eventually easier to replace with kj-provided code.
Change-Id: I079fdfe7720485820a9862c3615335d4e1df13e7
ifd requires building which uses async code today, fetching requires
network io which really should use async code but does not yet. eval
itself cannot be made async for performance reasons. offloading work
to other threads is possible but questionable as currently there are
no uses in which evaluation must take place from within asynchronous
operations, which are currently confined entirely to store behavior.
Change-Id: I1e3c86fca19b042d79332e9a5ef9546f90a6448b
this will let us add AsyncIoRoots to the toplevel objects and functions.
eventually we'll get rid of all offloading again byt covering the entire
space between main() and the worker entry points with promises. it won't
be a quick and easy journey; we have somewhere around 200 functions that
must be converted to async code, and some building blocks that are fully
incompatible with event loops on their own. this ranges from simple bits
like thread pools (which we can wrap in promise-fulfiller pairs), bigger
bits like the curl wrapper (which we can make async, but not easily), or
even impossible bits (like the libarchive wrapper, which can't be turned
into async code at all. not to worry though, we have *plans* for those.)
Change-Id: I95b91b0545659ece4ec1b85214df1ce2f1bc0164