aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-04-08Don't run libstore unit tests in project rootRebecca Turner
This keeps the libstore unit tests from writing `libstore-unit-tests.xml` to the project root. Change-Id: I0d9909aabf9f3574cc1e72a5ae81daefba9a394b
2024-04-08Add `nixfmt`Rebecca Turner
Change-Id: I7f21695e3971cfd02b2cce0dd016ff6eb3389905
2024-04-08Merge "nix-doc -> lix-doc, make self-contained in package.nix" into mainjade
2024-04-08Merge "Rename some parse failure tests to `parse-fail-*`" into mainrebecca “wiggles” turner
2024-04-08Merge "Add `PathsSetting`" into mainrebecca “wiggles” turner
2024-04-08nix-doc -> lix-doc, make self-contained in package.nixJade Lovelace
package.nix previously needed this callPackage'd externally, which didn't make a lot of sense to us since this is an internal dependency. Thus we changed it to make it more self contained. Change-Id: I4935bc0bc80e1a132bc9b1519e917791da95037c
2024-04-07Merge pull request #10208 from 9999years/print-strings-directlyRobert Hensing
`:print` strings directly in `nix repl` (cherry picked from commit 3539172fd2f7cee639ce46423c58beca4231f2db) Change-Id: I1972f3bf3b56312851f38288509d371d37f21677 Upstream-PR: https://github.com/NixOS/nix/pull/10208
2024-04-07Add `PathsSetting`Rebecca Turner
Change-Id: I1165f6ef033a5f757ca3716d3f8008ba36b01fd0
2024-04-07flake: remove dead codeJade Lovelace
Some of this code existed for installer tests, and indeed its removal is an indication that our daemon cross-compatibility tests were removed. Although these are not like, super critical tests, we would like to restore them. See: https://git.lix.systems/lix-project/lix/issues/33 Change-Id: I75c733b25c00eca3a9676d498703bbfc1d6ec21b
2024-04-07Merge "flake: fix rl-next and rl-next-dev checks after 32eaa8a29 (fix nix ↵Qyriad
flake check)" into main
2024-04-07package: just use fileset from libQyriad
The following command is now sufficient to build Lix from outside of the flake: nix-build -E 'let pkgs = import <nixpkgs> { }; in pkgs.callPackage ./package.nix { build-release-notes = false; nix-doc = pkgs.callPackage ./nix-doc/package.nix { }; }' Change-Id: Ie6b14b446480ac07c7266d4fba20042b04cc35b9
2024-04-07flake: fix rl-next and rl-next-dev checks after 32eaa8a29 (fix nix flake check)Qyriad
follow-up to 32eaa8a29[1] "flake: move release note checks to hydraJobs", this commit fixes a load-bearing typo for`checks.rl-next` and `checks.rl-next-dev`. [1]: 32eaa8a2910793538deab31f85534faf7e722ef7 Change-Id: I9383ed21f7eccc337c0c2f65525418b735a94a1d
2024-04-07package: put boehmgc patch logic in package.nixQyriad
In our view it really doesn't make sense to not have this in in package.nix in some way. These patches aren't just for performance or something -- Lix flat out doesn't build without these patches. (Arguably that makes them a buildsystem responsibility as well, but that can wait for when we're ready to start adding subproject fallback dependency resolution to Meson.) This is a step towards making `package.nix` more self-sufficient and `callPackage`able without excessive external logic. With this change the following command is enough to build Lix from out of the flake: nix-build -E 'let pkgs = import <nixpkgs> { }; in pkgs.callPackage ./package.nix { build-release-notes = false; inherit (pkgs.lib) fileset; nix-doc = pkgs.callPackage ./nix-doc/package.nix { }; }' Change-Id: Ia37fe8171f87d3293033de8be07d9bab12716f1d
2024-04-06Merge "Rewrite REPL test parser" into mainrebecca “wiggles” turner
2024-04-06meson: fix warm nix3 CLI manual generationQyriad
`nix eval --write-to` refuses to write to a directory that exists at all, so now we generate in a temporary directory, and copy the generated tree to the build directory. This is equivalent to what the Make buildsystem did, actually, but hopefully more robust. Future work: documenting the doc generation architecture in the top-level meson.build outline comment. Change-Id: Ic3eb6d26e3cc249a1c042fd3ced22d637ac66a69
2024-04-06flake: move release note checks to hydraJobseldritch horrors
having them in checks only does not run them in CI, which can cause broken release notes entries to pass. fixes #228 Change-Id: If0ba7b1be0b6525fc884a27e941cbc84b5a160f9
2024-04-06avoid markdown which the repl's :doc cannot handlestuebinm
code blocks, if not surrounded by empty lines, have the language tags (in these cases, always `nix`) show up in the output of :doc. for example: nix-repl> :doc builtins.parseFlakeRef Synopsis: builtins.parseFlakeRef flake-ref Parse a flake reference, and return its exploded form. For example: nix builtins.parseFlakeRef "github:NixOS/nixpkgs/23.05?dir=lib" evaluates to: nix { dir = "lib"; owner = "NixOS"; ref = "23.05"; repo = "nixpkgs"; type = "github"; } is now instead: nix-repl> :doc builtins.parseFlakeRef Synopsis: builtins.parseFlakeRef flake-ref Parse a flake reference, and return its exploded form. For example: | builtins.parseFlakeRef "github:NixOS/nixpkgs/23.05?dir=lib" evaluates to: | { dir = "lib"; owner = "NixOS"; ref = "23.05"; repo = "nixpkgs"; type = "github"; } (closes #225) Change-Id: I0741aeb1006a5376bb2f663d202c7a4da7e38cce
2024-04-06Merge "package: add python to nativeBuildInputs" into mainQyriad
2024-04-06Merge "always re-eval cached failures" into mainQyriad
2024-04-06Merge "Create clang-tidy check to rename all our includes" into mainjade
2024-04-06Create clang-tidy check to rename all our includesJade Lovelace
It is a little bit scuffed, but it seems to produce correct results. We can run it at a later date when we want to explode every in-flight commit in existence and then need to filter-branch them. Fixes: https://git.lix.systems/lix-project/lix/issues/188 Change-Id: Id97e4651f78804a941d941df02c7c1b21ce453b6
2024-04-06always re-eval cached failuresQyriad
This is terrible UX, and frankly an eval failure should be a cache invalidation anyway. This removes the CachedEvalError type entirely. Fixes #223. Change-Id: I91f8003eabd0ea45003024e96d1de3c7ae8e49d8
2024-04-05package: add python to nativeBuildInputsQyriad
Commit c21d11ac0 "docs: replace sed invocation with an mdbook preprocessor for @docroot@" added a direct build dependency on Python. This has been accidentally working so far because Python is already a *transitive* dependency of Lix's derivation. Change-Id: I32d6b4f2665dbbfad7014613457dd58aa4ec73da
2024-04-06Merge "docs: replace sed invocation with an mdbook preprocessor for ↵Qyriad
@docroot@" into main
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-05Rewrite REPL test parserRebecca Turner
- Use a recursive descent parser so that it's easy to extend. - Add `@args` to enable customizing command-line arguments - Add `@should-start` to enable `nix repl` tests that error before entering the REPL - Make sure to read all stdout output before comparing. This catches some extra output we were tossing out before! Change-Id: I5522555df4c313024ab15cd10f9f04e7293bda3a
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-04Rename some parse failure tests to `parse-fail-*`Rebecca Turner
These were mistakenly labeled `eval-fail-*`. Note that the `lang.sh` runner passes `parse-fail-*` tests on stdin, so filenames are removed from error messages. Change-Id: I7f3a0d78b6cfa87af29aaa1b7af19d5a57fd4ade
2024-04-04docs: replace sed invocation with an mdbook preprocessor for @docroot@Qyriad
We're not entirely clear on why the links preprocessor has to be done *before* rather than after, but we assume it is probably that as a builtin preprocessor it does some processing on the raw book source, and not just the JSON data. Also a real use for Python pattern matching? I know I was surprised too. Change-Id: Ibe8b59e7b5bd5f357a655d8b4c5f0b0f58a67d6b
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