Commit Graph
57 Commits
Author SHA1 Message Date
Jade Lovelace c76cf49629 Test coverage for native code WIP
Part of: https://git.lix.systems/lix-project/lix/issues/1186
2026-04-19 18:01:00 +00:00
Jade Lovelaceandeldritch horrors 2cea406121 version.json: begin the 2.96 series
Change-Id: I21c37e20fc2e5786367aa9b6e5ebb7ba12eb8b6c
2026-03-13 22:59:53 +01:00
Jade Lovelace c08f2336d0 release: merge release 2.95.0 back to mainline
This merge commit returns to the previous state prior to the release but leaves the tag in the branch history.
Release created with releng/create_release.xsh

Change-Id: Ia7a63807681389cf5ccb9d07539b880697a88be5
2026-03-13 09:06:50 -07:00
Jade Lovelace dad8a30906 release: 2.95.0 "Kakigōri"
Release produced with releng/create_release.xsh

Change-Id: I9d78b7d65053fb1d4a00dfd0d7ce9c93eba68365
2026-03-13 09:06:49 -07:00
Jade Lovelace dc7d5c45a4 release: release notes for 2.95.0
Release created with releng/create_release.xsh

Change-Id: I4cb4c81a440787fe5417369e5a058c8bb51c0cb1
2026-03-13 09:06:04 -07:00
Jade Lovelace fc5ab134d9 2.95.0: release name
Change-Id: I20fe0119cb3f011c3ea2f8355a120a8c2fecb610
2026-03-13 09:02:05 -07:00
Jade Lovelace fada71a749 Update nixpkgs and nix2container
Fixes: https://git.lix.systems/lix-project/lix/issues/1152

Change-Id: I29ccfe46d7de43f521b88beff73a782a1fdb8d8c
2026-03-11 11:21:11 +00:00
Jade Lovelace 01ff67595b nix3-add-path: add references-list argument for ca with references
This is not ca-derivations. We don't care about self-references or any of the
rewriting or stuff like that; if you want something like that, write
your user code so it figures out where it is.

The reason I want to do this is for integrating other build systems with
Lix: if you're importing something built *outside the store* with a
non-Nix build system, it makes no sense to put it in an input-addressed
path since it's not possible to come up with a derivation for it.
But you need *some* hash, so the output hashing is the most sensible option.
It is also nice because of not needing trusted user privileges to import
it, since the hash describes the exact contents of the output path.

We use this feature (implemented externally to Lix; this CL eliminates
that step) at Mercury to integrate buck2 with Nix on the output side: we
import things to the Nix store as ca paths with references.

These can then be consumed by Nix language with:

```
# Hack from https://git.lix.systems/lix-project/lix/issues/402#issuecomment-5889
path:
builtins.appendContext path {
  ${path} = {
    path = true;
  };
}
```

Test plan:
```
$ nix store add-path --references-list xx-refs-list ./README.md
/nix/store/szcwnm13d9gmxx8fly0bz82l42jgysw6-README.md

$ cat xx-refs-list
/nix/store/g9hhwjbkdrw0wnbd3axfs4icyb37nr6b-bash-interactive-5.3p3

$ nix path-info --json /nix/store/szcwnm13d9gmxx8fly0bz82l42jgysw6-README.md | jq .
[
  {
    "ca": "fixed:r:sha256:1pj59fy7zcrn949ry9kgv4ba17h2sy3z2is469abj912cvbl14n3",
    "narHash": "sha256-w5JA12YiJLlUMkRH8YfXAp6gFtlvJp8TSTazf7xLRd4=",
    "narSize": 1384,
    "path": "/nix/store/szcwnm13d9gmxx8fly0bz82l42jgysw6-README.md",
    "references": [
      "/nix/store/g9hhwjbkdrw0wnbd3axfs4icyb37nr6b-bash-interactive-5.3p3"
    ],
    "registrationTime": 1771266146,
    "valid": true
  }
]
```

Change-Id: I005a03003dfc24108e018e599dbe0b5d6a6a6964
2026-02-21 22:50:13 +00:00
Jade LovelaceandRebecca Turner b2feecf7e7 libexpr: use MaintainCount for call depth
This was duplicate code.

