Commit Graph
19270 Commits
Author SHA1 Message Date
eldritch horrors d0deb1a150 libutil: add error encoding that survives capnp exception transport
using result types in capnp is fraught. while it makes some sense for
interfaces that need neither streaming nor pipelining and can provide
much better error fidelity there it's also fundamentally incompatible
with those that *do* need streaming or pipelining: streams will never
be stopped early unless an exception flies, and pipelines cannot look
through result types. likely the best thing we can do is to encode an
error for transport in the capnp/kj exception description strings. :(

Change-Id: Icb7d16238fa9a7aaf92c00363f7be4076ac02a61
2026-06-30 19:55:45 +00:00
Qyriad 22e2ecdc43 build: update integer overflow sanitizer handling for fixed meson bugs
Change-Id: I27f33e66e107d4af13abe62257be8c696a6a6964
2026-06-30 18:56:51 +00:00
piegames 5434ddf4cd justfile: Don't require nested escapes on forwarded commands anymore
This is a hack, but this is the best we can do with Just unfortunately.
Maybe rewriting this file into a python script wouldn't be the worst
idea at this point …

Change-Id: I32d089f6b49165faed99fb592d068dbb8a7e48e6
2026-06-30 10:58:58 +00:00
piegamesandeldritch horrors 7ef274600d testlib: default nix fixture to also test all daemon protocols (3/3)
This is the real deal. The new tests have surfaced one bug in the test
suite itself, and one in the RPC legacy protocol wrapper.

Co-authored-by: eldritch horrors <pennae@lix.systems>
Change-Id: Id75b671c10b45655d3627abd88563e2d41719446
2026-06-28 19:09:49 +00:00
K900 12c1132f07 package: revert the breaking curl change on 8.21+
Change-Id: I374b37c5d428c6c7db71341d783b6a1cddf45b19
2026-06-28 17:19:51 +00:00
piegamesandeldritch horrors d5044f0016 testlib: default nix fixture to also test all daemon protocols (2.5/3)
All tests should have been clear here, but alas

Co-authored-by: eldritch horrors <pennae@lix.systems>
Change-Id: Id642be1f6e0fb714b844ee5348dc096866cf3906
2026-06-28 16:52:12 +00:00
eldritch horrors 2605d3eab1 libcmd|rs: use rustyline instead of editline for the repl
Change-Id: Ic414de3cc2435d9615305f05a85aa9c923e82a69
2026-06-28 16:37:46 +00:00
piegamesandeldritch horrors 567348a90c testlib: default nix fixture to also test all daemon protocols (2/3)
This commit enables the parametrization for "legacy-combined" protocol.
All failing tests with that have been either fixed or disabled. Notably:

- A couple of tests (e.g. involving builders) could be made to work with
a non-local store, but this would require some refactoring to testlib in
order to make certain configuration settings generic over local and
remote operations. We've disabled those for now, in order to make
progress
- The store tests all run locally only because of their nature
- The flakes tests also all run locally only because my energy for
fixing them is limited (and it's a *lot* of test failures, with probably
little overall benefit in terms of test coverage)

Change-Id: I56fa249a64f7c17c952f688ec89e9687f2a13f12
2026-06-28 18:17:57 +02:00
eldritch horrors 1c2b5d4b5a libutil: expose loggers to rust
this takes the form of a couple of hideous macros for now to get started
without worrying about semantics of rust logging and tracing crates, all
of which are in some way incompatible with the current lix expectations.
we do want to move to using those eventually, but that will have to be a
task for later. as long as only small amounts of lix code live in crates
we don't have to worry much anyway, and by the time we get around to any
Activity beimg ported we'll hopefully have a better understanding of the
requirements on either side. we'll reëvaluate the log infra around then.

Change-Id: I4aec476a486f56d0972294358cbf0b6810ab9394
2026-06-28 13:02:07 +00:00
eldritch horrors c5bcb9a312 libutil: disable direct access to logger verbosity
that way we can sync it with rust for nearly free.

Change-Id: Ib3f1e0335884e077a0293f4b13c5919297748522
2026-06-28 13:01:45 +00:00
eldritch horrors 91663cca2d libutil|rs: bring back c++ interop with zngur
Change-Id: Ia9e9881f464d5b25110b56fb9d72ed30463eaeee
2026-06-28 12:47:18 +00:00
Qyriad d9ecb5301e build: cargo entrypoint II
This is a second attempt at https://gerrit.lix.systems/c/lix/+/5516

instead of letting meson try to be cargo we'll just have cargo at home.
this requires some contortions to link everything together due to quite
a few meson deficiencies, but at the end we get to pretend that rust is
just c++ painted orange. we'll use cxx to bring real interop back soon.

also fixes #1230
also reverts 10845bfe63

co-authored-by: eldritch horrors <pennae@lix.systems>

Change-Id: Ib1fda843fa80d818705d5a65ec9054216a6a6964
2026-06-28 12:46:20 +00:00
piegamesandeldritch horrors 9e846fbaea testlib: Small feature additions
Change-Id: I8940e66a1fb89cf8024b1e94e328b28a008a1452
2026-06-28 13:45:48 +02:00
84fb93a009 testlib: default nix fixture to also test all daemon protocols (1/3)
This first geralizes the `nix` fixture with `pytest_generate_tests` to
iterate over all protocols (unless they are marked with `no_daemon`),
though for now the list of protocols is set to be empty. The lang tests
are all tagged with `no_daemon` because they are mostly pure and running
them multiple times would be wasteful.

Co-authored-by: rootile <lix@rootile.de>
Co-authored-by: piegames <git@piegames.de>
Change-Id: Ib407edb420ba4bf434cacf9563a71f5ae6fa8eef
2026-06-28 13:45:46 +02:00
Samuel Dionne-Riel 7868f52c2a tests: Add regression test for daemonAuthorizationSettings
Regression test for extra-trusted-users being ignored
  https://git.lix.systems/lix-project/lix/issues/1183

Change-Id: I764a6add0215b535fc4abd21b41d1c23b21fc06b
2026-06-27 18:37:27 +00:00
Samuel Dionne-Riel fc6772a7dd main: Run registerGlobalConfig before loading config
This is a bit of a trip.

Commit 63b0a01d75 moved config
initialization out of static initializers.

In doing so, an oversight was made with the new
`GlobalConfig::registerGlobalConfig` calls. Previously all global
configuration would be handled well before `loadConfFile` was called.

The change placed `registerGlobalConfig` in `main` *after*
`initNix`. The `initNix` function is what calls `initLibStore`, which in
turn callse `loadConfFile`.

So, in effect, the configuration for `daemonAuthorizationSettings` and
`nixDevelopSettings` are not actually loaded.

Change-Id: I10dba2c98e032f910942ee0e0ca6bb39ef60edc2
2026-06-27 18:37:27 +00:00
rootileandeldritch horrors fce63f6dbf parser: improve error message for ill-defined escape sequences
fixes #1169

Change-Id: Ic93e0cb5442b717964de3ae9eb22f4cd48e4ad0a
2026-06-25 21:03:09 +00:00
Qyriad de68de1d11 tests/test_build_fod: fix overly strict pattern
Change-Id: Idd3146f41d527a7263ee61e7a5ce0e836a6a6964
2026-06-25 09:54:50 +00:00
Qyriad 071b810f95 package: override Curl to remove backported patch that breaks our tests
Cherry-picked-from: https://github.com/nixos-cuda/nixpkgs/commit/3f596088797d2e3a62e20cae2d2936e8548a690e
Co-authored-by: Atemu <git@atemu.net>

Change-Id: I5d060872d4d0ae283d73b4268af612326a6a6964
2026-06-24 13:45:53 +00:00
Qyriad 63fb295ad8 build: fix C++ dylibs on Musl by working around Nixpkgs brokenness
Change-Id: Iad30ec38eef8205e2d73553caddbbbc96a6a6964
2026-06-22 21:18:56 +02:00
Qyriad 2ea4b5d9e1 fix Nixpkgs 26.05 warning about nested lists in nativeBuildInputs
Full warning was:

warning: Dependency of package 'lix-shell-env' uses a nested list in attribute 'nativeBuildInputs'.
This is deprecated as of Nixpkgs release 26.05, and support will be removed in a future nixpkgs release.


Change-Id: I6b6c7425e1b03d3238ea21138cb3f2cf6a6a6964
2026-06-22 21:18:56 +02:00
rootile 8902b78442 tests: migrate derivation-json.sh
Change-Id: I8a648231677bde28611dc9511e3a03d87608e7b4
2026-06-22 18:16:17 +00:00
Justin !andQyriad 30ca2e38c4 nixpkgs: bump 25.11 -> 26.05
Change-Id: I7747d38d38f3be69404f5dcc8147e5366a6a6964
2026-06-22 17:58:20 +02:00
Qyriad 3f7bc8ffb8 HACK: patch out broken Perl version compatability check on macOS
Change-Id: I85cfc3863299d06f36138753e8f1f0206a6a6964
2026-06-22 17:58:20 +02:00
eldritch horrors 20453629ab build: remove libutil rust components
they're not doing anything, and they're slightly in the way of reworking
the rust build infra. we'll add them back once that rework is completed.

Change-Id: Idde8ba3585fd08b89b4b4298349f8f58a29a9661
2026-06-21 17:16:17 +02:00
eldritch horrors 0cddd2d38a build: always link plugins with unresolved symbols allowed
we're quite surprised that this hasn't caused problems sooner.

Change-Id: I33b779c1563e15db715c7fd4d3cb6516cf34391d
2026-06-21 17:16:17 +02:00
Qyriadandeldritch horrors 10845bfe63 build: move all remaining C++ files to a library (except main.cc, yet)
Change-Id: I2a69701a67faf6f9ad33e30bbe7aa4386a6a6964
2026-06-21 17:16:17 +02:00
Qyriadandeldritch horrors 05e9ca3e26 build: remove file prefix mapping
blokyk on Matrix found that is not only no longer needed but now
actually breaks the very thing it sought to fix


Change-Id: I39cc0df611a6d81c763063c9fd2f0f426a6a6964
2026-06-21 17:16:17 +02:00
ash ff920956a9 libstore/build: fix URL guesswork for failing structuredAttrs FODs
Fixes #1175

Change-Id: I6a074f489620f6de0615858f4d0d872c6a6a6964
2026-06-20 14:31:17 +01:00
rootile cf0ce785b7 tests: remove forgotten cli-literate-parser
When removing the f1 repl characterization test suit, these files were
kept on accident, despite them being dead code now

Change-Id: I13b2c5a96004787c26fe7209e4cb3aeedd8ada15
2026-06-17 12:03:36 +02:00
RutileandLix Systems Gerrit d748b4e509 Revert "repl-characterization: document the syntax"
This reverts commit 0d6b372c19.

Reason for revert: In the time between this getting +2 and it being merged, all repl tests and its syntax have been migrated to f2, making these changes null and to dead code

Change-Id: I00f5237bf3f2ca3a60cc1584f67fb67196805e7e
2026-06-17 10:00:54 +00:00
Jade Lovelace 0d6b372c19 repl-characterization: document the syntax
Gosh. Why was there never a README in here explaining what it does
without requiring people to read C++? There was a half-assed grammar in
a comment, but it was very half-assed, so let's replace it with a
better-written one.

I'm documenting this so that neither I nor anyone else have to read C++
while rewriting the parser in Python.

See: https://git.lix.systems/lix-project/lix/issues/1196

Change-Id: Ia34ea7b02f109eb7753833e1c03d4b5d1d3c3b75
2026-06-17 01:01:13 +00:00
rootile 7bf0edcc0d build-remote/logging: use machine names instead of uris
Change-Id: Iafe7b3e780d3a69dc4bb2d745ff40db6df7111e8
2026-06-16 17:58:23 +02:00
rootile 4b0371bff3 libstore/machines: add name attribute
Change-Id: Ie0f246dee219ffb3cade7e8b9a9596eb2a06f2dd
2026-06-15 22:09:15 +02:00
rootile c019a776e9 python-infra: move f2 specific stuff into f2
When extracting a global pyproject.toml from the f2 one, some f2
specific things slipped through and ended up in the global one.
This commit moves those parts back where they belong

Change-Id: I95706fabec487410717fb362c95bfee900cf5b8c
2026-06-14 20:56:18 +02:00
rootile 93c872ab25 tests: migrate binary-cache-build-remote.sh
Change-Id: Ie159da4f00cf05627a777bae80c1368485dd4fcc
2026-06-14 20:33:11 +02:00
rootile 2ea51a6c71 tests: migrate structured-attrs.sh
Change-Id: I6d2b82e3aa236d01b9a345c148b7fef3703a446d
2026-06-14 20:19:58 +02:00
rootile fe79d62b73 tests: migrate check-reqs.sh
Change-Id: Icc22331f6f7e1be0919a74155cd93514c5d70a65
2026-06-14 20:19:58 +02:00
rootile 9614f12908 tests: migrate export.sh
Change-Id: I9416b71b0a15a7703aa9d7c2dea866a1f556e657
2026-06-14 20:19:58 +02:00
rootile bc8a95457f tests: migrate export-graph.sh
Change-Id: I0de67ba6b1f710434f504814dd9b5eb7d486e65a
2026-06-14 19:02:11 +02:00
rootile ba3a026f40 tests: migrate eval-store.sh
Change-Id: Id4a721871218160b441e848f6f252c06187320bf
2026-06-14 18:46:39 +02:00
Astreaprtcl 12baca7bea store/fetchers: fail if ca or netrc file has been specified but doesn't exist
if the netrcFile setting has been changed tell curl that the file is required, so
fetching fails if the file does not exist

if the caFile setting has been specified, check if the file exists and throw an
error if is it non-existent

Refs: #1106
Change-Id: Icb9330a7a715175d35b9ed894ed945f0fd4d7061
2026-06-13 23:38:45 +02:00
rootile abfe9d0c3e tests(functional): remove old repl characterization test suite
Change-Id: I2c13e0332298600cafa97b06113ca56f66668324
2026-06-11 16:30:56 +02:00
rootile 64b434b87b tests(f2/repl): migrate stacktrace tests
Change-Id: Ic6795f22d68aea113fa2037cbd0a731ac5e698f8
2026-06-11 16:30:56 +02:00
rootile da9f0c494e tests(f2/repl): migrate failing pure eval test
Change-Id: Ic8db38346c2420b2d3c5ab51fe71ef0b88f826b3
2026-06-11 16:27:49 +02:00
rootile a50b85b7d6 tests(f2/repl): migrate overlay tests
Change-Id: Ibd2b123f919abd84ecb9333bd952cf0bdb813992
2026-06-11 16:26:34 +02:00
rootile cb4703019b refactor(f2/repl): move overlays to overlay folder
Change-Id: I16e42eae00dc7a1f06300a81d69c637b9fa342df
2026-06-11 16:19:20 +02:00
rootile ab8cdcc9b8 tests(f2/repl): migrate basic tests
Change-Id: I22241734a7249d376c86b3a226c5f1a82c03fd33
2026-06-11 16:19:20 +02:00
rootile f7ce20d879 tests(f2/repl): migrate debugger tests
Change-Id: I2cc1d45db2e5e0b8cea6798c70e13ede57fea6ee
2026-06-11 16:19:20 +02:00
rootile ab149a6cd8 tests(f2/repl): migrate builtins_warn.test
Change-Id: Iaed1fb8651840b855ec7bdf5087681dc5eb9d54c
2026-06-09 19:40:07 +02:00