Commit Graph
18594 Commits
Author SHA1 Message Date
Tom Hubrecht fd273186c6 libexpr/builtins: Document appendContext
Change-Id: Ic45e0d4f6f1646552a7162bd8916f63fc11e5e62
2025-11-23 07:26:15 +00:00
Qyriad be18b7dc25 parser: improve error message for missing semicolon in inherit
Before:
  error: syntax error, expecting ';'

After:
  error: syntax error, expecting ';' to end 'inherit' bindings


Change-Id: I47c633cb5c696b646840c58e03270a7d6a6a6964
2025-11-22 16:48:53 +01:00
Qyriad b3e24cb3e5 new option: abort-on-warn
Co-authored-by: Emilia Bopp <contact@ebopp.de>

Change-Id: I3c3347e51d8543fbeb2b4e6ed12b0f556a6a6964
2025-11-22 16:48:53 +01:00
Qyriad 2d85d4c7b6 new option: debugger-on-warn
Co-authored-by: Emilia Bopp <contact@ebopp.de>

Change-Id: I5e20304538dd3e27fb36c32c0a6133cd6a6a6964
2025-11-22 16:48:53 +01:00
Tom Hubrecht 94ca4fd7b4 treefmt: Add meson/clang-tidy to the list of files checked by ruff
Change-Id: I3141286069844588a721cd4e523a284ef3a359c8
2025-11-22 13:19:40 +01:00
Commentator2.0 b707403a30 tests/functional2: migrate eval.sh
Change-Id: Ib5fb9e3b5d76612e7259ec17fb890298198fc885
2025-11-21 17:35:47 +00:00
Commentator2.0 40416d103f tests/functional: remove the now fully migrated lang framework
We have done it!
The functional/lang framework has fully been migrated to functional2 :D

closes: #856

Change-Id: I63ad8d7dbcd9b5267ca04af68df73b1ffa3d6461
2025-11-21 17:02:35 +00:00
Tom Hubrecht 8558cf781a libexpr/builtins: Document derivationStrict
Co-authored-by: eldritch horrors <pennae@lix.systems>
Co-authored-by: Qyriad <qyriad@qyriad.me>

Change-Id: I4cf95683da54efe830514f3a6795057cadd223c6
2025-11-21 14:59:03 +01:00
Tom Hubrecht 428a0bcb5e nix/run: Move argument parsing in the ifdef
Most of the arguments are only used on linux platforms

Change-Id: Iab79a3edf346257a2cd1c6e18ead2f1f77c7cc6d
2025-11-21 11:56:38 +00:00
Commentator2.0 9be0c2ee15 releng: issue references are now lix issues by default
After multiple cycles of deprecation, we now use the lix repositorty as
a default, when no prefix is defined