Change-Id: I40697da80c3b8123c9cc3f10e5be5cc49c35629d
2025-12-23 14:18:11 -08:00
Jade Lovelace 605de55fed package.nix: stop rebuilding aws-sdk-cpp
A friend reported that this is rebuilding, which doesn't make any sense
because nixpkgs also has a lix from nightly that surely has the same
dependency and thus it surely should be built on hydra, right?

Turns out no, since they were overriding the requiredSystemFeatures to
remove big-parallel. Silly, but we can match that and get cache hits.

Change-Id: I4b1c8e850c6c38b03881354e978f41a10592ec95
2025-12-18 21:26:00 +01:00
Jade Lovelace 70319f1840 tarfile: unit test suite
This will probably get the implementation of the fixtures revised when
we land the new extraction code, but we are setting it up to be generic
against that.

The operator-> thing is kind of a crime. But it also makes the code
vastly more readable so it's impossible to say if it's bad or not.

Change-Id: Ia5aca69cefaa03cd533ad19d20d856ff7e76a546
2025-12-15 22:42:31 +01:00
Jade Lovelace 88cea98b82 refactor: use std::unique_ptr for libarchive state, remove destructor
Change-Id: Ib16eefc17ae53874b295476fae515305525a7f2b
2025-12-15 21:21:04 +01:00
Jade Lovelace 08b0ce8736 Begin the 2.95 window
Change-Id: I4ea8a649248a692deb73b40048a219ed61c1ae91
2025-11-17 13:33:35 -08:00
Jade Lovelace 54118efaf6 release: merge release 2.94.0 back to mainline
This merge commit returns to the previous state prior to the release but leaves the tag in the branch history.
Release created with releng/create_release.xsh

Change-Id: Ida5959473ec469dd5e5e977ebdc8aab6e694b0de
2025-11-17 11:42:20 -08:00
Jade Lovelace fd38f625e6 release: 2.94.0 "Açaí na tigela"
Release produced with releng/create_release.xsh

Change-Id: If2ac30e569759c9035a6fc999c631ec545d190fa
2025-11-17 11:42:19 -08:00
Jade Lovelace 49a5495cbc release: release notes for 2.94.0
Release created with releng/create_release.xsh

Change-Id: Id7c776dc0ed46b1f6f09db2c77e04166469f5710
2025-11-17 11:42:12 -08:00
Jade Lovelace b6a8e312e7 2.94: release name
Change-Id: I18f5abe00130b53053e3a04074617071c0f884a2
2025-11-17 11:41:57 -08:00
Jade Lovelace 0018b98859 codeowners: add some missing directories
Change-Id: I22aa53074dedd822517a5e8dfa2f0a520d0000bb
2025-09-17 16:26:49 +00:00
Jade Lovelace f4bdddf0fd tree-wide: log commands executed at --debug --quiet
Fixes: https://git.lix.systems/lix-project/lix/issues/973

Information about which commands were executed is really valuable to
debug Lix and is much more user relevant than the vast majority of the
e.g. build loop junk printed at debug level. Currently we have a *whole
lot* of call sites where we call execv* which should probably be cleaned
up, but that's future work.

I chose to print argv0 rather than the executable path if these differ,
since the code is shorter and since the command could be a fully
resolved symlink or so where argv0 is the actual command name being run.
However, it's not exactly *hard* to write std::ranges::drop_view(args,
1).

Change-Id: I73c3abb20b229d5e2d64277aa29cbbeed7764bab
2025-08-28 17:19:14 -07:00
Jade Lovelace a84355a813 perl: passthru perl
Required for compat with CppNix derivation.

Fixes: https://git.lix.systems/lix-project/lix/issues/971
Change-Id: I6c38545b7a34b22843fc9acfbb042259cd824d84
2025-08-22 01:51:47 +00:00
Jade Lovelace 8a2d25054d libstore: rename confusing const identifiers
Also adds an assert that store path hash part length is what we expect
because it's alarmingly easy to forget to truncate a hash before
throwing it into there. It's kind of messy code, someone could improve
it more later.

