aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-04-06Merge "meson: add missing tests: ca, dyn-drv, plugins, libstoreconsumer" ↵Qyriad
into main
2024-04-05Merge changes I1fa30114,I3ca208b6,Ide4c6e00,I74c46b9f,I05fa6a9d, ... into maineldritch horrors
* changes: Revert "libutil: drop Pool resources on exceptional free" Revert "libutil: remove Pool::Handle::bad" Revert "libstore: remove one Resource::good flag" Revert "libstore: using throwing finally in withFramedSink" Revert "libutil: allow graceful dropping of Pool::Handle" Revert "libutil: drop Fs{Source,Sink}::good" libutil: guard Finally against invalid exception throws
2024-04-05Merge "meson: run repl characterization test" into mainQyriad
2024-04-05Revert "libutil: drop Pool resources on exceptional free"eldritch horrors
This reverts commit de2884b82b376d10de5c400d8e73bc7d98f195d2. Change-Id: I1fa301149d7c2ed3d266a40c15b2d010e12e44e6
2024-04-05Revert "libutil: remove Pool::Handle::bad"eldritch horrors
This reverts commit 792844fb861ea7367ac2316c78fec055363f2f9e. Change-Id: I3ca208b62edfd5cd1199478f75cd2edf19a364f6
2024-04-05Revert "libstore: remove one Resource::good flag"eldritch horrors
This reverts commit 87249eb579bf57f4f09e9fca100588a4d6b90b4c. Change-Id: Ide4c6e00c4155216a17e46671ff47151d7bb85b4
2024-04-05Revert "libstore: using throwing finally in withFramedSink"eldritch horrors
This reverts commit 491caad6f62c21ffbcdebe662e63ec0f72e6f3a2. this is not actually legal for nix! throwing exceptions in destructors is fine, but the way nix is set up we'll end up throwing the exception we received from the remote *twice* in some cases, and such cases will cause an immediate terminate without active exception. Change-Id: I74c46b9f26fd791086e4193ec60eb1deb9a5bb2a
2024-04-05Revert "libutil: allow graceful dropping of Pool::Handle"eldritch horrors
This reverts commit 8075541d82d05347321d35b9934ccee5f82142f4. Change-Id: I05fa6a9de1308a4827a6557cf2807eb47ca64da6
2024-04-05Revert "libutil: drop Fs{Source,Sink}::good"eldritch horrors
This reverts commit 1340807e30dba4b3972c31f02861bbaeaeb60e61. Change-Id: I34d2a80eb3c3e9d79cb02b92cd1189da32d18cb6
2024-04-05libutil: guard Finally against invalid exception throwseldritch horrors
throwing exceptions is fine, but throwing exceptions during exception handling is hard enough to do correctly that we should just forbid it entirely out of an overabundance of caution. in cases where terminate is the correct answer the users of Finally must call it manually now. Change-Id: Ia51a2cb4a0638500550bfabc89cf01a6d8098983
2024-04-05Fix Boost with `make` buildRebecca Turner
This prevents the autotools build from discovering Boost in Homebrew installation directories on macOS. Change-Id: I624309165c9371c391fd657424ba4c4f3182b385
2024-04-04meson: add missing tests: ca, dyn-drv, plugins, libstoreconsumerQyriad
Change-Id: I6a74ebaf93697cb99aadd6b51538c2766b0a808a
2024-04-04Merge "Make `repl_characterization.cc` constants `string_view`s" into mainrebecca “wiggles” turner
2024-04-04Revert "meson: move nix3 manpage generation into command-ref/"Qyriad
This reverts commit 70954233743a233744787103d3211237a28ddbca. This seems to have broken running ninja on warm build directories, which is not what we want. Reverted until we figure out something better Change-Id: I9623ae078917e7c59a930bf8044a216501d4bb20
2024-04-04Merge "Add `EscapeStringOptions` and `escapeString` tests" into mainrebecca “wiggles” turner
2024-04-03meson: run repl characterization testQyriad
This was mistakenly left out of 69c3363f2. Fixes #205. Change-Id: Ib9a2088c9eee3a192623bee107ba32221d048640
2024-04-03Merge "meson: move nix3 manpage generation into command-ref/" into mainQyriad
2024-04-03meson: move nix3 manpage generation into command-ref/Qyriad
This puts the generated files where they are for the make system. This is in preparation for further meson-mdbook stuff. Change-Id: I934df6854a80af5ccf381cf1da0bda0187a8bcfc
2024-04-03repl: improve `:doc` builtin repl command to support lambdas.Lunaphied
For a long time `nix repl` has supported displaying documentation set on builtins, however, it has long been convention to use Markdown comments on Nix functions themselves for documentation. This exposes that information to `nix repl` users in a nice and formatted way. NixOS/rfcs#145 doc-comments are primarily what this feature is intended to consume, however, support for lambda documentation in the repl is experimental. We do our best effort to support the RFC here. These changes are based on [the nix-doc library](https://github.com/lf-/nix-doc) and are licensed under the terms described in the relevant source files. Change-Id: Ic6fe947d39a22540705d890737e336c4720b0a22
2024-04-03Make `repl_characterization.cc` constants `string_view`sRebecca Turner
Change-Id: I96455ee365799ae87d9ab433cf102c691616a45e
2024-04-03Add `EscapeStringOptions` and `escapeString` testsRebecca Turner
Change-Id: I86ead2f969c9e03c9edfa51bbc92ee06393fd7d6
2024-04-03Merge "Add `treefmt` `pre-commit` hook" into mainrebecca “wiggles” turner
2024-04-02Merge "meson: implement perl bindings" into mainQyriad
2024-04-02meson: implement perl bindingsQyriad
Change-Id: Ie1bfb0aa784e6136a82d518a652d0ae60c4b047a
2024-04-02Merge "Use upstream `cachix/git-hooks.nix` for pre-commit" into mainrebecca “wiggles” turner
2024-04-01doc: remove the -- unescaping hackeldritch horrors
lowdown has an option to disable this behavior. use it. Change-Id: I06d4201b7f528021ddb8e94ac6baff385402e080
2024-04-01meson: add switch to disable docseldritch horrors
the make build system can do this too. Change-Id: I8c07d159cab54a8749c50dc33615f60bd251a86d
2024-04-01Use upstream `cachix/git-hooks.nix` for pre-commitRebecca Turner
Change-Id: I6bbc7d6da9accd7d2daffa9d780384df7226670e
2024-04-01Merge "Delete autoconf generated code from tree" into mainjade
2024-04-01libexpr/flake: don't purple the flake.lock diffK900
Change-Id: I6f9471fb0ddd51fadb209ad970abd215238ba5c4
2024-03-31flake: Add cmake to devShellArtemis Tosini
Meson fails to setup when cmake is not found. Add cmake to the default devShell so meson build works. Change-Id: I4d933efac9540c564f3171e43c23e7a645722ef7
2024-03-31Merge pull request #9920 from 9999years/forbid-nested-debuggersThéophane Hufschmitt
Forbid nested debuggers (cherry picked from commit e164b39ee90fd655dbb7f479fdd4fbe38cc883bd) Change-Id: Iff62f40fd251116516a63e2d3f9fb5b21480b16d
2024-03-31libutil: drop Fs{Source,Sink}::goodeldritch horrors
setting this only on exceptions caused by actual fd access is not sufficient to diagnose all errors (such as SerialisationError) in some cases. this usually does not have any negative effects since those errors will end up killing the process in another way. this is not a reliable assumption though and we should be using proper error handling (and closing connections more often, preferring to close over keeping something open that might be in a weird state) Change-Id: I1b792cd7ad8ba9ff0f6bd174945ab2575ff2208e
2024-03-31libutil: allow graceful dropping of Pool::Handleeldritch horrors
not needed yet, but returning a resource from the exception handling path that has ownership of a handle is currently not well-supported. we could also add a default constructor to Handle, but then we would also need to change the pool reference to a pointer. eventually that should be done since now resources can be swapped between pools with clever moves, but since that's not a problem yet we won't do it now. Change-Id: I26eb06581f7be34569e9e67a33da736128d167af
2024-03-31Merge changes Ib62d3d68,Ic3e7affe into mainjade
* changes: Make things that can throw not noexcept anymore Fix various clang-tidy lints
2024-03-31Merge "Add basic clang-tidy config" into mainjade
2024-03-31libstore: using throwing finally in withFramedSinkeldritch horrors
the duplication of exception handling was added without justification, so we can only assume that it was done like this because Finally could not throw exceptions safely. since this has now been rectified we will deduplicate this handler code again. Change-Id: I40721f3378c0fd9f34e2914a16d383f6e2713b40
2024-03-31libutil: make ~Finally noexcept(false)eldritch horrors
this is supposed to act like a finally block does in other languages. a finally block should be able to throw exceptions of its own rather than just crashing the entire program when it throws it own exceptions. even in the rare case of a finally throwing an unexpected exception it might be better to report the exception from Finally instead of the original, at least that can keep our program running instead of letting it crash. Change-Id: Id42011e46b1df369152b4564938c0e93fa1acf32
2024-03-31libstore: remove one Resource::good flageldritch horrors
usage of this flag previously kept connections open much longer than necessary, and at the same time obscured that a connection was being dropped when it *was* set. new variable names clarify this somewhat. Change-Id: I11f6f08f37a5e4dc04ea6c6036ea589154b121c6
2024-03-31libutil: remove Pool::Handle::badeldritch horrors
it was used incorrectly (not swapped on handle move), only used in one place (that is now handled with exception handling detection in Handle itself), and if ever reintroduced should be replaced with a different, more understandable mechanism (like an explicit dropAsInvalid method). Change-Id: Ie3e5d5cfa81d335429cb2ee5c3ad85c74a9df17b
2024-03-31libutil: remove Pool::flushBadeldritch horrors
this was never actually used, and bad design in the first place—why should a bad resource be put back into the idle pool? just drop it. Change-Id: Idab8774bee19dadae0209d404c4fb86dd4aeba1e
2024-03-30libutil: drop Pool resources on exceptional freeeldritch horrors
if a scope owning a resource does not gracefully drop that resource while handling exceptions from deeper down the call stack we should assume the resource is invalid state and drop it. currently it *is* true that such cases do not cause resources to be freed, but thanks to validator misuses this has so far not caused any larger problem. Change-Id: Ie4f91bcd60a64d05c5ff9d22cc97954816d13b97
2024-03-30Merge "Add `pre-commit` checks" into mainrebecca “wiggles” turner
2024-03-30perl: put perl dependencies in buildInputs instead of manually passing them ↵Qyriad
to configure Perl has an env hook[1]. Passing the paths manually without putting them in buildInputs is harder to understand, plays less nicely with dev shells, and is less build-generic. Produced identical output on my x86_64-linux machine, and on my aarch64-darwin machine was identical save for the derivation output path which gets embedded into the .dylib Mach-O. Change-Id: Ib313caa5a6f0b0e3154ce6f05379033920d0d290
2024-03-30meson: install libexec binarieseldritch horrors
Change-Id: I149892bf081e1569d7786f085e890bc3d2eb50e5
2024-03-30meson: build and install nix3 manpageseldritch horrors
this notably does *not* install the `nix3-manpages` manpage the old system generated, mostly because that page was empty and just a bug with a coat of documentation paint. Change-Id: I7a4248a72e7bb5e0cc925a6311a33b6b72589569
2024-03-30meson: add manpages for old cli and config fileseldritch horrors
Change-Id: I93384ec774d1945a649f6aaf7cd967c3fb7197f9
2024-03-30build: extract make "functions" into scriptseldritch horrors
we'll want to use these for the meson builds, and probably eventually rewrite them in something that isn't plain shell. diffoscope confirms that out/share and doc/share are equal before and after these changes Change-Id: I49aa418fc8615cad86d67328e08c28a7405ec952
2024-03-29Add `treefmt` `pre-commit` hookRebecca Turner
This lets us use different formatters for different filetypes. Change-Id: Ib52383dd5097c8919a65e299aca2b5a55412223c
2024-03-29Add `pre-commit` checksRebecca Turner
The big ones here are `trim-trailing-whitespace` and `end-of-file-fixer` (which makes sure that every file ends with exactly one newline character). Change-Id: Idca73b640883188f068f9903e013cf0d82aa1123