aboutsummaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)Author
2024-08-18doc: fix broken meson deps for various manuals outputsJade Lovelace
This is incredibly haunted, but it can happen that you change libutil, breaking the generation of the .json files, which then does not rebuild the files. I don't expect they are slow to build, so it does not seem so bad to just rebuild them every time instead of extracting a list of all the possible deps. We want to delete this nonsense anyway and replace it with generated code. Change-Id: Ia576d1a3bdee48fbaefbb5ac194354428d179a84
2024-08-17libexpr: Deprecate URL literalspiegames
Closes #437. Change-Id: I9f67fc965bb4a7e7fd849e5067ac1cb3bab064cd
2024-08-17libexpr: Introduce Deprecated featurespiegames
They are like experimental features, but opt-in instead of opt-out. They will allow us to gracefully remove language features. See #437 Change-Id: I9ca04cc48e6926750c4d622c2b229b25cc142c42
2024-08-12release: release notes for 2.91.0Jade Lovelace
Release created with releng/create_release.xsh Change-Id: Ieb6ca02d3cf986b28440fce3792e8c38ce80a33e
2024-08-09rl-next: add extra context to a few release notesJade Lovelace
This was found while writing the release blog post. Change-Id: Ifd55f308d4d4c831273cbe6ea35d29a38e134783
2024-08-09rl-next: fix incorrect CL list syntaxJade Lovelace
This also fixes the script to not pass pre-commit by failing to parse an int if this mistake is made again. Change-Id: I714369f515dc9987cf0c600d54a2ac745ba56830
2024-08-09libstore: deprecate the build-hook settingeldritch horrors
implementing a build hook is pretty much impossible without either being a nix, or blindly forwarding the important bits of all build requests to some kind of nix. we've found no uses of build-hook in the wild, and the build-hook protocol (apart from being entirely undocumented) is not able to convey any kind of versioning information between hook and daemon. if we want to upgrade this infrastructure (which we do), this must not stay Change-Id: I1ec4976a35adf8105b8ca9240b7984f8b91e147e
2024-08-09Merge changes Ib7c80826,I636f8a71,I67669b98 into mainjade
* changes: perl: un-autos your conf build: declare all the deps as -isystem darwin: workaround PROC_PIDLISTFDS on processes with no fds
2024-08-08libexpr: Add experimental pipe operatorpiegames
The |> operator is a reverse function operator with low binding strength to replace lib.pipe. Implements RFC 148, see the RFC text for more details. Closes #438. Change-Id: I21df66e8014e0d4dd9753dd038560a2b0b7fd805
2024-08-07Merge "src/libcmd/repl.cc: allow :log /path/to/store.drv" into mainMax Siling
2024-08-07src/libcmd/repl.cc: allow :log /path/to/store.drvGoldstein
This adds a second form to the `:log` command: it now can accept a derivation path in addition to a derivation expression. As derivation store paths start with `/nix/store`, this is not ambiguous. Resolves: https://git.lix.systems/lix-project/lix/issues/51 Change-Id: Iebc7b011537e7012fae8faed4024ea1b8fdc81c3
2024-08-07Merge "fix: warn and document when advanced attributes will have no impact ↵Maximilian Bosch
due to __structuredAttrs" into main
2024-08-07darwin: workaround PROC_PIDLISTFDS on processes with no fdsJade Lovelace
This has been causing various seemingly spurious CI failures as well as some failures on people running tests on beta builds. lix> ++(nix-collect-garbage-dry-run.sh:20) nix-store --gc --print-dead lix> ++(nix-collect-garbage-dry-run.sh:20) wc -l lix> finding garbage collector roots... lix> error: Listing pid 87261 file descriptors: Undefined error: 0 There is no real way to write a proper test for this, other than to start a process like the following: int main(void) { for (int i = 0; i < 1000; ++i) { close(i); } sleep(10000); } and then let Lix's gc look at it. I have a relatively high confidence this *will* fix the problem since I have manually confirmed the behaviour of the libproc call is as-unexpected, and it would perfectly explain the observed symptom. Fixes: https://git.lix.systems/lix-project/lix/issues/446 Change-Id: I67669b98377af17895644b3bafdf42fc33abd076
2024-08-04flake & doxygen: update taglineJade Lovelace
This tagline was left over from CppNix and we should make it tastier. Change-Id: Ia182b86f6e751591be71a50521992ad73c7b38b5
2024-08-04nix flake metadata: print modified dates for input flakesJade Lovelace
This was always in the lock file and we can simply actually print it. The test for this is a little bit silly but it should correctly control for my daring to exercise timezone code *and* locale code in a test, which I strongly suspect nobody dared do before. Sample (abridged): ``` Path: /nix/store/gaxb42z68bcr8lch467shvmnhjjzgd8b-source Last modified: 1970-01-01 00:16:40 Inputs: ├───flake-compat: github:edolstra/flake-compat/0f9255e01c2351cc7d116c072cb317785dd33b33 │ Last modified: 2023-10-04 13:37:54 ├───flake-utils: github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a │ Last modified: 2024-03-11 08:33:50 │ └───systems: github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e │ Last modified: 2023-04-09 08:27:08 ``` Change-Id: I355f82cb4b633974295375ebad646fb6e2107f9b
2024-08-04cli: eat terminal codes from stdout alsoJade Lovelace
This *should* be sound, plus or minus the amount that the terminal code eating code is messed up already. This is useful for testing CLI output because it will strip the escapes enough to just shove the expected output in a file. Change-Id: I8a9b58fafb918466ac76e9ab585fc32fb9294819
2024-08-04Implement forcing CLI colour on, and document it betterJade Lovelace
This is necessary to make some old tests work when testing colour against non-interactive outputs. Change-Id: Id89f8a1f45c587fede35a69db85f7a52f2c0a981
2024-08-04manual: fix a syntax error in redirects.js that made it not do anythingJade Lovelace
lol lmao Let's put in a syntax checker in CI so we do not have to deal with this nonsense ever again. Change-Id: I0fe875e0cfc59ab1783087762e5bb07e09ded105
2024-08-04misc docs/meson tidyingJade Lovelace
The docs page has an incorrect escape that leads to a backslash appearing in output. Meson stuff is self-explanatory, just shortens and simplifies a bit. Change-Id: Ib63adf934efd3caeb82ca82988f230e8858a79f9
2024-08-04build: implement clang-tidy using our pluginJade Lovelace
The principle of this is that you can either externally build it with Nix (actual implementation will be in a future commit), or it can be built with meson if the Nix one is not passed in. The idea I have is that dev shells don't receive the one from Nix to avoid having to build it, but CI can use the one from Nix and save some gratuitous rebuilds. The design of this is that you can run `ninja -C build clang-tidy` and it will simply correctly clang-tidy the codebase in spite of PCH bullshit caused by the cc-wrapper. This is a truly horrendous number of hacks in a ball, caused by bugs in several pieces of software, and I am not even getting started. I don't consider this to fix the clang-tidy issue filing, since we still have a fair number of issues to fix even on the existing minimal configuration, and I have not yet implemented it in CI. Realistically we will need to do something like https://github.com/Ericsson/codechecker to be able to silence warnings without physically touching the code, or at least *diff* reports between versions. Also, the run-clang-tidy output design is rather atrocious and must not be inflicted upon anyone I have respect for, since it buries the diagnostics in a pile of invocation logs. We would do really well to integrate with the Gerrit SARIF stuff so we can dump the reports on people in a user-friendly manner. Related: https://git.lix.systems/lix-project/lix/issues/147 Change-Id: Ifefe533f3b56874795de231667046b2da6ff2461
2024-08-03fix: warn and document when advanced attributes will have no impact due to ↵Tom Bereknyei
__structuredAttrs Backport of https://github.com/NixOS/nix/pull/10884. Change-Id: I82cc2794730ae9f4a9b7df0185ed0aea83efb65a
2024-08-02Merge "nix flake show: add the description if it exists" into mainIsabel
2024-07-30src/libcmd/repl.cc: avoid unneeded reload after :eGoldstein
If `:edit`ing a store path, don't reload repl afterwards to avoid losing local variables: store is immutable, so "editing" a store path is always just viewing it. Resolves: https://git.lix.systems/lix-project/lix/issues/341 Change-Id: I3747f75ce26e0595e953069c39ddc3ee80699718
2024-07-25libstore/build: block io_uringAlois Wohlschlager
Unfortunately, io_uring is totally opaque to seccomp, and while currently there are no dangerous operations implemented, there is no guarantee that it remains this way. This means that io_uring should be blocked entirely to ensure that the sandbox is future-proof. This has not been observed to cause issues in practice. Change-Id: I45d3895f95abe1bc103a63969f444c334dbbf50d
2024-07-23nix flake show: add the description if it existsisabel
(cherry picked from commit 8cd1d02f90eb9915e640c5d370d919fad9833c65) nix flake show: Only print up to the first new line if it exists. (cherry picked from commit 5281a44927bdb51bfe6e5de12262d815c98f6fe7) add tests (cherry picked from commit 74ae0fbdc70a5079a527fe143c4832d1357011f7) Handle long strings, embedded new lines and empty descriptions (cherry picked from commit 2ca7b3afdbbd983173a17fa0a822cf7623601367) Account for total length of 80 (cherry picked from commit 1cc808c18cbaaf26aaae42bb1d7f7223f25dd364) docs: add nix flake show description release note fix: remove white space nix flake show: trim length based on terminal size test: account for terminal size docs(flake-description): before and after commands; add myself to credits Upstream-PR: https://github.com/NixOS/nix/pull/10980 Change-Id: Ie1c667dc816b3dd81e65a1f5395e57ea48ee0362
2024-07-19Merge changes Id8b3d289,Ib75ab5b8,I3792eeb3 into mainjade
* changes: Fixup a bunch of references to nixos.org manuals Add release notes for removing overflow from Nix language expr: fix a compiler warning about different signs in comparison
2024-07-19Merge changes I829581a3,I0016970d,I5dac8e77,Ib7560fe5 into mainalois31
* changes: doc/release-notes: add for pretty printing improvements libexpr/print: do not show elided nested items when there are none libexpr/print: never show empty attrsets or derivations as «repeated» libexpr/print: pretty-print idempotently
2024-07-18Fixup a bunch of references to nixos.org manualsJade Lovelace
(plus one reference to CppNix github) Change-Id: Id8b3d2897f3b54e286861805cfd421adc4d5de47
2024-07-18Add release notes for removing overflow from Nix languageJade Lovelace
Change-Id: Ib75ab5b8b4d879035d7ee7678f9cd0c491a39c0a
2024-07-18Merge changes Ib20e9aa0,I178a038b,I29c7de04 into mainjade
* changes: docs: document the actual comparison rules instead of lies daemon: remove workaround for macOS kernel bug that seems fixed daemon: fix a crash bug "FATAL: exception not rethrown"
2024-07-18doc/release-notes: add for pretty printing improvementsAlois Wohlschlager
Change-Id: I829581a3f5b8b742e6c866dcdbbc635f91afceb5
2024-07-18Merge "doc/manual: clarify documentation related to the `$$` parser bug" ↵alois31
into main
2024-07-17doc/release-notes: link the upcoming release notes againAlois Wohlschlager
The insertion marker comment broke the list into two parts, the first containing only the link to the upcoming release notes and the second the past releases. This confused the generator, leading to the first part being discarded. Indent the marker comment so that it's syntactically part of the preceding item, and in particular doesn't split the list any more. Change-Id: I357c51bb03e4e0d79a76d30158615fd9eda95ea8
2024-07-17doc/release-notes: add date for major releaseRaito Bezarius
Change-Id: I93aab93c069bb3989c3f8d17e0862899e6f76865 Signed-off-by: Raito Bezarius <raito@lix.systems>
2024-07-17doc/manual: clarify documentation related to the `$$` parser bugAlois Wohlschlager
Due to a mistake in the grammar, a dollar character implicitly escapes a second dollar character that immediately follows, so that it cannot start an interpolation. Unfortunately, this behaviour has since come to be relied upon, so it cannot be fixed. Furthermore, the documentation on regular strings did not mention this behaviour at all, while in the case of indented strings it was rather implicit. Mention it explicitly in both cases, and describe how an interpolation can follow a dollar character (namely, by escaping that). Since we have to touch that section anyway, state that any character (other than n, r, and t; but notably including `$` even if not succeeded by `{`) can be escaped using a backslash in regular strings. Change-Id: I7e5d68a9a4130eec98ce8218b485168f4b31a677
2024-07-13docs: document the actual comparison rules instead of liesJade Lovelace
Although the comparison rules are ugly and we do not like various parts of them, we must not hide them away for only catgirls to know about, so the documentation should actually say how they work. Change-Id: Ib20e9aa0e7b6486ade4f401035aafd85fbb08c91
2024-07-13docs: update to define integer overflowJade Lovelace
Change-Id: Ie8a1b31035f2d27a220e5df2e9e178ec3b39ee68
2024-07-10Merge changes I81552018,Ieb65c133 into maineldritch horrors
* changes: releng: add releaseTests flake output, test script add aarch64-linux as a cross-build target
2024-07-09add aarch64-linux as a cross-build targeteldritch horrors
we want to be sure we can cross-build to aarch64 for releases, add a target to our crossSystems list to make those cheacks easier to run. Change-Id: Ieb65c1333a5232641ace0ba4d122fc7d528ebc04
2024-07-09Fix dry-run flag for nix-collect-garbageQuantum Jump
`nix-collect-garbage --dry-run` previously elided the entire garbage collection check, meaning that it would just exit the script without printing anything. This change makes the dry run flag instead set the GC action to `gcReturnDead` rather than `gcDeleteDead`, and then continue with the script. So if you set `--dry-run`, it will print the paths it *would* have garbage collected, but not actually delete them. I filed a bug for this: https://git.lix.systems/lix-project/lix/issues/432 but then realised I could give fixing it a go myself. Change-Id: I062dbf1a80bbab192b5fd0b3a453a0b555ad16f2
2024-07-04distinguish between throws & errors during throwQyriad
Turns errors like this: let throwMsg = a: throw (a + " invalid bar"); in throwMsg "bullshit" error: … from call site at «string»:3:4: 2| throwMsg = a: throw (a + " invalid bar"); 3| in throwMsg "bullshit" | ^ … while calling 'throwMsg' at «string»:2:14: 1| let 2| throwMsg = a: throw (a + " invalid bar"); | ^ 3| in throwMsg "bullshit" … while calling the 'throw' builtin at «string»:2:17: 1| let 2| throwMsg = a: throw (a + " invalid bar"); | ^ 3| in throwMsg "bullshit" error: bullshit invalid bar into errors like this: let throwMsg = a: throw (a + " invalid bar"); in throwMsg "bullshit" error: … from call site at «string»:3:4: 2| throwMsg = a: throw (a + " invalid bar"); 3| in throwMsg "bullshit" | ^ … while calling 'throwMsg' at «string»:2:14: 1| let 2| throwMsg = a: throw (a + " invalid bar"); | ^ 3| in throwMsg "bullshit" … caused by explicit throw at «string»:2:17: 1| let 2| throwMsg = a: throw (a + " invalid bar"); | ^ 3| in throwMsg "bullshit" error: bullshit invalid bar Change-Id: I593688928ece20f97999d1bf03b2b46d9ac338cb
2024-07-04trace which part of `foo.bar.baz` errorsQyriad
Turns errors like: let somepkg.src = throw "invalid foobar"; in somepkg.src.meta error: … while evaluating the attribute 'src.meta' at «string»:2:3: 1| let 2| somepkg.src = throw "invalid foobar"; | ^ 3| in somepkg.src.meta … while calling the 'throw' builtin at «string»:2:17: 1| let 2| somepkg.src = throw "invalid foobar"; | ^ 3| in somepkg.src.meta error: invalid foobar into errors like: let somepkg.src = throw "invalid foobar"; in somepkg.src.meta error: … while evaluating the attribute 'src.meta' at «string»:2:3: 1| let 2| somepkg.src = throw "invalid foobar"; | ^ 3| in somepkg.src.meta … while evaluating 'somepkg.src' to select 'meta' on it at «string»:3:4: 2| somepkg.src = throw "invalid foobar"; 3| in somepkg.src.meta | ^ … while calling the 'throw' builtin at «string»:2:17: 1| let 2| somepkg.src = throw "invalid foobar"; | ^ 3| in somepkg.src.meta error: invalid foobar And for type errors, from: let somepkg.src = "I'm not an attrset"; in somepkg.src.meta error: … while evaluating the attribute 'src.meta' at «string»:2:3: 1| let 2| somepkg.src = "I'm not an attrset"; | ^ 3| in somepkg.src.meta … while selecting an attribute at «string»:3:4: 2| somepkg.src = "I'm not an attrset"; 3| in somepkg.src.meta | ^ error: expected a set but found a string: "I'm not an attrset" into: let somepkg.src = "I'm not an attrset"; in somepkg.src.meta error: … while evaluating the attribute 'src.meta' at «string»:2:3: 1| let 2| somepkg.src = "I'm not an attrset"; | ^ 3| in somepkg.src.meta … while selecting 'meta' on 'somepkg.src' at «string»:3:4: 2| somepkg.src = "I'm not an attrset"; 3| in somepkg.src.meta | ^ error: expected a set but found a string: "I'm not an attrset" For the low price of an enumerate() and a lambda you too can have the incorrect line of code actually show up in the trace! Change-Id: Ic1491c86e33c167891bdac9adad6224784760bd6
2024-07-04trace when the `foo` part of `foo.bar.baz` errorsQyriad
Turns errors like: let errpkg = throw "invalid foobar"; in errpkg.meta error: … while calling the 'throw' builtin at «string»:2:12: 1| let 2| errpkg = throw "invalid foobar"; | ^ 3| in errpkg.meta error: invalid foobar into errors like: let errpkg = throw "invalid foobar"; in errpkg.meta error: … while evaluating 'errpkg' to select 'meta' on it at «string»:3:4: 2| errpkg = throw "invalid foobar"; 3| in errpkg.meta | ^ … while calling the 'throw' builtin at «string»:2:12: 1| let 2| errpkg = throw "invalid foobar"; | ^ 3| in errpkg.meta error: invalid foobar For the low price of one try/catch, you too can have the incorrect line of code actually show up in the trace! Change-Id: If8d6200ec1567706669d405c34adcd7e2d2cd29d
2024-07-02Merge "Reject fully-qualified URLs in 'from' argument of `nix registry add`" ↵Delan Azabani
into main
2024-07-01Merge changes Ie29a8a89,I873eedcf into mainjade
* changes: store: delete obsolete lsof-disabling code store: guess the URL of failing fixed-output derivations
2024-06-30libexpr/flake: allow automatic rejection of configuration options from flakesAlois Wohlschlager
The `allow-flake-configuration` option allows the user to control whether to accept configuration options supplied by flakes. Unfortunately, setting this to false really meant "ask each time" (with an option to remember the choice for each specific option encountered). Let no mean no, and introduce (and default to) a separate value for the "ask each time" behaviour. Co-Authored-By: Jade Lovelace <lix@jade.fyi> Change-Id: I7ccd67a95bfc92cffc1ebdc972d243f5191cc1b4
2024-06-29Reject fully-qualified URLs in 'from' argument of `nix registry add`Delan Azabani
We previously allowed you to map any flake URL to any other flake URL, including shorthand flakerefs, indirect flake URLs like `flake:nixpkgs`, direct flake URLs like `github:NixOS/nixpkgs`, or local paths. But flake registry entries mapping from direct flake URLs often come from swapping the 'from' and 'to' arguments by accident, and even when created intentionally, they may not actually work correctly. This patch rejects those URLs (and fully-qualified flake: URLs), making it harder to swap the arguments by accident. Fixes #181. Change-Id: I24713643a534166c052719b8770a4edfcfdb8cf3
2024-06-27store: delete obsolete lsof-disabling codeJade Lovelace
Since Ifa0adda7984e, we don't use this code anymore on macOS, so we have no reason to have a knob to disable it anymore. Change-Id: Ie29a8a8978d9aefd4551895f4f9b3cc0827496df
2024-06-27store: guess the URL of failing fixed-output derivationsJade Lovelace
This is a shameless layering violation in favour of UX. It falls back trivially to "unknown", so it's purely a UX feature. Diagnostic sample: ``` error: hash mismatch in fixed-output derivation '/nix/store/sjfw324j4533lwnpmr5z4icpb85r63ai-x1.drv': likely URL: https://meow.puppy.forge/puppy.tar.gz specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= got: sha256-a1Qvp3FOOkWpL9kFHgugU1ok5UtRPSu+NwCZKbbaEro= ``` Change-Id: I873eedcf7984ab23f57a6754be00232b5cb5b02c
2024-06-26Merge "doc/hacking: fix up some outdated info about cross, hydra links" into ↵jade
main