Change-Id: I5296ea3d5b854323d092f0256defb598dd5b87e8
2025-07-23 02:51:45 +00:00
Jade Lovelace bf3d52e5bb rl-next: link to the fixed issue for removing old wires
Fixes: https://git.lix.systems/lix-project/lix/issues/510
Change-Id: Ia100f2f0bb48a4880b2c55d5622be9dab25b313b
2025-07-21 15:17:54 -07:00
Jade Lovelace 61c276e858 repl: default to turning off ignore-try
This results in anything that uses nixpkgs getting stopped in the
debugger inside of nixpkgs internals, which are usually irrelevant.

Let's default to the more useful option.

Fixes: https://git.lix.systems/lix-project/lix/issues/666
Change-Id: If4b94a3d488bfb2f634ee5a2bc195e7a4b5434a5
2025-07-02 23:11:07 +00:00
Jade Lovelace 276add2cd7 repl: fix repl-overlays in pure eval mode
The reason this gets hit is because of the debugger in flakes. Otherwise
you never have a repl in pure mode anyway.

We evaluate the repl-overlay file in impure mode but this doesn't do
what one would initially expect.

Fixes: https://git.lix.systems/lix-project/lix/issues/777
Change-Id: I19b8ed2f5e9ce500b633b13301b42df69ab7deb3
2025-06-25 14:15:37 +00:00
Jade Lovelace 38850e59e1 repl-characterization: delete duplicate extra_data directory
idk how this mistake happened but it was really confusing to figure out
which one of these was right, so let's get rid of the impostor.

Change-Id: If3b6fb543e5976b1edad68fb143bfa994d1d6381
2025-06-24 22:20:28 +00:00
Jade Lovelace 833aef5bcb fix(rl-next): systemd unit description is using wrong section
> The resource control configuration options are configured in the
> [Slice], [Scope], [Service], [Socket], [Mount], or [Swap] sections,
> depending on the unit type.

Reported by Worm on matrix.

Change-Id: I5f942b864e40bc461e8751cdf8337b1f8c2bbce4
2025-06-17 05:05:48 +00:00
Jade Lovelace 69ba3c92db fix: Terminate daemons properly on Ctrl-C on macOS
This was an absolute nightmare to diagnose. It turns out there's a
kernel bug: poll with events = POLLHUP will receive an event for NOT
POLLHUP internally in the kernel, delete their event subscription, and
then not receive events for any HUP later. lol! lmao!!

We choose to use plain old EVFILT_READ because the watched fd can be
either a socket or a pipe and it's preferable to eat some spurious
wakeups than have separate paths for those. The alternative is using
EVFILT_SOCK, a private API that's existed for years and which netty
uses for its sockets, but that doesn't work on pipes.

Fixes: https://git.lix.systems/lix-project/lix/issues/729
Change-Id: If72b5d7a39f00320a9acccdbe81121cdb1a04c45
2025-05-01 12:22:27 -07:00
Jade Lovelace 7aec313597 MonitorFdHup: introduce a test
Well, I was trying to figure out
https://git.lix.systems/lix-project/lix/issues/729 in which this feature
is clearly just broken on macOS, but frustratingly, it seems that it
*does* work, except for the daemon. um........ sure.

Change-Id: Iaa962f045c16fdfa82854151c90a03e5cf0eea47
2025-04-04 16:59:23 -07:00
Jade Lovelace 6d8e4337e2 tests: fix the fmt.cc test
Yikes!! I wonder if we have any other ones of these that just .. didn't
get added to a meson file?

Change-Id: I19480ab03cdbecf608e523d5b6c3980233f4f445
2025-04-03 18:40:06 -07:00
Jade Lovelace c1961eb900 dtrace: fix on macOS (except in the package)
The package needs https://github.com/NixOS/nixpkgs/pull/392918

CC: https://git.lix.systems/lix-project/lix/issues/757
Change-Id: Id040a83d845f98fa1093b782cce2a015b5c85d9f
2025-03-26 10:40:50 -07:00
Jade Lovelace 989498407b doc preprocessor: support indent directives
Janky Python makes the world go around. In repentance I removed some
jank from it.