Change-Id: I29b445fee39fb20c0ff024e3b95402f459144b62
2025-11-20 18:03:45 +00:00
Qyriad 6192cbebac libexpr: refactor fallibly doing stuff on debug traces (NFC)
Change-Id: I009ce2ea424938507223fc6b3cf3b1236a6a6964
2025-11-20 17:52:29 +01:00
Emilia BoppandQyriad 0ade82d23a libexpr: add builtins.warn
Added builtins.warn` which takes two arguments: a message that is
displayed as a warning during evaluation which must be a string and a
value that is returned from the expression.

The next commits add new settings to control the behavior of the new
builtin: `debugger-on-warn` allows the user to start the debugger and
`abort-on-warn` aborts evaluation with an error.

Unlike upstream, I chose not to mark evaluation warnings from
`builtins.warn` as distinct from other warnings because that breaks the
commonly expected logging format `level: message`.

Co-authored-by: Qyriad <qyriad@qyriad.me>
Upstream-PR: https://github.com/NixOS/nix/pull/10592
Fixes: https://git.lix.systems/lix-project/lix/issues/579
Change-Id: I8658c88e5c27952b65e8b9f5525a572e0680cc1f
2025-11-20 17:52:29 +01:00
chris dd3ba39384 docs: fix broken link in basic package management section
Change-Id: I278e46b77a53af9ac1a65b213d5289fb6e63e7c2
2025-11-20 14:47:51 +00:00
Tom Hubrecht 170f092ce2 gc: Unify UX across the 3 cli ways to collect garbage
There are currently 4 different ways to run garbage collection using
lix:
- `nix-collect-garbage`
- `nix-store --gc`
- `nix store gc`
- (using the daemon directly)

As they were written all at different times, their output varies (and is
broken in some case). This unifies the display of informations in the
following ways:

- The list of paths in the results is always printed (in the nix3 cli it
is hidden unless `-v` is passed)
- The number of paths in the result set is always displayed
- The size of deleted paths is only shown when actually deleting things
(as it would have been 0B in any case)

Fixes #905

Change-Id: I40d9ec7c6d76795f6c6dd30df196d1e855bdb9db
2025-11-20 11:53:18 +00:00
Tom Hubrecht ff231b9b52 libexpr/builtins: Document addErrorContext
Change-Id: I94eee0ccba3fcdc587783800d59ac572ed44f69a
2025-11-20 09:25:10 +00:00
Tom HubrechtandEelco Dolstra f01555105a libexpr/builtins: Document scopedImport
This also allows removing a static initialization of a primop.

Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
Change-Id: I74da68205630f658b239e4327bf5e27bfc1b91da
2025-11-20 09:25:10 +00:00
Justin ! 2a308bca00 libexpr: remove fetchClosure exp feature
fixes #1010

Change-Id: I149cd01bf08655c91dc2d3817954937c6a6a6964
2025-11-20 08:45:29 +00:00
Lunaphied 2c73f3c492 cq: improve derivation printing configuration
Change-Id: I7f16afa921cf2a33f750cb0f5cc53fa36a6a6964
2025-11-19 20:52:38 +01:00
Lunaphied f3b2f3496b repl: allow :p to print derivation attrs.
Change-Id: I6a6a6964a58c3340acca9272c616c079c5218d6e
2025-11-19 17:46:52 +01:00
Tom Hubrecht 04a4b15991 libcmd/copy: Check the validity of the options if required
This is done at the start of the command call, which allows not building
expensive things if the arguments are incorrect anyway.

Fixes #687

Change-Id: Ic924fe2115cf760684c6fdf7987279e96ab00286
2025-11-19 14:45:52 +00:00
Qyriad 1fa8df82df libutil: include LIX_MAJOR, LIX_MINOR, and LIX_PATCH macros
Fixes #1038

Change-Id: I7d8a4648890fce7ff15695876c9b9d3a6a6a6964
2025-11-19 11:47:20 +01:00
Commentator2.0 1b7ad3a7ad tests/functional2: Migrate symlink-resolution
the newly added f1/lang tests is required for the f1/lang framework
dismanteling to happen in a separate commit

Change-Id: Ic419c515262294c51a46d1513daa7848e4b71405
2025-11-18 20:01:23 +01:00
Commentator2.0 2497e0101e tests/functional2/lang: Migrate builtins.pathExists
Change-Id: Ib31b7dddc71ae36924822f300b028bf354f63874
2025-11-18 20:01:23 +01:00
Commentator2.0 3eeb5d10ba tests/functional2/lang: fix warnings
While the err file should always be empty, we prefer not have (easily
avoidable) warnings in the log, in order for actual warnings to be
spotted more easily.
Additionally this way no additional changes are required in case they
make use of some depreacted features in the future.

Change-Id: Ie078e2a851b2035d839f6b95d4188e475eb96b2d
2025-11-18 20:01:23 +01:00
Commentator2.0 c589a95546 tests/functional2/lang: Migrate builtins.getEnv
Change-Id: I9e30d9bf897854e8843194779034fd98d172bcf1
2025-11-18 19:52:17 +01:00
Commentator2.0 4da70ab3bd tests/functional2/lang: Migrate eval-okay-xml
Change-Id: Ib626c3f4ca38b618bab368f0d23829debc5ec38b
2025-11-18 19:52:17 +01:00
Commentator2.0 68a39b1d6e tests/functional2/lang: Migrate builtins.derivationStrict
Change-Id: I42781af8b5b4a2352e867a07712a752ddfdeaa35
2025-11-18 19:45:15 +01:00
Commentator2.0 86964fb440 tests/functional2/lang: Migrate path-string-interpolation
Change-Id: I6f5d1830363c8dff4fa6b368550c8c4247766609
2025-11-18 19:45:15 +01:00
Commentator2.0 8d75a61f73 tests/functional2/lang: Migrate builtins.addDrvOutputDependencies
This also marks the end of eval-fail-* migrations

Change-Id: If06a60cd9d222bba5fc4f9a9b93de125e7fa2994
2025-11-18 19:45:15 +01:00
Commentator2.0 89a9d6e529 tests/functional2/lang: Migrate string coersion for integers
Change-Id: I428c8935119b3184109b3e3f760ed72054b0cd00
2025-11-18 19:45:15 +01:00
piegames daefbb8a44 tests/functional2/lang: Migrate more builtins
Change-Id: Ib981a5c544748475cf98a8daae0609a52c9c6eb9
2025-11-18 13:48:32 +00:00
piegames 2df8dc1178 tests/functional2/lang: Migrate string-context tests
Change-Id: I8c8f691f77eb87b52343d52a1c2a8a255ea2c887
2025-11-18 13:48:32 +00:00
piegames dbb6098ff4 tests/functional2/lang: Migrate attrs tests
Change-Id: I8eee261d76d34c4a138bc24d9c2b9a0dfb944c7f
2025-11-18 13:48:32 +00:00
piegames a852ceb0c8 tests/functional2/lang: Migrate autoargs
autoargs get their own folder and are not allowed with the other
function args tests, just like they deserve their own ring of hell

It shall be noted though that this test is particularly pointless, as it
merely tests the normal argument passing (which is fine), and not the
magic autoargs actually provide

Change-Id: Ia2dc00754a13c02e4926200141f90bc797820a15
2025-11-18 13:48:32 +00:00
piegames d470530ec7 tests/functional2/lang: Migrate lists
That one is a bit confusing, as I renamed the old `in` test to `in-2`
(file identities in Git when)

Change-Id: Id0e17de414dbc1b1b616d456175704f98657a16a
2025-11-18 13:48:32 +00:00
piegames 68fdce3548 tests/functional2/lang: Migrate eval-okay-patterns
Change-Id: I46e155ed2cc1ffcb75935fc1744c7938af22c0c6
2025-11-17 22:10:11 +00:00
piegames db59bb63c8 tests/functional2/lang: Migrate eval-okay-print
Change-Id: I70936bcf324dbb8b45a3c65567b6c25f409d7953
2025-11-17 22:10:11 +00:00
piegames 1dc174b4df tests/functional2/lang: Rename ind-string → string-indented
To make it easier to find them and increase locality

Change-Id: I6365e91d2c79362c05b766415cc1972346d7a610
2025-11-17 22:10:11 +00:00
piegames 7a005ebe5d tests/functional2/lang: Migrate eval-okay-backslash-newline-*
It's a string test, so in the string ~~hole~~ folder it goes

Change-Id: Id70da8a7a3de328bc94d2106a53eb7484c4ef122
2025-11-17 22:10:11 +00:00
piegames e6a672d024 tests/functional2/lang: Migrate builtins.toXML
Change-Id: I31f47b9953ef0370dd8e57f6e43ee32d278c3663
2025-11-17 22:10:11 +00:00
piegames ab764d9831 tests/functional2/lang: Migrate builtins.compareVersions, builtins.parseDrvName
Change-Id: I82bbe7f406aa37bc5493c58a8f8bfa5820503632
2025-11-17 22:10:11 +00:00
piegames 776bb81e28 tests/functional2/lang: Migrate builtins.readFile
Change-Id: Ib4d6b0af7e012297692b602cbaafef6a0480129b
2025-11-17 22:10:11 +00:00
piegames 4aedfd346f tests/functional2/lang: Migrate builtins.readDir
Change-Id: Ic70e4ef7780281f403d0421d63ecf849e083c01e
2025-11-17 22:10:11 +00:00
piegames c350bf8b5e tests/functional2/lang: Migrate builtins.readFileType
Change-Id: I7f6c4cddb8d969cb45652e1f72c0001a0ebd2d38
2025-11-17 22:10:11 +00:00
piegames e7bd41ece6 tests/functional2/lang: Migrate search-path test
Change-Id: If7513252cff92831822438753a78c2e9f80ac06b
2025-11-17 22:10:11 +00:00
piegames ca41ea5e3b tests/functional2/lang: Migrate builtins.seq
Change-Id: Ifeb975c0569b196e44054d23c20d22c0481ea3af
2025-11-17 22:10:11 +00:00
piegames 8b33caa506 tests/functional2/lang: Migrate builtins.path
Change-Id: Iefe96d38f89bc730b8e673069f9eb0bd3546accf
2025-11-17 22:10:11 +00:00
piegames 449ddbe324 tests/functional2/lang: Migrate builtins.toJSON
Change-Id: Ic740ab1fe0792c7e7596ae8a9beb9e76b37d6284
2025-11-17 22:10:11 +00:00
piegames eba84b51d6 tests/functional2/lang: Migrate builtins.fromTOML
Change-Id: I80d4058f3b74e9815425499e21afce5fc5dc6375
2025-11-17 22:10:11 +00:00
piegames 721db28037 tests/functional2/lang: Migrate eof tests
Call it a bug, call it a feature, but the old testing framework
ungracefully shits itself when it has no tests to run … in other words,
we finally migrated all the parse-fail tests 🎉

Change-Id: Ibd7f1c04d9a396a20f14361af7924f0074d1ac23
2025-11-17 22:10:11 +00:00