Change-Id: Id91e1fd40cb73049cb64deab6f81a7193132fa82
2025-03-25 17:06:53 -07:00
Jade Lovelace f695aa2bd2 UX: Show users SRI hashes everywhere instead of base32
This is *just* in output messages that look relatively like the FOD
failure message. It's not great that we inconsistently use the old
format in random places.

Change-Id: I4b9ce73a98a3a50c924cfe1d7cded42f3756df6b
2025-03-21 13:30:41 -07:00
Jade Lovelace b22bee91f5 fix!: file type flake inputs are always recursive hashed
Well that is a mess. I don't like breaking derivation compatibility,
but I like non-deterministic evaluation much less.

We can break compat if we own up to it, which this does.

Fixes: https://git.lix.systems/lix-project/lix/issues/750

Change-Id: Ic9e2407393f1d42c2be604f80b4aa11bc872bc23
2025-03-21 13:19:15 -07:00
Jade Lovelace ed7c89790e fix: do not test non-presence of flakes from a subdirectory of lix src
Yeah, we could have seen that one coming, it's kind of on the nose,
really.

Fixes: https://git.lix.systems/lix-project/lix/issues/748
Change-Id: I9e89f73ed89105338343fdecd615e398fc758e89
2025-03-18 12:40:10 -07:00
Jade Lovelace 24e413c147 release-notes: add some for gc gremlins
Originally was in cl/2687 but that CL got canned.

Change-Id: Ib504e263d72669f2418ef02d624bcba26b169622
2025-03-18 10:50:23 -07:00
Jade Lovelace 523965697d post-build-hook: don't emit config settings that aren't overridden
This is a redesign from 9b1f3cbc13 where
this was introduced.

I deleted the AbstractConfig::toKeyValue since it was conspicuously and
obviously broken for two years since 450e5ec618.
I asked myself if anyone was using it, given that it only emitted
settings that were aliases (broken!), and found that nobody used it.

The motivation for this change is the same for only emitting overridden
settings to the protocol: the nix inside there may not be able to parse
our defaults, as is the case of CppNix since the consensual
accept-flake-config was added to Lix.

Fixes: https://git.lix.systems/lix-project/lix/issues/739
Change-Id: Ib9874a52137f1f22220c25bcfa2425a4802509c7
2025-03-17 15:25:52 -07:00
Jade Lovelace d857424488 release-notes: note the flake.lock fix
Change-Id: I1c5f7a5cba12da1bfb2896ffc04ec89862cb346d
2025-03-17 12:07:29 -07:00
Jade Lovelace c597589d70 logging: always print post build hook logs
Missing these is really annoying, causes massive problems for debugging
(if you don't to enable build logs), and there's basically no reason we
can't just always show them.

In the future we might want to emit these to syslog/systemd/etc, but for
now let's just always print them to the console.

CC: https://git.lix.systems/lix-project/lix/issues/675

Change-Id: Ib6c47f3e34e553505298ed49c8bdb43f3db317a4
2025-03-17 11:12:25 -07:00
Jade Lovelace b816ae4119 libstore: move case hacking to the FS interaction code
This makes it much harder for bugs to crop up where stuff is wrongly
case hacked.

Fixes the nix store ls problem described in
https://git.lix.systems/lix-project/lix/issues/633, but it is still a
global setting which still sucks.

Fixes: https://git.lix.systems/lix-project/lix/issues/726
Change-Id: Ieba18976d1fb490830db0299ee9922b4b03b453e
2025-03-12 13:42:48 -07:00
Jade Lovelace f0dce8150b fix: bad error message for nix store delete --ignore-liveness
Found at work; the message implies you aren't trusted-user when it
actually is that ignore-liveness is always rejected by the daemon.

Whether this command is actually a good idea varies substantially of
course.

Change-Id: I47a710b835fd082ac85a24c7329f21117b1341ee
2025-02-28 04:48:34 +00:00
Jade Lovelace 6bc008900a build-release-notes: ban unprefixed issue numbers
This is necessary to cleanly and unambiguously transition to using
forgejo issues, since we now control our own destiny.

If we ban unprefixed numbers for a couple of releases, we ensure there
are no releases in active support with the wrong unprefixed number
semantics that could receive backports.

Change-Id: I1c94541dcb3f071399f439870b48cd76557b70d2
2025-02-27 10:49:16 -08:00
Jade LovelaceandJade Lovelace 64e33a7e09 nix-eval-jobs: make available as a submodule for nice development usage
This is to make it much nicer to develop. We could also do this for
perl.

Change-Id: Id4cefff0c2a3658a0dacd987a9dd9ddda50765fe
2025-01-29 10:10:11 -08:00
Jade LovelaceandJade Lovelace f5fbf9bce0 perl: simplify packaging slightly
Change-Id: Ib9049642b4afd7aa529501672cfa50d983f85e4f
2025-01-29 10:10:11 -08:00
Jade LovelaceandJade Lovelace 80f814d2a1 nix-eval-jobs: integrate into lix build system and delete cruft
We don't want any of this github integration stuff since it won't do
anything, flakes don't support subdirs properly and maintaining a second
flake is pointless and annoying, and then the rest is lix formatting
standards hitting n-e-j.

Yeet!

Change-Id: Ibcd3b0182d90f727562a92c215b6061c16502554
2025-01-29 10:10:11 -08:00
Jade Lovelace 79aa6ce797 Add 'subprojects/nix-eval-jobs/' from commit 'e489d2190a9e7b6a369d3457b49ba80c93f80eae'
git-subtree-dir: subprojects/nix-eval-jobs
git-subtree-mainline: 3a41bf32a7
git-subtree-split: e489d2190a
2025-01-28 16:38:25 -08:00
Jade Lovelace 3a41bf32a7 packaging: stop including lix-clang-tidy inside main src fileset
This will avoid making lix depend on nix-eval-jobs when that is merged as well.

cc: https://git.lix.systems/lix-project/lix/issues/384
Change-Id: I4a4292948f3a225391aea2fc0d57b739d960d9e8
2025-01-28 12:44:07 -08:00
Jade Lovelace 1eafc7dbf4 build: automate some boehm/kj dependencies internally
We will link to boehm inside of the test suite if it depends on libexpr
but we don't need it for other tests.

For anything linking to libexpr internally, just like externally, it
needs to link to boehm.

Likewise with kj and libutil (or really any lix), so we should just make
it automatic.

Change-Id: I2bb9ec4668e6ff741b4139fdce167f278eb71c7e
2025-01-28 12:19:00 -08:00
Jade Lovelace 750f6e327c build: add meson dep overrides for all internal libs
This allows for subprojects to depend on the internal Lix build and have
it work properly.

Change-Id: Iaf05725fb95ea8abb171c71a1b17b0062c89f548
2025-01-28 12:19:00 -08:00
Jade Lovelace e35fd30a30 build: config.h -> lix/config.h for consistency with installed headers
This is required for moving n-e-j into tree with good meson support: it
needs to be able to include `<lix/config.h>`.

Change-Id: I21f1cfa37dcdce992812c8b008df503c0fc9dea5
2025-01-28 12:19:00 -08:00
Jade Lovelaceandeldritch horrors 53ce7ebc33 fix for asyncized lix 2025-01-27 20:54:38 +01:00
Jade Lovelace aa1aacb3e0 functional2: tidy up some of the NAR handling
Change-Id: Iaa096f7daefa71cad7ac787bce78d91fa4176541
2025-01-24 17:10:44 -08:00
Jade Lovelace c57a99e9c3 functional2: add http server fixture
This doesn't use http.server because it is really quite janky and has a
quite bad API.

cc: https://git.lix.systems/lix-project/lix/issues/600
Change-Id: I48b7c1beb89fac21fa32f1e09f595063b795d70a
2025-01-24 15:45:20 -08:00
Jade Lovelace 0acca48b83 fix: spell the perl bindings names correctly
I was wondering why there were only 59 succeeding jobs. We really need
to fix the buildbot at some point ;;

Change-Id: I81a22e32ac0dd0e105677f1b7bc064568009890d
2025-01-24 14:19:04 -08:00
Jade Lovelace 203a48eb83 packaging: add pkg-config dep on kj
Since we include kj from a header, we need to add a dependency to force
downstreams to also have it as a declared dependency or at least put it
in their include dir paths.

Given kj is what it is, this is basically unavoidable that this
dependency is visible.

Change-Id: Ia89a90f10ad8b821260db0d7fdc47aebda44e66a
2025-01-24 11:17:40 -08:00
Jade Lovelace 5f3adb4b1f functional2: add missing __init__.py
Technically these aren't required these days, but they make some tooling
work a little better.

Change-Id: I04dadb40ffb89066c26ad0611a78787215b56cb5
2025-01-23 14:24:08 -08:00
Jade Lovelaceandeldritch horrors d46adb45eb tests: validate that flakes do path traversal checking
Apparently we had zero test coverage of this, let's fix that.

Change-Id: I00c906daf5acfc01913562036ca88abbf63dd3d9
2025-01-11 20:42:30 +01:00
Jade Lovelace 37e8904ba7 fix: macOS build broken on nixos-unstable
This is definitely a bug in rapidcheck but also rapidcheck is
unmaintained (author vanished) so we can't really do anything about it
on that side.

lix> FAILED: tests/unit/liblixutil-test-support.dylib.p/libutil-support_tests_hash.cc.o
lix> clang++ -Itests/unit/liblixutil-test-support.dylib.p -Itests/unit -I../tests/unit -I../tests/unit/libutil-support -I. -I.. -Ilix/libutil -Ilix/libexpr -fdiagnostics-color=always -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_FAST -Wall -Winvalid-pch -Wextra -std=c++23 -O2 -g -fpch-instantiate-templates -include config.h -Wno-unused-parameter -Wno-deprecated-declarations -Wno-missing-field-initializers -Wimplicit-fallthrough -Werror=switch -Werror=switch-enum -Werror=unused-result -Wdeprecated-copy -Wignored-qualifiers -Werror=suggest-override -fsanitize=signed-integer-overflow -fsanitize-undefined-trap-on-error -ffile-prefix-map=../lix=lix -MD -MQ tests/unit/liblixutil-test-support.dylib.p/libutil-support_tests_hash.cc.o -MF tests/unit/liblixutil-test-support.dylib.p/libutil-support_tests_hash.cc.o.d -o tests/unit/liblixutil-test-support.dylib.p/libutil-support_tests_hash.cc.o -c ../tests/unit/libutil-support/tests/hash.cc
lix> In file included from ../tests/unit/libutil-support/tests/hash.cc:3:
lix> In file included from /nix/store/k8b7wc0lkr3lqxybzv458ijddpqnzlgw-rapidcheck-0-unstable-2023-12-14-dev/include/rapidcheck.h:18:
lix> In file included from /nix/store/k8b7wc0lkr3lqxybzv458ijddpqnzlgw-rapidcheck-0-unstable-2023-12-14-dev/include/rapidcheck/Gen.h:74:
lix> /nix/store/k8b7wc0lkr3lqxybzv458ijddpqnzlgw-rapidcheck-0-unstable-2023-12-14-dev/include/rapidcheck/Gen.hpp:72:22: error: calling 'current_exception' with incomplete return type 'exception_ptr'
lix>    72 |     auto exception = std::current_exception();
lix>       |                      ^~~~~~~~~~~~~~~~~~~~~~~~
lix> /nix/store/0nhi47d5ip48wprxnava6vv973zzzndf-libcxx-19.1.5-dev/include/c++/v1/__exception/operations.h:37:41: note: 'current_exception' declared here
lix>    37 | _LIBCPP_EXPORTED_FROM_ABI exception_ptr current_exception() _NOEXCEPT;
lix>       |                                         ^
lix> /nix/store/0nhi47d5ip48wprxnava6vv973zzzndf-libcxx-19.1.5-dev/include/c++/v1/__exception/operations.h:35:33: note: forward declaration of 'std::exception_ptr'
lix>    35 | class _LIBCPP_EXPORTED_FROM_ABI exception_ptr;
lix>       |                                 ^
lix> 1 error generated.

Change-Id: Id5d0c4aa8143f2469c5a636d6773a2f5a25a0268
2025-01-07 17:11:04 -08:00